OGRE  1.12.0
Object-Oriented Graphics Rendering Engine
Ogre::Entity Class Reference

Defines an instance of a discrete, movable object based on a Mesh. More...

#include <OgreEntity.h>

+ Inheritance diagram for Ogre::Entity:

Public Types

typedef std::vector< MovableObject * > ChildObjectList
 Contains the child objects (attached to bones) indexed by name. More...
 
typedef VectorIterator< ChildObjectListChildObjectListIterator
 
typedef std::set< Entity * > EntitySet
 
typedef std::map< unsigned short, bool > SchemeHardwareAnimMap
 
typedef std::vector< ShadowRenderable * > ShadowRenderableList
 
typedef VectorIterator< ShadowRenderableListShadowRenderableListIterator
 
typedef std::vector< SubEntity * > SubEntityList
 
enum  VertexDataBindChoice { BIND_ORIGINAL, BIND_SOFTWARE_SKELETAL, BIND_SOFTWARE_MORPH, BIND_HARDWARE_MORPH }
 Identify which vertex data we should be sending to the renderer. More...
 

Public Member Functions

 ~Entity ()
 Default destructor. More...
 
void _deinitialise (void)
 Tear down the internal structures of this Entity, rendering it uninitialised. More...
 
const Affine3_getBoneMatrices (void) const
 Internal method for retrieving bone matrix information. More...
 
bool _getBuffersMarkedForAnimation (void) const
 Are buffers already marked as vertex animated? More...
 
MovableObjectFactory_getCreator (void) const
 Get the creator of this object, if any (internal use only) More...
 
VertexData_getHardwareVertexAnimVertexData (void) const
 Advanced method to get the hardware morph vertex information. More...
 
LightList_getLightList ()
 Returns a pointer to the current list of lights for this object. More...
 
SceneManager_getManager (void) const
 Get the manager of this object, if any (internal use only) More...
 
Real _getMeshLodFactorTransformed () const
 Get the LOD strategy transformation of the mesh LOD factor. More...
 
unsigned short _getNumBoneMatrices (void) const
 Internal method for retrieving bone matrix information. More...
 
virtual const Affine3_getParentNodeFullTransform (void) const
 Return the full transformation of the parent sceneNode or the attachingPoint node. More...
 
TempBlendedBufferInfo_getSkelAnimTempBufferInfo (void)
 Advanced method to get the temp buffer information for software skeletal animation. More...
 
VertexData_getSkelAnimVertexData (void) const
 Advanced method to get the temporarily blended skeletal vertex information for entities which are software skinned. More...
 
VertexData_getSoftwareVertexAnimVertexData (void) const
 Advanced method to get the temporarily blended software vertex animation information. More...
 
TempBlendedBufferInfo_getVertexAnimTempBufferInfo (void)
 Advanced method to get the temp buffer information for software morph animation. More...
 
void _initialise (bool forceReinitialise=false)
 Try to initialise the Entity from the underlying resources. More...
 
bool _isAnimated (void) const
 Tests if any animation applied to this entity. More...
 
bool _isSkeletonAnimated (void) const
 Tests if skeleton was animated. More...
 
void _markBuffersUsedForAnimation (void)
 Mark just this vertex data as animated. More...
 
void _notifyAttached (Node *parent, bool isTagPoint=false)
 Internal method called to notify the object that it has been attached to a node. More...
 
virtual void _notifyCreator (MovableObjectFactory *fact)
 Notify the object of it's creator (internal use only) More...
 
void _notifyCurrentCamera (Camera *cam)
 Internal method to notify the object of the camera to be used for the next rendering operation. More...
 
virtual void _notifyManager (SceneManager *man)
 Notify the object of it's manager (internal use only) More...
 
virtual void _notifyMoved (void)
 Internal method called to notify the object that it has been moved. More...
 
void _releaseManualHardwareResources ()
 Notifies the movable object that hardware resources were lost. More...
 
void _restoreManualHardwareResources ()
 Notifies the movable object that hardware resources should be restored. More...
 
void _updateAnimation (void)
 Advanced method to perform all the updates required for an animated entity. More...
 
void _updateRenderQueue (RenderQueue *queue)
 Internal method by which the movable object must add Renderable subclass instances to the rendering queue. More...
 
void addQueryFlags (uint32 flags)
 As setQueryFlags, except the flags passed as parameters are appended to the existing flags on this object. More...
 
void addSoftwareAnimationRequest (bool normalsAlso)
 Add a request for software animation. More...
 
void addVisibilityFlags (uint32 flags)
 As setVisibilityFlags, except the flags passed as parameters are appended to the existing flags on this object. More...
 
TagPointattachObjectToBone (const String &boneName, MovableObject *pMovable, const Quaternion &offsetOrientation=Quaternion::IDENTITY, const Vector3 &offsetPosition=Vector3::ZERO)
 Attaches another object to a certain bone of the skeleton which this entity uses. More...
 
VertexDataBindChoice chooseVertexDataForBinding (bool hasVertexAnim)
 Choose which vertex data to bind to the renderer. More...
 
Entityclone (const String &newName) const
 Clones this entity and returns a pointer to the clone. More...
 
virtual AnimableValuePtr createAnimableValue (const String &valueName)
 Create a reference-counted AnimableValuePtr for the named value. More...
 
void detachAllObjectsFromBone (void)
 Detach all MovableObjects previously attached using attachObjectToBone. More...
 
void detachFromParent (void)
 Detaches an object from a parent SceneNode or TagPoint, if attached. More...
 
MovableObjectdetachObjectFromBone (const String &movableName)
 Detach a MovableObject previously attached using attachObjectToBone. More...
 
void detachObjectFromBone (MovableObject *obj)
 Detaches an object by pointer. More...
 
AnimationStateSetgetAllAnimationStates (void) const
 For entities based on animated meshes, gets the AnimationState objects for all animations. More...
 
bool getAlwaysUpdateMainSkeleton () const
 The skeleton of the main entity will be updated even if the an LOD entity is being displayed. More...
 
const StringVectorgetAnimableValueNames (void) const
 Gets a list of animable value names for this object. More...
 
AnimationStategetAnimationState (const String &name) const
 For entities based on animated meshes, gets the AnimationState object for a single animation. More...
 
ChildObjectListIterator getAttachedObjectIterator (void)
 
const ChildObjectListgetAttachedObjects () const
 Gets an iterator to the list of objects attached to bones on this entity. More...
 
const AxisAlignedBoxgetBoundingBox (void) const
 Retrieves the local axis-aligned bounding box for this object. More...
 
Real getBoundingRadius (void) const
 Retrieves the radius of the origin-centered bounding sphere for this object. More...
 
bool getCastShadows (void) const
 Returns whether shadow casting is enabled for this object. More...
 
AxisAlignedBox getChildObjectsBoundingBox (void) const
 Merge all the child object Bounds a return it. More...
 
ushort getCurrentLodIndex ()
 Returns the current LOD used to render. More...
 
const AxisAlignedBoxgetDarkCapBounds (const Light &light, Real dirLightExtrusionDist) const override
 Gets the world space bounding box of the dark cap, as extruded using the light provided. More...
 
bool getDisplaySkeleton (void) const
 Returns whether or not the entity is currently displaying its skeleton. More...
 
EdgeDatagetEdgeList (void)
 Returns details of the edges which might be used to determine a silhouette. More...
 
const AxisAlignedBoxgetLightCapBounds (void) const override
 Gets the world space bounding box of the light cap. More...
 
uint32 getLightMask () const
 Get a bitwise mask which will filter the lights affecting this object. More...
 
ListenergetListener (void) const
 Gets the current listener for this object. More...
 
EntitygetManualLodLevel (size_t index) const
 Gets a pointer to the entity representing the numbered manual level of detail. More...
 
const MeshPtrgetMesh (void) const
 Gets the Mesh that this Entity is based on. More...
 
const StringgetMovableType (void) const
 Returns the type name of this object. More...
 
