#include <OgreEntity.h>
Inheritance diagram for Ogre::Entity:
Public Methods | |
~Entity () | |
Default destructor. More... | |
Mesh * | getMesh (void) |
Gets the Mesh that this Entity is based on. More... | |
SubEntity * | getSubEntity (unsigned int index) |
Gets a pointer to a SubEntity, ie a part of an Entity. More... | |
unsigned int | getNumSubEntities (void) |
Retrieves the number of SubEntity objects making up this entity. More... | |
Entity * | clone (const String &newName) |
Clones this entity and returns a pointer to the clone. More... | |
void | setMaterialName (const String &name) |
Sets the material to use for the whole of this entity. More... | |
void | _notifyCurrentCamera (Camera *cam) |
Overridden - see MovableObject. More... | |
const AxisAlignedBox & | getBoundingBox (void) const |
Overridden - see MovableObject. More... | |
void | _updateRenderQueue (RenderQueue *queue) |
Overridden - see MovableObject. More... | |
const String & | getName (void) const |
Overridden from MovableObject. More... | |
const String | getMovableType (void) const |
Overridden from MovableObject. More... | |
AnimationState * | getAnimationState (const String &name) |
For entities based on animated meshes, gets the AnimationState object for a single animation. More... | |
AnimationStateSet * | getAllAnimationStates (void) |
For entities based on animated meshes, gets the AnimationState objects for all animations. More... | |
void | setDisplaySkeleton (bool display) |
Tells the Entity whether or not it should display it's skeleton, if it has one. More... | |
void | setLodBias (Real factor=1.0, ushort maxDetailIndex=0, ushort minDetailIndex=99) |
Sets a level-of-detail bias on this entity. More... | |
void | setRenderDetail (SceneDetailLevel renderDetail) |
Sets the rendering detail of this entire entity (solid, wireframe etc). More... | |
virtual SceneNode * | getParentNode (void) |
Returns the node to which this object is attached. More... | |
virtual void | _notifyAttached (SceneNode *parent) |
Internal method called to notify the object that it has been attached to a node. More... | |
virtual bool | isAttached (void) const |
Returns true if this object is attached to a SceneNode. More... | |
virtual void | setVisible (bool visible) |
Tells this object whether to be visible or not, if it has a renderable component. More... | |
virtual bool | isVisible (void) const |
Returns whether or not this object is supposed to be visible or not. More... | |
virtual void | setUserObject (UserDefinedObject *obj) |
Call this to associate your own custom user object instance with this MovableObject. More... | |
virtual UserDefinedObject * | getUserObject (void) |
Retrieves a pointer to a custom application object associated with this movable by an earlier call to setUserObject. More... | |
virtual void | setRenderQueueGroup (RenderQueueGroupID queueID) |
Sets the render queue group this entity will be rendered through. More... | |
virtual RenderQueueGroupID | getRenderQueueGroup (void) |
Gets the queue group for this entity, see setRenderQueueGroup for full details. More... | |
Protected Attributes | |
SceneNode * | mParentNode |
node to which this object is attached. More... | |
bool | mVisible |
Is this object visible? More... | |
UserDefinedObject * | mUserObject |
User defined object which is linked to this object. More... | |
RenderQueueGroupID | mRenderQueueID |
The render queue to use when rendering this object. More... | |
Private Types | |
typedef std::vector< SubEntity * > | SubEntityList |
List of SubEntities (point to SubMeshes). More... | |
typedef std::vector< SubEntityList * > | LODSubEntityList |
List of SubEntity lists (for manual LODs). More... | |
Private Methods | |
Entity () | |
Private constructor (instances cannot be created directly). More... | |
Entity (const String &name, Mesh *mesh, SceneManager *creator) | |
Private constructor - specify name (the usual constructor used). More... | |
void | cacheBoneMatrices (void) |
Private method to cache bone matrices from skeleton. More... | |
void | buildSubEntityList (Mesh *mesh, SubEntityList *sublist) |
Builds a list of SubEntities based on the SubMeshes contained in the Mesh. More... | |
Private Attributes | |
String | mName |
Name of the entity; used for location in the scene. More... | |
Mesh * | mMesh |
The Mesh that this Entity is based on. More... | |
SubEntityList | mSubEntityList |
SceneManager * | mCreatorSceneManager |
Pointer back to the SceneManager that created this instance, for notification purposes. More... | |
AnimationStateSet | mAnimationState |
State of animation for animable meshes. More... | |
Matrix4 * | mBoneMatrices |
Cached bone matrices, including any world transform. More... | |
unsigned short | mNumBoneMatrices |
bool | mDisplaySkeleton |
Flag determines whether or not to display skeleton. More... | |
ushort | mMeshLodIndex |
The LOD number of the mesh to use, calculated by _notifyCurrentCamera. More... | |
Real | mMeshLodFactorInv |
LOD bias factor, inverted for optimisation when calculating adjusted depth. More... | |
ushort | mMinMeshLodIndex |
Index of minimum detail LOD (NB higher index is lower detail). More... | |
ushort | mMaxMeshLodIndex |
Index of maximum detail LOD (NB lower index is higher detail). More... | |
bool | mUsingManualLOD |
Flag indicating that mesh uses manual LOD and so might have multiple SubEntity versions. More... | |
LODSubEntityList | mLodSubEntityList |
Static Private Attributes | |
String | msMovableType = "Entity" |
Shared class-level name for Movable type. More... | |
Friends | |
class | SceneManager |
class | SubEntity |
The Mesh and SubMesh classes deal with the definition of the geometry used by discrete movable objects. Entities are actual instances of objects based on this geometry in the world. Therefore there is usually a single set Mesh for a car, but there may be multiple entities based on it in the world. Entities are able to override aspects of the Mesh it is defined by, such as changing material properties per instance (so you can have many cars using the same geometry but different textures for example). Because a Mesh is split into SubMeshes for this purpose, the Entity class is a grouping class (much like the Mesh class) and much of the detail regarding individual changes is kept in the SubEntity class. There is a 1:1 relationship between SubEntity instances and the SubMesh instances associated with the Mesh the Entity is based on.
Entity and SubEntity classes are never created directly. Use the createEntity method of the SceneManager (passing a model name) to create one.
Entities are included in the scene by associating them with a SceneNode, using the attachEntity method. See the SceneNode class for full information.
|
List of SubEntity lists (for manual LODs). We don't know when the mesh is using manual LODs whether one LOD to the next will have the same number of SubMeshes, therefore we have to allow a SubEntity list with each alternate one. |
|
List of SubEntities (point to SubMeshes).
|
|
Private constructor (instances cannot be created directly).
|
|
Private constructor - specify name (the usual constructor used).
|
|
Default destructor.
|
|
Internal method called to notify the object that it has been attached to a node.
Reimplemented in Ogre::SimpleRenderable. |
|
Overridden - see MovableObject.
Implements Ogre::MovableObject. |
|
Overridden - see MovableObject.
Implements Ogre::MovableObject. |
|
Builds a list of SubEntities based on the SubMeshes contained in the Mesh.
|
|
Private method to cache bone matrices from skeleton.
|
|
Clones this entity and returns a pointer to the clone.
|
|
For entities based on animated meshes, gets the AnimationState objects for all animations.
|
|
For entities based on animated meshes, gets the AnimationState object for a single animation.
|
|
Overridden - see MovableObject.
Implements Ogre::MovableObject. |
|
Gets the Mesh that this Entity is based on.
|
|
Overridden from MovableObject.
Implements Ogre::MovableObject. |
|
Overridden from MovableObject.
Implements Ogre::MovableObject. |
|
Retrieves the number of SubEntity objects making up this entity.
|
|
Returns the node to which this object is attached.
Reimplemented in Ogre::SimpleRenderable. |
|
Gets the queue group for this entity, see setRenderQueueGroup for full details.
|
|
Gets a pointer to a SubEntity, ie a part of an Entity.
|
|
Retrieves a pointer to a custom application object associated with this movable by an earlier call to setUserObject.
|
|
Returns true if this object is attached to a SceneNode.
|
|
Returns whether or not this object is supposed to be visible or not.
|
|
Tells the Entity whether or not it should display it's skeleton, if it has one.
|
|
Sets a level-of-detail bias on this entity.
|
|
Sets the material to use for the whole of this entity.
|
|
Sets the rendering detail of this entire entity (solid, wireframe etc).
|
|
Sets the render queue group this entity will be rendered through.
|
|
Call this to associate your own custom user object instance with this MovableObject.
|
|
Tells this object whether to be visible or not, if it has a renderable component.
Reimplemented in Ogre::Light. |
|
|
|
|
|
State of animation for animable meshes.
|
|
Cached bone matrices, including any world transform.
|
|
Pointer back to the SceneManager that created this instance, for notification purposes.
|
|
Flag determines whether or not to display skeleton.
|
|
|
|
Index of maximum detail LOD (NB lower index is higher detail).
|
|
The Mesh that this Entity is based on.
|
|
LOD bias factor, inverted for optimisation when calculating adjusted depth.
|
|
The LOD number of the mesh to use, calculated by _notifyCurrentCamera.
|
|
Index of minimum detail LOD (NB higher index is lower detail).
|
|
Name of the entity; used for location in the scene.
|
|
|
|
node to which this object is attached.
|
|
The render queue to use when rendering this object.
|
|
Shared class-level name for Movable type.
|
|
|
|
User defined object which is linked to this object.
|
|
Flag indicating that mesh uses manual LOD and so might have multiple SubEntity versions.
|
|
Is this object visible?
|
Copyright © 2002 by The OGRE Team