const StringgetName (void) const
 Returns the name of this object. More...
 
size_t getNumManualLodLevels (void) const
 Returns the number of manual levels of detail that this entity supports. More...
 
size_t getNumSubEntities (void) const
 Retrieves the number of SubEntity objects making up this entity. More...
 
NodegetParentNode (void) const
 Returns the node to which this object is attached. More...
 
SceneNodegetParentSceneNode (void) const
 Returns the scene node to which this object is attached. More...
 
Real getPointExtrusionDistance (const Light *l) const
 Get the distance to extrude for a point/spot light. More...
 
uint32 getQueryFlags (void) const
 Returns the query flags relevant for this object. More...
 
bool getReceivesShadows ()
 Returns whether the Material of any Renderable that this MovableObject will add to the render queue will receive shadows. More...
 
Real getRenderingDistance (void) const
 Gets the distance at which batches are no longer rendered. More...
 
Real getRenderingMinPixelSize () const
 Returns the minimum pixel size an object needs to be in both screen axes in order to be rendered. More...
 
uint8 getRenderQueueGroup (void) const
 Gets the queue group for this entity. More...
 
ShadowRenderableListIterator getShadowVolumeRenderableIterator (ShadowTechnique shadowTechnique, const Light *light, HardwareIndexBufferSharedPtr *indexBuffer, size_t *indexBufferUsedSize, bool extrudeVertices, Real extrusionDistance, unsigned long flags=0)
 Gets an iterator over the renderables required to render the shadow volume. More...
 
SkeletonInstancegetSkeleton (void) const
 Get this Entity's personal skeleton instance. More...
 
const EntitySetgetSkeletonInstanceSharingSet () const
 Returns a pointer to the set of entities which share a SkeletonInstance. More...
 
bool getSkipAnimationStateUpdate () const
 Entity's skeleton's AnimationState will not be automatically updated when set to true. More...
 
int getSoftwareAnimationNormalsRequests (void) const
 Returns the number of requests that have been made for software animation of normals. More...
 
int getSoftwareAnimationRequests (void) const
 Returns the number of requests that have been made for software animation. More...
 
const SubEntityListgetSubEntities () const
 Retrieves SubEntity objects making up this entity. More...
 
SubEntitygetSubEntity (size_t index) const
 Gets a pointer to a SubEntity, ie a part of an Entity. More...
 
SubEntitygetSubEntity (const String &name) const
 Gets a pointer to a SubEntity by name. More...
 
uint32 getTypeFlags (void) const
 Override to return specific type flag. More...
 
bool getUpdateBoundingBoxFromSkeleton () const
 If true, the skeleton of the entity will be used to update the bounding box for culling. More...
 
const AnygetUserAny (void) const
 
UserObjectBindingsgetUserObjectBindings ()
 Return an instance of user objects binding associated with this class. More...
 
const UserObjectBindingsgetUserObjectBindings () const
 Return an instance of user objects binding associated with this class. More...
 
VertexDatagetVertexDataForBinding (void)
 Retrieve the VertexData which should be used for GPU binding. More...
 
uint32 getVisibilityFlags (void) const
 Returns the visibility flags relevant for this object. More...
 
bool getVisible (void) const
 Gets this object whether to be visible or not, if it has a renderable component. More...
 
const AxisAlignedBoxgetWorldBoundingBox (bool derive=false) const
 Retrieves the axis-aligned bounding box for this object in world coordinates. More...
 
const SpheregetWorldBoundingSphere (bool derive=false) const
 Retrieves the worldspace bounding sphere for this object. More...
 
bool hasAnimationState (const String &name) const
 Returns whether the AnimationState with the given name exists. More...
 
bool hasEdgeList (void)
 Returns whether the object has a valid edge list. More...
 
bool hasSkeleton (void) const
 Returns whether or not this entity is skeletally animated. More...
 
bool hasVertexAnimation (void) const
 Returns whether or not this entity is either morph or pose animated. More...
 
bool isAttached (void) const
 Returns true if this object is attached to a SceneNode or TagPoint. More...
 
bool isDebugDisplayEnabled (void) const
 Gets whether debug display of this object is enabled. More...
 
bool isHardwareAnimationEnabled (void)
 Returns whether or not hardware animation is enabled. More...
 
bool isInitialised (void) const
 Has this Entity been initialised yet? More...
 
virtual bool isInScene (void) const
 Returns true if this object is attached to a SceneNode or TagPoint, and this SceneNode / TagPoint is currently in an active part of the scene graph. More...
 
bool isParentTagPoint () const
 Gets whether the parent node is a TagPoint (or a SceneNode) More...
 
virtual bool isVisible (void) const
 Returns whether or not this object is supposed to be visible or not. More...
 
void loadingComplete (Resource *res)
 Resource::Listener hook to notify Entity that a delay-loaded Mesh is complete. More...
 
virtual void preparingComplete (Resource *)
 Called whenever the resource finishes preparing (paging into memory). More...
 
const LightListqueryLights (void) const
 Gets a list of lights, ordered relative to how close they are to this movable object. More...
 
void refreshAvailableAnimationState (void)
 Updates the internal animation state set to include the latest available animations from the attached skeleton. More...
 
void removeQueryFlags (uint32 flags)
 As setQueryFlags, except the flags passed as parameters are removed from the existing flags on this object. More...
 
void removeSoftwareAnimationRequest (bool normalsAlso)
 Removes a request for software animation. More...
 
void removeVisibilityFlags (uint32 flags)
 As setVisibilityFlags, except the flags passed as parameters are removed from the existing flags on this object. More...
 
void setAlwaysUpdateMainSkeleton (bool update)
 The skeleton of the main entity will be updated even if the an LOD entity is being displayed. More...
 
void setCastShadows (bool enabled)
 Sets whether or not this object will cast shadows. More...
 
void setDebugDisplayEnabled (bool enabled)
 Sets whether or not the debug display of this object is enabled. More...
 
void setDisplaySkeleton (bool display)
 Tells the Entity whether or not it should display it's skeleton, if it has one. More...
 
void setLightMask (uint32 lightMask)
 Set a bitwise mask which will filter the lights affecting this object. More...
 
void setListener (Listener *listener)
 Sets a listener for this object. More...
 
void setMaterial (const MaterialPtr &material)
 Sets the material to use for the whole of this entity. More...
 
void setMaterialLodBias (Real factor, ushort maxDetailIndex=0, ushort minDetailIndex=99)
 Sets a level-of-detail bias for the material detail of this entity. More...
 
void setMaterialName (const String &name, const String &groupName=ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME)
 Sets the material to use for the whole of this entity. More...
 
void setMeshLodBias (Real factor, ushort maxDetailIndex=0, ushort minDetailIndex=99)
 Sets a level-of-detail bias for the mesh detail of this entity. More...
 
void setPolygonModeOverrideable (bool PolygonModeOverrideable)
 Sets whether the polygon mode of this entire entity may be overridden by the camera detail settings. More...
 
void setQueryFlags (uint32 flags)
 Sets the query flags for this object. More...
 
void setRenderingDistance (Real dist)
 Sets the distance at which the object is no longer rendered. More...
 
void setRenderingMinPixelSize (Real pixelSize)
 Sets the minimum pixel size an object needs to be in both screen axes in order to be rendered. More...
 
void setRenderQueueGroup (uint8 queueID)
 Sets the render queue group this entity will be rendered through. More...
 
void setRenderQueueGroupAndPriority (uint8 queueID, ushort priority)
 Sets the render queue group and group priority this entity will be rendered through. More...
 
void setSkipAnimationStateUpdate (bool skip)
 Entity's skeleton's AnimationState will not be automatically updated when set to true. More...
 
void setUpdateBoundingBoxFromSkeleton (bool update)
 If true, the skeleton of the entity will be used to update the bounding box for culling. More...
 
void setUserAny (const Any &anything)
 
void setVisibilityFlags (uint32 flags)
 Sets the visibility flags for this object. More...
 
void setVisible (bool visible)
 Tells this object whether to be visible or not, if it has a renderable component. More...
 
void shareSkeletonInstanceWith (Entity *entity)
 Shares the SkeletonInstance with the supplied entity. More...
 
bool sharesSkeletonInstance () const
 Returns whether this entity shares it's SkeltonInstance with other entity instances. More...
 
void stopSharingSkeletonInstance ()
 Stops sharing the SkeletonInstance with other entities. More...
 
virtual void unloadingComplete (Resource *)
 Called whenever the resource has been unloaded. More...
 
void visitRenderables (Renderable::Visitor *visitor, bool debugRenderables=false)
 Method to allow a caller to abstractly iterate over the Renderable instances that this MovableObject will add to the render queue when asked, if any. More...
 

Static Public Member Functions

static void clearShadowRenderableList (ShadowRenderableList &shadowRenderables)
 Common implementation of releasing shadow renderables. More...
 
static void extrudeVertices (const HardwareVertexBufferSharedPtr &vertexBuffer, size_t originalVertexCount, const Vector4 &lightPos, Real extrudeDist)
 Utility method for extruding vertices based on a light. More...
 
static uint32 getDefaultQueryFlags ()
 Get the default query flags for all future MovableObject instances. More...
 
static uint32 getDefaultVisibilityFlags ()
 Get the default visibility flags for all future MovableObject instances. More...
 
static void setDefaultQueryFlags (uint32 flags)
 Set the default query flags for all future MovableObject instances. More...
 
static void setDefaultVisibilityFlags (uint32 flags)
 Set the default visibility flags for all future MovableObject instances. More...
 

Friends

class EntityFactory
 
class SubEntity
 

Detailed Description

Defines an instance of a discrete, movable object based on a Mesh.

Ogre generally divides renderable objects into 2 groups, discrete (separate) and relatively small objects which move around the world, and large, sprawling geometry which makes up generally immovable scenery, aka 'level geometry'.

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 SceneNode::attachObject method.

Note
No functions were declared virtual to improve performance.

Member Typedef Documentation

◆ EntitySet

typedef std::set<Entity*> Ogre::Entity::EntitySet

◆ SchemeHardwareAnimMap

typedef std::map<unsigned short, bool> Ogre::Entity::SchemeHardwareAnimMap

◆ SubEntityList

typedef std::vector<SubEntity*> Ogre::Entity::SubEntityList

◆ ChildObjectList

Contains the child objects (attached to bones) indexed by name.

◆ ChildObjectListIterator

◆ ShadowRenderableList

◆ ShadowRenderableListIterator

Member Enumeration Documentation

◆ VertexDataBindChoice

Identify which vertex data we should be sending to the renderer.

Enumerator
BIND_ORIGINAL 
BIND_SOFTWARE_SKELETAL 
BIND_SOFTWARE_MORPH 
BIND_HARDWARE_MORPH 

Constructor & Destructor Documentation

◆ ~Entity()

Ogre::Entity::~Entity ( )

Default destructor.

Member Function Documentation

◆ getMesh()

const MeshPtr& Ogre::Entity::getMesh ( void  ) const

Gets the Mesh that this Entity is based on.

◆ getSubEntity() [1/2]

SubEntity* Ogre::Entity::getSubEntity ( size_t  index) const

Gets a pointer to a SubEntity, ie a part of an Entity.

Deprecated:
use getSubEntities()

◆ getSubEntity() [2/2]

SubEntity* Ogre::Entity::getSubEntity ( const String name) const

Gets a pointer to a SubEntity by name.

Remarks
Names should be initialized during a Mesh creation.

◆ getNumSubEntities()

size_t Ogre::Entity::getNumSubEntities ( void  ) const

Retrieves the number of SubEntity objects making up this entity.

Deprecated:
use getSubEntities()

◆ getSubEntities()

const SubEntityList& Ogre::Entity::getSubEntities ( ) const
inline

Retrieves SubEntity objects making up this entity.

References Ogre::ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME.

◆ clone()

Entity* Ogre::Entity::clone ( const String newName) const

Clones this entity and returns a pointer to the clone.

Remarks
Useful method for duplicating an entity. The new entity must be given a unique name, and is not attached to the scene in any way so must be attached to a SceneNode to be visible (exactly as entities returned from SceneManager::createEntity).
Parameters
newNameName for the new entity.

◆ setMaterialName()

void Ogre::Entity::setMaterialName ( const String name,
const String groupName = ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME 
)

Sets the material to use for the whole of this entity.

Remarks
This is a shortcut method to set all the materials for all subentities of this entity. Only use this method is you want to set the same material for all subentities or if you know there is only one. Otherwise call getSubEntity() and call the same method on the individual SubEntity.

◆ setMaterial()

void Ogre::Entity::setMaterial ( const MaterialPtr material)

Sets the material to use for the whole of this entity.

Remarks
This is a shortcut method to set all the materials for all subentities of this entity. Only use this method is you want to set the same material for all subentities or if you know there is only one. Otherwise call getSubEntity() and call the same method on the individual SubEntity.

◆ _releaseManualHardwareResources()

void Ogre::Entity::_releaseManualHardwareResources ( )
virtual

Notifies the movable object that hardware resources were lost.

Remarks
Called automatically by RenderSystem if hardware resources were lost and can not be restored using some internal mechanism. Among affected resources are nested shadow renderables, ManualObjects, etc.

Reimplemented from Ogre::MovableObject.

◆ _restoreManualHardwareResources()

void Ogre::Entity::_restoreManualHardwareResources ( )
virtual

Notifies the movable object that hardware resources should be restored.

Remarks
Called automatically by RenderSystem if hardware resources were lost and can not be restored using some internal mechanism. Among affected resources are nested shadow renderables, ManualObjects, etc.

Reimplemented from Ogre::MovableObject.

◆ _notifyCurrentCamera()

void Ogre::Entity::_notifyCurrentCamera ( Camera cam)
virtual

Internal method to notify the object of the camera to be used for the next rendering operation.

Remarks
Certain objects may want to do specific processing based on the camera position. This method notifies them in case they wish to do this.

Reimplemented from Ogre::MovableObject.

◆ setRenderQueueGroup()

void Ogre::Entity::setRenderQueueGroup ( uint8  queueID)
virtual

Sets the render queue group this entity will be rendered through.

Remarks
Render queues are grouped to allow you to more tightly control the ordering of rendered objects. If you do not call this method, all Entity objects default to the default queue (RenderQueue::getDefaultQueueGroup), which is fine for most objects. You may want to alter this if you want this entity to always appear in front of other objects, e.g. for a 3D menu system or such.
See RenderQueue for more details.
Parameters
queueIDEnumerated value of the queue group to use. See the enum RenderQueueGroupID for what kind of values can be used here.

Reimplemented from Ogre::MovableObject.

◆ setRenderQueueGroupAndPriority()

void Ogre::Entity::setRenderQueueGroupAndPriority ( uint8  queueID,
ushort  priority 
)
virtual

Sets the render queue group and group priority this entity will be rendered through.

Remarks
Render queues are grouped to allow you to more tightly control the ordering of rendered objects. Within a single render group there another type of grouping called priority which allows further control. If you do not call this method, all Entity objects default to the default queue and priority (RenderQueue::getDefaultQueueGroup, RenderQueue::getDefaultRenderablePriority), which is fine for most objects. You may want to alter this if you want this entity to always appear in front of other objects, e.g. for a 3D menu system or such.
See RenderQueue for more details.
Parameters
queueIDEnumerated value of the queue group to use. See the enum RenderQueueGroupID for what kind of values can be used here.
priorityThe priority within a group to use.

Reimplemented from Ogre::MovableObject.

◆ getBoundingBox()

const AxisAlignedBox& Ogre::Entity::getBoundingBox ( void  ) const
virtual

Retrieves the local axis-aligned bounding box for this object.

Remarks
This bounding box is in local coordinates.

Implements Ogre::MovableObject.

◆ getChildObjectsBoundingBox()

AxisAlignedBox Ogre::Entity::getChildObjectsBoundingBox ( void  ) const

Merge all the child object Bounds a return it.

◆ _updateRenderQueue()

void Ogre::Entity::_updateRenderQueue ( RenderQueue queue)
virtual

Internal method by which the movable object must add Renderable subclass instances to the rendering queue.

Remarks
The engine will call this method when this object is to be rendered. The object must then create one or more Renderable subclass instances which it places on the passed in Queue for rendering.

Implements Ogre::MovableObject.

◆ getMovableType()

const String& Ogre::Entity::getMovableType ( void  ) const
virtual

Returns the type name of this object.

Implements Ogre::MovableObject.

◆ getAnimationState()

AnimationState* Ogre::Entity::getAnimationState ( const String name) const

For entities based on animated meshes, gets the AnimationState object for a single animation.

Remarks
You animate an entity by updating the animation state objects. Each of these represents the current state of each animation available to the entity. The AnimationState objects are initialised from the Mesh object.

◆ hasAnimationState()

bool Ogre::Entity::hasAnimationState ( const String name) const

Returns whether the AnimationState with the given name exists.

◆ getAllAnimationStates()

AnimationStateSet* Ogre::Entity::getAllAnimationStates ( void  ) const

For entities based on animated meshes, gets the AnimationState objects for all animations.

Returns
In case the entity is animated, this functions returns the pointer to a AnimationStateSet containing all animations of the entries. If the entity is not animated, it returns 0.
Remarks
You animate an entity by updating the animation state objects. Each of these represents the current state of each animation available to the entity. The AnimationState objects are initialised from the Mesh object.

◆ setDisplaySkeleton()

void Ogre::Entity::setDisplaySkeleton ( bool  display)

Tells the Entity whether or not it should display it's skeleton, if it has one.

◆ getDisplaySkeleton()

bool Ogre::Entity::getDisplaySkeleton ( void  ) const

Returns whether or not the entity is currently displaying its skeleton.

◆ getNumManualLodLevels()

size_t Ogre::Entity::getNumManualLodLevels ( void  ) const

Returns the number of manual levels of detail that this entity supports.

Remarks
This number never includes the original entity, it is difference with Mesh::getNumLodLevels.

◆ getCurrentLodIndex()

ushort Ogre::Entity::getCurrentLodIndex ( )
inline

Returns the current LOD used to render.

References Ogre::Quaternion::IDENTITY.

◆ getManualLodLevel()

Entity* Ogre::Entity::getManualLodLevel ( size_t  index) const

Gets a pointer to the entity representing the numbered manual level of detail.

Remarks
The zero-based index never includes the original entity, unlike Mesh::getLodLevel.

◆ setMeshLodBias()

void Ogre::Entity::setMeshLodBias ( Real  factor,
ushort  maxDetailIndex = 0,
ushort  minDetailIndex = 99 
)

Sets a level-of-detail bias for the mesh detail of this entity.

Remarks
Level of detail reduction is normally applied automatically based on the Mesh settings. However, it is possible to influence this behaviour for this entity by adjusting the LOD bias. This 'nudges' the mesh level of detail used for this entity up or down depending on your requirements. You might want to use this if there was a particularly important entity in your scene which you wanted to detail better than the others, such as a player model.
There are three parameters to this method; the first is a factor to apply; it defaults to 1.0 (no change), by increasing this to say 2.0, this model would take twice as long to reduce in detail, whilst at 0.5 this entity would use lower detail versions twice as quickly. The other 2 parameters are hard limits which let you set the maximum and minimum level-of-detail version to use, after all other calculations have been made. This lets you say that this entity should never be simplified, or that it can only use LODs below a certain level even when right next to the camera.
Parameters
factorProportional factor to apply to the distance at which LOD is changed. Higher values increase the distance at which higher LODs are displayed (2.0 is twice the normal distance, 0.5 is half).
maxDetailIndexThe index of the maximum LOD this entity is allowed to use (lower indexes are higher detail: index 0 is the original full detail model).
minDetailIndexThe index of the minimum LOD this entity is allowed to use (higher indexes are lower detail). Use something like 99 if you want unlimited LODs (the actual LOD will be limited by the number in the Mesh).

◆ setMaterialLodBias()

void Ogre::Entity::setMaterialLodBias ( Real  factor,
ushort  maxDetailIndex = 0,
ushort  minDetailIndex = 99 
)

Sets a level-of-detail bias for the material detail of this entity.

Remarks
Level of detail reduction is normally applied automatically based on the Material settings. However, it is possible to influence this behaviour for this entity by adjusting the LOD bias. This 'nudges' the material level of detail used for this entity up or down depending on your requirements. You might want to use this if there was a particularly important entity in your scene which you wanted to detail better than the others, such as a player model.
There are three parameters to this method; the first is a factor to apply; it defaults to 1.0 (no change), by increasing this to say 2.0, this entity would take twice as long to use a lower detail material, whilst at 0.5 this entity would use lower detail versions twice as quickly. The other 2 parameters are hard limits which let you set the maximum and minimum level-of-detail index to use, after all other calculations have been made. This lets you say that this entity should never be simplified, or that it can only use LODs below a certain level even when right next to the camera.
Parameters
factorProportional factor to apply to the distance at which LOD is changed. Higher values increase the distance at which higher LODs are displayed (2.0 is twice the normal distance, 0.5 is half).
maxDetailIndexThe index of the maximum LOD this entity is allowed to use (lower indexes are higher detail: index 0 is the original full detail model).
minDetailIndexThe index of the minimum LOD this entity is allowed to use (higher indexes are lower detail. Use something like 99 if you want unlimited LODs (the actual LOD will be limited by the number of LOD indexes used in the Material).

◆ setPolygonModeOverrideable()

void Ogre::Entity::setPolygonModeOverrideable ( bool  PolygonModeOverrideable)

Sets whether the polygon mode of this entire entity may be overridden by the camera detail settings.

◆ attachObjectToBone()

TagPoint* Ogre::Entity::attachObjectToBone ( const String boneName,
MovableObject pMovable,
const Quaternion offsetOrientation = Quaternion::IDENTITY,
const Vector3 offsetPosition = Vector3::ZERO 
)

Attaches another object to a certain bone of the skeleton which this entity uses.

Remarks
This method can be used to attach another object to an animated part of this entity, by attaching it to a bone in the skeleton (with an offset if required). As this entity is animated, the attached object will move relative to the bone to which it is attached.
An exception is thrown if the movable object is already attached to the bone, another bone or scenenode. If the entity has no skeleton or the bone name cannot be found then an exception is thrown.
Parameters
boneNameThe name of the bone (in the skeleton) to attach this object
pMovablePointer to the object to attach
offsetOrientationAn adjustment to the orientation of the attached object, relative to the bone.
offsetPositionAn adjustment to the position of the attached object, relative to the bone.
Returns
The TagPoint to which the object has been attached

◆ detachObjectFromBone() [1/2]

MovableObject* Ogre::Entity::detachObjectFromBone ( const String movableName)

Detach a MovableObject previously attached using attachObjectToBone.

If the movable object name is not found then an exception is raised.

Parameters
movableNameThe name of the movable object to be detached.

◆ detachObjectFromBone() [2/2]

void Ogre::Entity::detachObjectFromBone ( MovableObject obj)

Detaches an object by pointer.

Remarks
Use this method to destroy a MovableObject which is attached to a bone of belonging this entity. But sometimes the object may be not in the child object list because it is a LOD entity, this method can safely detect and ignore in this case and won't raise an exception.

◆ detachAllObjectsFromBone()

void Ogre::Entity::detachAllObjectsFromBone ( void  )

Detach all MovableObjects previously attached using attachObjectToBone.

◆ getAttachedObjectIterator()

ChildObjectListIterator Ogre::Entity::getAttachedObjectIterator ( void  )

◆ getAttachedObjects()

const ChildObjectList& Ogre::Entity::getAttachedObjects ( ) const
inline

Gets an iterator to the list of objects attached to bones on this entity.

◆ getBoundingRadius()

Real Ogre::Entity::getBoundingRadius ( void  ) const
virtual

Retrieves the radius of the origin-centered bounding sphere for this object.

Implements Ogre::MovableObject.

◆ getWorldBoundingBox()

const AxisAlignedBox& Ogre::Entity::getWorldBoundingBox ( bool  derive = false) const
virtual

Retrieves the axis-aligned bounding box for this object in world coordinates.

Reimplemented from Ogre::MovableObject.

◆ getWorldBoundingSphere()

const Sphere& Ogre::Entity::getWorldBoundingSphere ( bool  derive = false) const
virtual

Retrieves the worldspace bounding sphere for this object.

Reimplemented from Ogre::MovableObject.

◆ getEdgeList()

EdgeData* Ogre::Entity::getEdgeList ( void  )
virtual

Returns details of the edges which might be used to determine a silhouette.

Implements Ogre::ShadowCaster.

◆ hasEdgeList()

bool Ogre::Entity::hasEdgeList ( void  )
virtual

Returns whether the object has a valid edge list.

Implements Ogre::ShadowCaster.

◆ getShadowVolumeRenderableIterator()

ShadowRenderableListIterator Ogre::Entity::getShadowVolumeRenderableIterator ( ShadowTechnique  shadowTechnique,
const Light light,
HardwareIndexBufferSharedPtr indexBuffer,
size_t *  indexBufferUsedSize,
bool  extrudeVertices,
Real  extrusionDistance,
unsigned long  flags = 0 
)
virtual

Gets an iterator over the renderables required to render the shadow volume.

Remarks
Shadowable geometry should ideally be designed such that there is only one ShadowRenderable required to render the the shadow; however this is not a necessary limitation and it can be exceeded if required.
Parameters
shadowTechniqueThe technique being used to generate the shadow.
lightThe light to generate the shadow from.
indexBufferThe index buffer to build the renderables into, the current contents are assumed to be disposable.
extrudeVerticesIf true, this means this class should extrude the vertices of the back of the volume in software. If false, it will not be done (a vertex program is assumed).
extrusionDistanceThe distance to extrude the shadow volume.
flagsTechnique-specific flags, see ShadowRenderableFlags.

Implements Ogre::ShadowCaster.

◆ _getBoneMatrices()

const Affine3* Ogre::Entity::_getBoneMatrices ( void  ) const
inline

Internal method for retrieving bone matrix information.

◆ _getNumBoneMatrices()

unsigned short Ogre::Entity::_getNumBoneMatrices ( void  ) const
inline

Internal method for retrieving bone matrix information.

◆ hasSkeleton()

bool Ogre::Entity::hasSkeleton ( void  ) const
inline

Returns whether or not this entity is skeletally animated.

◆ getSkeleton()

SkeletonInstance* Ogre::Entity::getSkeleton ( void  ) const
inline

Get this Entity's personal skeleton instance.

◆ isHardwareAnimationEnabled()

bool Ogre::Entity::isHardwareAnimationEnabled ( void  )

Returns whether or not hardware animation is enabled.

Remarks
Because fixed-function indexed vertex blending is rarely supported by existing graphics cards, hardware animation can only be done if the vertex programs in the materials used to render an entity support it. Therefore, this method will only return true if all the materials assigned to this entity have vertex programs assigned, and all those vertex programs must support 'includes_morph_animation true' if using morph animation, 'includes_pose_animation true' if using pose animation and 'includes_skeletal_animation true' if using skeletal animation.

Also note the the function returns value according to the current active scheme. This is due to the fact that RTSS schemes may be different in their handling of hardware animation.

◆ _notifyAttached()

void Ogre::Entity::_notifyAttached ( Node parent,
bool  isTagPoint = false 
)
virtual

Internal method called to notify the object that it has been attached to a node.

Reimplemented from Ogre::MovableObject.

◆ getSoftwareAnimationRequests()

int Ogre::Entity::getSoftwareAnimationRequests ( void  ) const
inline

Returns the number of requests that have been made for software animation.

Remarks
If non-zero then software animation will be performed in updateAnimation regardless of the current setting of isHardwareAnimationEnabled or any internal optimise for eliminate software animation. Requests for software animation are made by calling the addSoftwareAnimationRequest() method.

◆ getSoftwareAnimationNormalsRequests()

int Ogre::Entity::getSoftwareAnimationNormalsRequests ( void  ) const
inline

Returns the number of requests that have been made for software animation of normals.

Remarks
If non-zero, and getSoftwareAnimationRequests() also returns non-zero, then software animation of normals will be performed in updateAnimation regardless of the current setting of isHardwareAnimationEnabled or any internal optimise for eliminate software animation. Currently it is not possible to force software animation of only normals. Consequently this value is always less than or equal to that returned by getSoftwareAnimationRequests(). Requests for software animation of normals are made by calling the addSoftwareAnimationRequest() method with 'true' as the parameter.

◆ addSoftwareAnimationRequest()

void Ogre::Entity::addSoftwareAnimationRequest ( bool  normalsAlso)

Add a request for software animation.

Remarks
Tells the entity to perform animation calculations for skeletal/vertex animations in software, regardless of the current setting of isHardwareAnimationEnabled(). Software animation will be performed any time one or more requests have been made. If 'normalsAlso' is 'true', then the entity will also do software blending on normal vectors, in addition to positions. This advanced method useful for situations in which access to actual mesh vertices is required, such as accurate collision detection or certain advanced shading techniques. When software animation is no longer needed, the caller of this method should always remove the request by calling removeSoftwareAnimationRequest(), passing the same value for 'normalsAlso'.

◆ removeSoftwareAnimationRequest()

void Ogre::Entity::removeSoftwareAnimationRequest ( bool  normalsAlso)

Removes a request for software animation.

Remarks
Calling this decrements the entity's internal counter of the number of requests for software animation. If the counter is already zero then calling this method throws an exception. The 'normalsAlso' flag if set to 'true' will also decrement the internal counter of number of requests for software animation of normals.

◆ shareSkeletonInstanceWith()

void Ogre::Entity::shareSkeletonInstanceWith ( Entity entity)

Shares the SkeletonInstance with the supplied entity.

Note that in order for this to work, both entities must have the same Skeleton.

◆ hasVertexAnimation()

bool Ogre::Entity::hasVertexAnimation ( void  ) const

Returns whether or not this entity is either morph or pose animated.

◆ stopSharingSkeletonInstance()

void Ogre::Entity::stopSharingSkeletonInstance ( )

Stops sharing the SkeletonInstance with other entities.

◆ sharesSkeletonInstance()

bool Ogre::Entity::sharesSkeletonInstance ( ) const
inline

Returns whether this entity shares it's SkeltonInstance with other entity instances.

◆ getSkeletonInstanceSharingSet()

const EntitySet* Ogre::Entity::getSkeletonInstanceSharingSet ( ) const
inline

Returns a pointer to the set of entities which share a SkeletonInstance.

If this instance does not share it's SkeletonInstance with other instances NULL will be returned

◆ refreshAvailableAnimationState()

void Ogre::Entity::refreshAvailableAnimationState ( void  )

Updates the internal animation state set to include the latest available animations from the attached skeleton.

Remarks
Use this method if you manually add animations to a skeleton, or have linked the skeleton to another for animation purposes since creating this entity.
Note
If you have called getAnimationState prior to calling this method, the pointers will still remain valid.

◆ _updateAnimation()

void Ogre::Entity::_updateAnimation ( void  )

Advanced method to perform all the updates required for an animated entity.

Remarks
You don't normally need to call this, but it's here in case you wish to manually update the animation of an Entity at a specific point in time. Animation will not be updated more than once a frame no matter how many times you call this method.

◆ _isAnimated()

bool Ogre::Entity::_isAnimated ( void  ) const

Tests if any animation applied to this entity.

Remarks
An entity is animated if any animation state is enabled, or any manual bone applied to the skeleton.

◆ _isSkeletonAnimated()

bool Ogre::Entity::_isSkeletonAnimated ( void  ) const

Tests if skeleton was animated.

◆ _getSkelAnimVertexData()

VertexData* Ogre::Entity::_getSkelAnimVertexData ( void  ) const

Advanced method to get the temporarily blended skeletal vertex information for entities which are software skinned.

Remarks
Internal engine will eliminate software animation if possible, this information is unreliable unless added request for software animation via addSoftwareAnimationRequest.
Note
The positions/normals of the returned vertex data is in object space.

◆ _getSoftwareVertexAnimVertexData()

VertexData* Ogre::Entity::_getSoftwareVertexAnimVertexData ( void  ) const

Advanced method to get the temporarily blended software vertex animation information.

Remarks
Internal engine will eliminate software animation if possible, this information is unreliable unless added request for software animation via addSoftwareAnimationRequest.
Note
The positions/normals of the returned vertex data is in object space.

◆ _getHardwareVertexAnimVertexData()

VertexData* Ogre::Entity::_getHardwareVertexAnimVertexData ( void  ) const

Advanced method to get the hardware morph vertex information.

Note
The positions/normals of the returned vertex data is in object space.

◆ _getSkelAnimTempBufferInfo()

TempBlendedBufferInfo* Ogre::Entity::_getSkelAnimTempBufferInfo ( void  )

Advanced method to get the temp buffer information for software skeletal animation.

◆ _getVertexAnimTempBufferInfo()

TempBlendedBufferInfo* Ogre::Entity::_getVertexAnimTempBufferInfo ( void  )

Advanced method to get the temp buffer information for software morph animation.

◆ getTypeFlags()

uint32 Ogre::Entity::getTypeFlags ( void  ) const
virtual

Override to return specific type flag.

Reimplemented from Ogre::MovableObject.

◆ getVertexDataForBinding()

VertexData* Ogre::Entity::getVertexDataForBinding ( void  )

Retrieve the VertexData which should be used for GPU binding.

◆ chooseVertexDataForBinding()

VertexDataBindChoice Ogre::Entity::chooseVertexDataForBinding ( bool  hasVertexAnim)

Choose which vertex data to bind to the renderer.

◆ _getBuffersMarkedForAnimation()

bool Ogre::Entity::_getBuffersMarkedForAnimation ( void  ) const
inline

Are buffers already marked as vertex animated?

◆ _markBuffersUsedForAnimation()

void Ogre::Entity::_markBuffersUsedForAnimation ( void  )

Mark just this vertex data as animated.

◆ isInitialised()

bool Ogre::Entity::isInitialised ( void  ) const
inline

Has this Entity been initialised yet?

Remarks
If this returns false, it means this Entity hasn't been completely constructed yet from the underlying resources (Mesh, Skeleton), which probably means they were delay-loaded and aren't available yet. This Entity won't render until it has been successfully initialised, nor will many of the manipulation methods function.

◆ _initialise()

void Ogre::Entity::_initialise ( bool  forceReinitialise = false)

Try to initialise the Entity from the underlying resources.

Remarks
This method builds the internal structures of the Entity based on it resources (Mesh, Skeleton). This may or may not succeed if the resources it references have been earmarked for background loading, so you should check isInitialised afterwards to see if it was successful.
Parameters
forceReinitialiseIf true, this forces the Entity to tear down it's internal structures and try to rebuild them. Useful if you changed the content of a Mesh or Skeleton at runtime.

◆ _deinitialise()

void Ogre::Entity::_deinitialise ( void  )

Tear down the internal structures of this Entity, rendering it uninitialised.

◆ loadingComplete()

void Ogre::Entity::loadingComplete ( Resource res)
virtual

Resource::Listener hook to notify Entity that a delay-loaded Mesh is complete.

Reimplemented from Ogre::Resource::Listener.

◆ visitRenderables()

void Ogre::Entity::visitRenderables ( Renderable::Visitor visitor,
bool  debugRenderables = false 
)
virtual

Method to allow a caller to abstractly iterate over the Renderable instances that this MovableObject will add to the render queue when asked, if any.

Parameters
visitorPointer to a class implementing the Renderable::Visitor interface which will be called back for each Renderable which will be queued. Bear in mind that the state of the Renderable instances may not be finalised depending on when you call this.
debugRenderablesIf false, only regular renderables will be visited (those for normal display). If true, debug renderables will be included too.

Implements Ogre::MovableObject.

◆ _getMeshLodFactorTransformed()

Real Ogre::Entity::_getMeshLodFactorTransformed ( ) const

Get the LOD strategy transformation of the mesh LOD factor.

◆ setSkipAnimationStateUpdate()

void Ogre::Entity::setSkipAnimationStateUpdate ( bool  skip)
inline

Entity's skeleton's AnimationState will not be automatically updated when set to true.

Useful if you wish to handle AnimationState updates manually.

◆ getSkipAnimationStateUpdate()

bool Ogre::Entity::getSkipAnimationStateUpdate ( ) const
inline

Entity's skeleton's AnimationState will not be automatically updated when set to true.

Useful if you wish to handle AnimationState updates manually.

◆ setAlwaysUpdateMainSkeleton()

void Ogre::Entity::setAlwaysUpdateMainSkeleton ( bool  update)
inline

The skeleton of the main entity will be updated even if the an LOD entity is being displayed.

useful if you have entities attached to the main entity. Otherwise position of attached entities will not be updated.

◆ getAlwaysUpdateMainSkeleton()

bool Ogre::Entity::getAlwaysUpdateMainSkeleton ( ) const
inline

The skeleton of the main entity will be updated even if the an LOD entity is being displayed.

useful if you have entities attached to the main entity. Otherwise position of attached entities will not be updated.

◆ setUpdateBoundingBoxFromSkeleton()

void Ogre::Entity::setUpdateBoundingBoxFromSkeleton ( bool  update)

If true, the skeleton of the entity will be used to update the bounding box for culling.

Useful if you have skeletal animations that move the bones away from the root. Otherwise, the bounding box of the mesh in the binding pose will be used.

Remarks
When true, the bounding box will be generated to only enclose the bones that are used for skinning. Also the resulting bounding box will be expanded by the amount of GetMesh()->getBoneBoundingRadius(). The expansion amount can be changed on the mesh to achieve a better fitting bounding box.

◆ getUpdateBoundingBoxFromSkeleton()

bool Ogre::Entity::getUpdateBoundingBoxFromSkeleton ( ) const
inline

If true, the skeleton of the entity will be used to update the bounding box for culling.

Useful if you have skeletal animations that move the bones away from the root. Otherwise, the bounding box of the mesh in the binding pose will be used.

◆ _notifyCreator()

virtual void Ogre::MovableObject::_notifyCreator ( MovableObjectFactory fact)
inlinevirtualinherited

Notify the object of it's creator (internal use only)

◆ _getCreator()

MovableObjectFactory* Ogre::MovableObject::_getCreator ( void  ) const
inlineinherited

Get the creator of this object, if any (internal use only)

◆ _notifyManager()

virtual void Ogre::MovableObject::_notifyManager ( SceneManager man)
inlinevirtualinherited

Notify the object of it's manager (internal use only)

◆ _getManager()

SceneManager* Ogre::MovableObject::_getManager ( void  ) const
inlineinherited

Get the manager of this object, if any (internal use only)

◆ getName()

const String& Ogre::MovableObject::getName ( void  ) const
inlineinherited

Returns the name of this object.

◆ getParentNode()

Node* Ogre::MovableObject::getParentNode ( void  ) const
inlineinherited

Returns the node to which this object is attached.

Remarks
A MovableObject may be attached to either a SceneNode or to a TagPoint, the latter case if it's attached to a bone on an animated entity. Both are Node subclasses so this method will return either.

◆ getParentSceneNode()

SceneNode* Ogre::MovableObject::getParentSceneNode ( void  ) const
inherited

Returns the scene node to which this object is attached.

Remarks
A MovableObject may be attached to either a SceneNode or to a TagPoint, the latter case if it's attached to a bone on an animated entity. This method will return the scene node of the parent entity if the latter is true.

◆ isParentTagPoint()

bool Ogre::MovableObject::isParentTagPoint ( ) const
inlineinherited

Gets whether the parent node is a TagPoint (or a SceneNode)

◆ isAttached()

bool Ogre::MovableObject::isAttached ( void  ) const
inlineinherited

Returns true if this object is attached to a SceneNode or TagPoint.

◆ detachFromParent()

void Ogre::MovableObject::detachFromParent ( void  )
inherited

Detaches an object from a parent SceneNode or TagPoint, if attached.

◆ isInScene()

virtual bool Ogre::MovableObject::isInScene ( void  ) const
virtualinherited

Returns true if this object is attached to a SceneNode or TagPoint, and this SceneNode / TagPoint is currently in an active part of the scene graph.

Reimplemented in Ogre::InstancedEntity.

◆ _notifyMoved()

virtual void Ogre::MovableObject::_notifyMoved ( void  )
virtualinherited

Internal method called to notify the object that it has been moved.

Reimplemented in Ogre::Light, Ogre::PortalBase, Ogre::InstancedEntity, and Ogre::PCZLight.

◆ setVisible()

void Ogre::MovableObject::setVisible ( bool  visible)
inlineinherited

Tells this object whether to be visible or not, if it has a renderable component.

Note
An alternative approach of making an object invisible is to detach it from it's SceneNode, or to remove the SceneNode entirely. Detaching a node means that structurally the scene graph changes. Once this change has taken place, the objects / nodes that have been removed have less overhead to the visibility detection pass than simply making the object invisible, so if you do this and leave the objects out of the tree for a long time, it's faster. However, the act of detaching / reattaching nodes is in itself more expensive than setting an object visibility flag, since in the latter case structural changes are not made. Therefore, small or frequent visibility changes are best done using this method; large or more longer term changes are best done by detaching.

Referenced by Ogre::Light::setVisible().

◆ getVisible()

bool Ogre::MovableObject::getVisible ( void  ) const
inlineinherited

Gets this object whether to be visible or not, if it has a renderable component.

Remarks
Returns the value set by MovableObject::setVisible only.

◆ isVisible()

virtual bool Ogre::MovableObject::isVisible ( void  ) const
virtualinherited

Returns whether or not this object is supposed to be visible or not.

Remarks
Takes into account both upper rendering distance and visible flag.

Reimplemented in Ogre::StaticGeometry::Region.

Referenced by Ogre::Frustum::isCustomProjectionMatrixEnabled().

◆ setRenderingDistance()

void Ogre::MovableObject::setRenderingDistance ( Real  dist)
inlineinherited

Sets the distance at which the object is no longer rendered.

Note
Camera::setUseRenderingDistance() needs to be called for this parameter to be used.
Parameters
distDistance beyond which the object will not be rendered (the default is 0, which means objects are always rendered).

◆ getRenderingDistance()

Real Ogre::MovableObject::getRenderingDistance ( void  ) const
inlineinherited

Gets the distance at which batches are no longer rendered.

◆ setRenderingMinPixelSize()

void Ogre::MovableObject::setRenderingMinPixelSize ( Real  pixelSize)
inlineinherited

Sets the minimum pixel size an object needs to be in both screen axes in order to be rendered.

Note
Camera::setUseMinPixelSize() needs to be called for this parameter to be used.
Parameters
pixelSizeNumber of minimum pixels (the default is 0, which means objects are always rendered).

◆ getRenderingMinPixelSize()

Real Ogre::MovableObject::getRenderingMinPixelSize ( ) const
inlineinherited

Returns the minimum pixel size an object needs to be in both screen axes in order to be rendered.

◆ setUserAny()

void Ogre::MovableObject::setUserAny ( const Any anything)
inlineinherited
Deprecated:
use UserObjectBindings::setUserAny via getUserObjectBindings() instead.

Sets any kind of user value on this object.

Remarks
This method allows you to associate any user value you like with this MovableObject. This can be a pointer back to one of your own classes for instance.

◆ getUserAny()

const Any& Ogre::MovableObject::getUserAny ( void  ) const
inlineinherited
Deprecated:
use UserObjectBindings::getUserAny via getUserObjectBindings() instead.

Retrieves the custom user value associated with this object.

◆ getUserObjectBindings() [1/2]

UserObjectBindings& Ogre::MovableObject::getUserObjectBindings ( )
inlineinherited

Return an instance of user objects binding associated with this class.

You can use it to associate one or more custom objects with this class instance.

See also
UserObjectBindings::setUserAny.

◆ getUserObjectBindings() [2/2]

const UserObjectBindings& Ogre::MovableObject::getUserObjectBindings ( ) const
inlineinherited

Return an instance of user objects binding associated with this class.

You can use it to associate one or more custom objects with this class instance.

See also
UserObjectBindings::setUserAny.

◆ getRenderQueueGroup()

uint8 Ogre::MovableObject::getRenderQueueGroup ( void  ) const
inlineinherited

Gets the queue group for this entity.

See also
setRenderQueueGroup

◆ _getParentNodeFullTransform()

virtual const Affine3& Ogre::MovableObject::_getParentNodeFullTransform ( void  ) const
virtualinherited

Return the full transformation of the parent sceneNode or the attachingPoint node.

Reimplemented in Ogre::InstancedEntity.

◆ setQueryFlags()

void Ogre::MovableObject::setQueryFlags ( uint32  flags)
inlineinherited

Sets the query flags for this object.

Remarks
When performing a scene query, this object will be included or excluded according to flags on the object and flags on the query. This is a bitwise value, so only when a bit on these flags is set, will it be included in a query asking for that flag. The meaning of the bits is application-specific.

◆ addQueryFlags()

void Ogre::MovableObject::addQueryFlags ( uint32  flags)
inlineinherited

As setQueryFlags, except the flags passed as parameters are appended to the existing flags on this object.

◆ removeQueryFlags()

void Ogre::MovableObject::removeQueryFlags ( uint32  flags)
inlineinherited

As setQueryFlags, except the flags passed as parameters are removed from the existing flags on this object.

◆ getQueryFlags()

uint32 Ogre::MovableObject::getQueryFlags ( void  ) const
inlineinherited

Returns the query flags relevant for this object.

◆ setDefaultQueryFlags()

static void Ogre::MovableObject::setDefaultQueryFlags ( uint32  flags)
inlinestaticinherited

Set the default query flags for all future MovableObject instances.

◆ getDefaultQueryFlags()

static uint32 Ogre::MovableObject::getDefaultQueryFlags ( )
inlinestaticinherited

Get the default query flags for all future MovableObject instances.

◆ setVisibilityFlags()

void Ogre::MovableObject::setVisibilityFlags ( uint32  flags)
inlineinherited

Sets the visibility flags for this object.

Remarks
As well as a simple true/false value for visibility (as seen in setVisible), you can also set visibility flags which when 'and'ed with the SceneManager's visibility mask can also make an object invisible.

◆ addVisibilityFlags()

void Ogre::MovableObject::addVisibilityFlags ( uint32  flags)
inlineinherited

As setVisibilityFlags, except the flags passed as parameters are appended to the existing flags on this object.

◆ removeVisibilityFlags()

void Ogre::MovableObject::removeVisibilityFlags ( uint32  flags)
inlineinherited

As setVisibilityFlags, except the flags passed as parameters are removed from the existing flags on this object.

◆ getVisibilityFlags()

uint32 Ogre::MovableObject::getVisibilityFlags ( void  ) const
inlineinherited

Returns the visibility flags relevant for this object.

◆ setDefaultVisibilityFlags()

static void Ogre::MovableObject::setDefaultVisibilityFlags ( uint32  flags)
inlinestaticinherited

Set the default visibility flags for all future MovableObject instances.

◆ getDefaultVisibilityFlags()

static uint32 Ogre::MovableObject::getDefaultVisibilityFlags ( )
inlinestaticinherited

Get the default visibility flags for all future MovableObject instances.

◆ setListener()

void Ogre::MovableObject::setListener ( Listener listener)
inlineinherited

Sets a listener for this object.

Remarks
Note for size and performance reasons only one listener per object is allowed.

◆ getListener()

Listener* Ogre::MovableObject::getListener ( void  ) const
inlineinherited

Gets the current listener for this object.

◆ queryLights()

const LightList& Ogre::MovableObject::queryLights ( void  ) const
inherited

Gets a list of lights, ordered relative to how close they are to this movable object.

Remarks
By default, this method gives the listener a chance to populate light list first, if there is no listener or Listener::objectQueryLights returns NULL, it'll query the light list from parent entity if it is present, or returns SceneNode::findLights if it has parent scene node, otherwise it just returns an empty list.
The object internally caches the light list, so it will recalculate it only when object is moved, or lights that affect the frustum have been changed (
See also
SceneManager::_getLightsDirtyCounter), but if listener exists, it will be called each time, so the listener should implement their own cache mechanism to optimise performance.
This method can be useful when implementing Renderable::getLights in case the renderable is a part of the movable.
Returns
The list of lights use to lighting this object.

◆ getLightMask()

uint32 Ogre::MovableObject::getLightMask ( ) const
inlineinherited

Get a bitwise mask which will filter the lights affecting this object.

Remarks
By default, this mask is fully set meaning all lights will affect this object

◆ setLightMask()

void Ogre::MovableObject::setLightMask ( uint32  lightMask)
inherited

Set a bitwise mask which will filter the lights affecting this object.

Remarks
This mask will be compared against the mask held against Light to determine if a light should affect a given object. By default, this mask is fully set meaning all lights will affect this object

◆ _getLightList()

LightList* Ogre::MovableObject::_getLightList ( )
inlineinherited

Returns a pointer to the current list of lights for this object.

Remarks
You should not modify this list outside of MovableObject::Listener::objectQueryLights (say if you want to use it to implement this method, and use the pointer as a return value) and for reading it's only accurate as at the last frame.

◆ getLightCapBounds()

const AxisAlignedBox& Ogre::MovableObject::getLightCapBounds ( void  ) const
overridevirtualinherited

Gets the world space bounding box of the light cap.

Implements Ogre::ShadowCaster.

◆ getDarkCapBounds()

const AxisAlignedBox& Ogre::MovableObject::getDarkCapBounds ( const Light light,
Real  dirLightExtrusionDist 
) const
overridevirtualinherited

Gets the world space bounding box of the dark cap, as extruded using the light provided.

Implements Ogre::ShadowCaster.

◆ setCastShadows()

void Ogre::MovableObject::setCastShadows ( bool  enabled)
inlineinherited

Sets whether or not this object will cast shadows.

Remarks
This setting simply allows you to turn on/off shadows for a given object. An object will not cast shadows unless the scene supports it in any case (see SceneManager::setShadowTechnique), and also the material which is in use must also have shadow casting enabled. By default all entities cast shadows. If, however, for some reason you wish to disable this for a single object then you can do so using this method.
Note
This method normally refers to objects which block the light, but since Light is also a subclass of MovableObject, in that context it means whether the light causes shadows itself.

◆ getCastShadows()

bool Ogre::MovableObject::getCastShadows ( void  ) const
inlinevirtualinherited

Returns whether shadow casting is enabled for this object.

Implements Ogre::ShadowCaster.

◆ getReceivesShadows()

bool Ogre::MovableObject::getReceivesShadows ( )
inherited

Returns whether the Material of any Renderable that this MovableObject will add to the render queue will receive shadows.

◆ getPointExtrusionDistance()

Real Ogre::MovableObject::getPointExtrusionDistance ( const Light l) const
virtualinherited

Get the distance to extrude for a point/spot light.

Implements Ogre::ShadowCaster.

◆ setDebugDisplayEnabled()

void Ogre::MovableObject::setDebugDisplayEnabled ( bool  enabled)
inlineinherited

Sets whether or not the debug display of this object is enabled.

Remarks
Some objects aren't visible themselves but it can be useful to display a debug representation of them. Or, objects may have an additional debug display on top of their regular display. This option enables / disables that debug display. Objects that are not visible never display debug geometry regardless of this setting.

◆ isDebugDisplayEnabled()

bool Ogre::MovableObject::isDebugDisplayEnabled ( void  ) const
inlineinherited

Gets whether debug display of this object is enabled.

◆ clearShadowRenderableList()

static void Ogre::ShadowCaster::clearShadowRenderableList ( ShadowRenderableList shadowRenderables)
staticinherited

Common implementation of releasing shadow renderables.

◆ extrudeVertices()

static void Ogre::ShadowCaster::extrudeVertices ( const HardwareVertexBufferSharedPtr vertexBuffer,
size_t  originalVertexCount,
const Vector4 lightPos,
Real  extrudeDist 
)
staticinherited

Utility method for extruding vertices based on a light.

Remarks
Unfortunately, because D3D cannot handle homogeneous (4D) position coordinates in the fixed-function pipeline (GL can, but we have to be cross-API), when we extrude in software we cannot extrude to infinity the way we do in the vertex program (by setting w to 0.0f). Therefore we extrude by a fixed distance, which may cause some problems with larger scenes. Luckily better hardware (ie vertex programs) can fix this.
Parameters
vertexBufferThe vertex buffer containing ONLY xyz position values, which must be originalVertexCount * 2 * 3 floats long.
originalVertexCountThe count of the original number of vertices, i.e. the number in the mesh, not counting the doubling which has already been done (by VertexData::prepareForShadowVolume) to provide the extruded area of the buffer.
lightPos4D light position in object space, when w=0.0f this represents a directional light.
extrudeDistThe distance to extrude.

◆ getAnimableValueNames()

const StringVector& Ogre::AnimableObject::getAnimableValueNames ( void  ) const
inlineinherited

Gets a list of animable value names for this object.

References Ogre::Exception::ERR_ITEM_NOT_FOUND, and OGRE_EXCEPT.

◆ createAnimableValue()

virtual AnimableValuePtr Ogre::AnimableObject::createAnimableValue ( const String valueName)
inlinevirtualinherited

Create a reference-counted AnimableValuePtr for the named value.

Remarks
You can use the returned object to animate a value on this object, using AnimationTrack. Subclasses must override this if they wish to support animation of their values.

Reimplemented in Ogre::Light.

References Ogre::Exception::ERR_ITEM_NOT_FOUND, and OGRE_EXCEPT.

◆ preparingComplete()

virtual void Ogre::Resource::Listener::preparingComplete ( Resource )
inlinevirtualinherited

Called whenever the resource finishes preparing (paging into memory).

Remarks
If a Resource has been marked as background loaded (
See also
Resource::setBackgroundLoaded) the call does not itself occur in the thread which is doing the preparing; when preparing is complete a response indicator is placed with the ResourceGroupManager, which will then be sent back to the listener as part of the application's primary frame loop thread.

◆ unloadingComplete()

virtual void Ogre::Resource::Listener::unloadingComplete ( Resource )
inlinevirtualinherited

Called whenever the resource has been unloaded.

Reimplemented in Ogre::GpuProgramUsage.

Friends And Related Function Documentation

◆ EntityFactory

friend class EntityFactory
friend

◆ SubEntity

friend class SubEntity
friend

The documentation for this class was generated from the following file: