OgreEntity.h
Go to the documentation of this file.
1 /*
2 -----------------------------------------------------------------------------
3 This source file is part of OGRE
4 (Object-oriented Graphics Rendering Engine)
5 For the latest info, see http://www.ogre3d.org
6 
7 Copyright (c) 2000-2013 Torus Knot Software Ltd
8 
9 Permission is hereby granted, free of charge, to any person obtaining a copy
10 of this software and associated documentation files (the "Software"), to deal
11 in the Software without restriction, including without limitation the rights
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 copies of the Software, and to permit persons to whom the Software is
14 furnished to do so, subject to the following conditions:
15 
16 The above copyright notice and this permission notice shall be included in
17 all copies or substantial portions of the Software.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 THE SOFTWARE.
26 -----------------------------------------------------------------------------
27 */
28 #ifndef __Entity_H__
29 #define __Entity_H__
30 
31 #include "OgrePrerequisites.h"
32 #include "OgreCommon.h"
33 
34 #include "OgreString.h"
35 #include "OgreMovableObject.h"
36 #include "OgreQuaternion.h"
37 #include "OgreVector3.h"
39 #include "OgreMesh.h"
40 #include "OgreRenderable.h"
42 #include "OgreHeaderPrefix.h"
43 
44 namespace Ogre {
83  {
84  // Allow EntityFactory full access
85  friend class EntityFactory;
86  friend class SubEntity;
87  public:
88 
91 
92  protected:
93 
96  Entity();
99  Entity( const String& name, const MeshPtr& mesh);
100 
104 
109 
110 
113 
114 
131 
140 
155  void restoreBuffersForUnusedAnimation(bool hardwareAnimation);
156 
165  VertexData* destData);
166 
170  void initialisePoseVertexData(const VertexData* srcData, VertexData* destData,
171  bool animateNormals);
172 
176  void finalisePoseNormals(const VertexData* srcData, VertexData* destData);
177 
182  unsigned short mNumBoneMatrices;
185 
187  void updateAnimation(void);
188 
192  unsigned long *mFrameBonesLastUpdated;
193 
199 
204  bool cacheBoneMatrices(void);
205 
212 
215 
228 
229 
232 
239 
248 
256 
260 
263 
266 
269 
271  void buildSubEntityList(MeshPtr& mesh, SubEntityList* sublist);
272 
274  void attachObjectImpl(MovableObject *pMovable, TagPoint *pAttachingPoint);
275 
278 
281 
284 
292 
294  void applyVertexAnimation(bool hardwareAnimation, bool stencilShadows);
296  ushort initHardwareAnimationElements(VertexData* vdata, ushort numberOfElements, bool animateNormals);
298  bool tempVertexAnimBuffersBound(void) const;
300  bool tempSkelAnimBuffersBound(bool requestNormals) const;
301 
302  public:
305  protected:
307 
308 
311 
312  ShadowRenderableList mShadowRenderables;
313 
316  {
317  protected:
329 
330 
331  public:
333  HardwareIndexBufferSharedPtr* indexBuffer, const VertexData* vertexData,
334  bool createSeparateLightCap, SubEntity* subent, bool isLightCap = false);
336 
340  void getWorldTransforms(Matrix4* xform) const;
341  HardwareVertexBufferSharedPtr getPositionBuffer(void) { return mPositionBuffer; }
342  HardwareVertexBufferSharedPtr getWBuffer(void) { return mWBuffer; }
344  void rebindPositionBuffer(const VertexData* vertexData, bool force);
346  bool isVisible(void) const;
348  virtual void rebindIndexBuffer(const HardwareIndexBufferSharedPtr& indexBuffer);
349  };
350  public:
354 
357  const MeshPtr& getMesh(void) const;
358 
361  SubEntity* getSubEntity(unsigned int index) const;
362 
367  SubEntity* getSubEntity( const String& name ) const;
368 
371  unsigned int getNumSubEntities(void) const;
372 
382  Entity* clone( const String& newName ) const;
383 
393 
394 
403  void setMaterial(const MaterialPtr& material);
404 
408 
410  void setRenderQueueGroup(uint8 queueID);
411 
413  void setRenderQueueGroupAndPriority(uint8 queueID, ushort priority);
414 
417  const AxisAlignedBox& getBoundingBox(void) const;
418 
421 
425 
427  const String& getMovableType(void) const;
428 
437  bool hasAnimationState(const String& name) const;
448 
451  void setDisplaySkeleton(bool display);
452 
455  bool getDisplaySkeleton(void) const;
456 
457 
463  Entity* getManualLodLevel(size_t index) const;
464 
470  size_t getNumManualLodLevels(void) const;
471 
474  ushort getCurrentLodIndex() { return mMeshLodIndex; }
475 
505  void setMeshLodBias(Real factor, ushort maxDetailIndex = 0, ushort minDetailIndex = 99);
506 
536  void setMaterialLodBias(Real factor, ushort maxDetailIndex = 0, ushort minDetailIndex = 99);
537 
541  void setPolygonModeOverrideable(bool PolygonModeOverrideable);
562  MovableObject *pMovable,
563  const Quaternion &offsetOrientation = Quaternion::IDENTITY,
564  const Vector3 &offsetPosition = Vector3::ZERO);
565 
572 
580 
583 
588  Real getBoundingRadius(void) const;
589 
591  const AxisAlignedBox& getWorldBoundingBox(bool derive = false) const;
593  const Sphere& getWorldBoundingSphere(bool derive = false) const;
594 
598  bool hasEdgeList(void);
601  ShadowTechnique shadowTechnique, const Light* light,
602  HardwareIndexBufferSharedPtr* indexBuffer, size_t* indexBufferUsedSize,
603  bool extrudeVertices, Real extrusionDistance, unsigned long flags = 0 );
604 
606  const Matrix4* _getBoneMatrices(void) const { return mBoneMatrices;}
608  unsigned short _getNumBoneMatrices(void) const { return mNumBoneMatrices; }
610  bool hasSkeleton(void) const { return mSkeletonInstance != 0; }
612  SkeletonInstance* getSkeleton(void) const { return mSkeletonInstance; }
629 
631  void _notifyAttached(Node* parent, bool isTagPoint = false);
639  int getSoftwareAnimationRequests(void) const { return mSoftwareAnimationRequests; }
651  int getSoftwareAnimationNormalsRequests(void) const { return mSoftwareAnimationNormalsRequests; }
667  void addSoftwareAnimationRequest(bool normalsAlso);
676  void removeSoftwareAnimationRequest(bool normalsAlso);
677 
683 
686  bool hasVertexAnimation(void) const;
687 
688 
692 
693 
696  inline bool sharesSkeletonInstance() const { return mSharedSkeletonEntities != NULL; }
697 
701  inline const EntitySet* getSkeletonInstanceSharingSet() const { return mSharedSkeletonEntities; }
702 
714 
722  void _updateAnimation(void);
723 
729  bool _isAnimated(void) const;
730 
733  bool _isSkeletonAnimated(void) const;
734 
768  uint32 getTypeFlags(void) const;
771 
774  {
778  BIND_HARDWARE_MORPH
779  };
782 
784  bool _getBuffersMarkedForAnimation(void) const { return mVertexAnimationAppliedThisFrame; }
788 
797  bool isInitialised(void) const { return mInitialised; }
798 
810  void _initialise(bool forceReinitialise = false);
812  void _deinitialise(void);
813 
818 
821  bool debugRenderables = false);
822 
825 
829  void setSkipAnimationStateUpdate(bool skip) {
830  mSkipAnimStateUpdates = skip;
831  }
832 
837  return mSkipAnimStateUpdates;
838  }
839 
844  void setAlwaysUpdateMainSkeleton(bool update) {
845  mAlwaysUpdateMainSkeleton = update;
846  }
847 
853  return mAlwaysUpdateMainSkeleton;
854  }
855 
856 
857  };
858 
861  {
862  protected:
864  public:
867 
869 
870  const String& getType(void) const;
872 
873  };
877 } // namespace Ogre
878 
879 #include "OgreHeaderSuffix.h"
880 
881 #endif // __Entity_H__
OgreHeaderSuffix.h
Ogre::EntityFactory::FACTORY_TYPE_NAME
static String FACTORY_TYPE_NAME
Definition: OgreEntity.h:868
Ogre::Entity::mMinMeshLodIndex
ushort mMinMeshLodIndex
Index of minimum detail LOD (NB higher index is lower detail).
Definition: OgreEntity.h:236
Ogre::Entity::EntityShadowRenderable::mParent
Entity * mParent
Definition: OgreEntity.h:318
Ogre::Entity::mFullBoundingBox
AxisAlignedBox mFullBoundingBox
Bounding box that 'contains' all the mesh of each child entity.
Definition: OgreEntity.h:310
Ogre::Entity::detachAllObjectsFromBone
void detachAllObjectsFromBone(void)
Detach all MovableObjects previously attached using attachObjectToBone.
Ogre::Entity::getShadowVolumeRenderableIterator
ShadowRenderableListIterator getShadowVolumeRenderableIterator(ShadowTechnique shadowTechnique, const Light *light, HardwareIndexBufferSharedPtr *indexBuffer, size_t *indexBufferUsedSize, bool extrudeVertices, Real extrusionDistance, unsigned long flags=0)
Ogre::Entity::mHardwareVertexAnimVertexData
VertexData * mHardwareVertexAnimVertexData
Vertex data details for hardware vertex anim of shared geometry.
Definition: OgreEntity.h:126
Ogre::Entity::getNumManualLodLevels
size_t getNumManualLodLevels(void) const
Returns the number of manual levels of detail that this entity supports.
Ogre::Entity::_getSkelAnimVertexData
VertexData * _getSkelAnimVertexData(void) const
Advanced method to get the temporarily blended skeletal vertex information for entities which are sof...
Ogre::Entity::hasSkeleton
bool hasSkeleton(void) const
Returns whether or not this entity is skeletally animated.
Definition: OgreEntity.h:610
Ogre::Entity::setDisplaySkeleton
void setDisplaySkeleton(bool display)
Tells the Entity whether or not it should display it's skeleton, if it has one.
Ogre
Definition: OgreAndroidLogListener.h:35
Ogre::Entity::mChildObjectList
ChildObjectList mChildObjectList
Definition: OgreEntity.h:306
Ogre::Vector3::ZERO
static const Vector3 ZERO
Definition: OgreVector3.h:800
Ogre::EntityFactory
Factory object for creating Entity instances.
Definition: OgreEntity.h:861
Ogre::Entity::_isSkeletonAnimated
bool _isSkeletonAnimated(void) const
Tests if skeleton was animated.
Ogre::Entity::setPolygonModeOverrideable
void setPolygonModeOverrideable(bool PolygonModeOverrideable)
Sets whether the polygon mode of this entire entity may be overridden by the camera detail settings.
Ogre::Entity::EntityShadowRenderable::mOriginalPosBufferBinding
unsigned short mOriginalPosBufferBinding
Original position buffer source binding.
Definition: OgreEntity.h:326
Ogre::Entity::mSoftwareAnimationRequests
int mSoftwareAnimationRequests
Counter indicating number of requests for software animation.
Definition: OgreEntity.h:221
Ogre::Entity::getEdgeList
EdgeData * getEdgeList(void)
Ogre::map
Definition: OgrePrerequisites.h:534
Ogre::Entity::mMinMaterialLodIndex
ushort mMinMaterialLodIndex
Index of minimum detail LOD (NB higher index is lower detail).
Definition: OgreEntity.h:245
OgreMesh.h
Ogre::ushort
unsigned short ushort
Definition: OgrePrerequisites.h:113
Ogre::Camera
A viewpoint from which the scene will be rendered.
Definition: OgreCamera.h:87
Ogre::Entity::getVertexDataForBinding
VertexData * getVertexDataForBinding(void)
Retrieve the VertexData which should be used for GPU binding.
Ogre::Entity::cacheBoneMatrices
bool cacheBoneMatrices(void)
Private method to cache bone matrices from skeleton.
Ogre::Entity::getNumSubEntities
unsigned int getNumSubEntities(void) const
Retrieves the number of SubEntity objects making up this entity.
Ogre::SubEntity
Utility class which defines the sub-parts of an Entity.
Definition: OgreSubEntity.h:64
Ogre::Entity::bindMissingHardwarePoseBuffers
void bindMissingHardwarePoseBuffers(const VertexData *srcData, VertexData *destData)
Ensure that any unbound pose animation buffers are bound to a safe default.
Ogre::Entity::isHardwareAnimationEnabled
bool isHardwareAnimationEnabled(void)
Returns whether or not hardware animation is enabled.
Ogre::Entity::_isAnimated
bool _isAnimated(void) const
Tests if any animation applied to this entity.
Ogre::Entity::getBoundingBox
const AxisAlignedBox & getBoundingBox(void) const
Ogre::set::type
std::set< T, P, A > type
Definition: OgrePrerequisites.h:522
Ogre::Entity::cloneVertexDataRemoveBlendInfo
VertexData * cloneVertexDataRemoveBlendInfo(const VertexData *source)
Internal method to clone vertex data definitions but to remove blend buffers.
Ogre::Entity::setRenderQueueGroupAndPriority
void setRenderQueueGroupAndPriority(uint8 queueID, ushort priority)
Ogre::Entity::_getVertexAnimTempBufferInfo
TempBlendedBufferInfo * _getVertexAnimTempBufferInfo(void)
Advanced method to get the temp buffer information for software morph animation.
Ogre::Entity::mSchemeHardwareAnim
SchemeHardwareAnimMap mSchemeHardwareAnim
Flag indicating whether hardware animation is supported by this entities materials data is saved per ...
Definition: OgreEntity.h:211
Ogre::Entity::mSkelAnimVertexData
VertexData * mSkelAnimVertexData
Vertex data details for software skeletal anim of shared geometry.
Definition: OgreEntity.h:118
Ogre::Entity::_updateAnimation
void _updateAnimation(void)
Advanced method to perform all the updates required for an animated entity.
Ogre::Entity::setSkipAnimationStateUpdate
void setSkipAnimationStateUpdate(bool skip)
Entity's skeleton's AnimationState will not be automatically updated when set to true.
Definition: OgreEntity.h:829
Ogre::Entity::EntityShadowRenderable::getWorldTransforms
void getWorldTransforms(Matrix4 *xform) const
Ogre::Entity::markBuffersUnusedForAnimation
void markBuffersUnusedForAnimation(void)
Mark all vertex data as so far unanimated.
Ogre::EntityFactory::~EntityFactory
~EntityFactory()
Definition: OgreEntity.h:866
Ogre::Entity::getAlwaysUpdateMainSkeleton
bool getAlwaysUpdateMainSkeleton() const
The skeleton of the main entity will be updated even if the an LOD entity is being displayed.
Definition: OgreEntity.h:852
Ogre::ShadowRenderable
Class which represents the renderable aspects of a set of shadow volume faces.
Definition: OgreShadowCaster.h:53
Ogre::Entity::initHardwareAnimationElements
ushort initHardwareAnimationElements(VertexData *vdata, ushort numberOfElements, bool animateNormals)
Initialise the hardware animation elements for given vertex data.
Ogre::TagPoint
A tagged point on a skeleton, which can be used to attach entities to on specific other entities.
Definition: OgreTagPoint.h:61
Ogre::Entity::getAttachedObjectIterator
ChildObjectListIterator getAttachedObjectIterator(void)
Gets an iterator to the list of objects attached to bones on this entity.
Ogre::Entity::setAlwaysUpdateMainSkeleton
void setAlwaysUpdateMainSkeleton(bool update)
The skeleton of the main entity will be updated even if the an LOD entity is being displayed.
Definition: OgreEntity.h:844
Ogre::Entity::mVertexProgramInUse
bool mVertexProgramInUse
Flag indicating whether we have a vertex program in use on any of our subentities.
Definition: OgreEntity.h:219
Ogre::Entity::getAnimationState
AnimationState * getAnimationState(const String &name) const
For entities based on animated meshes, gets the AnimationState object for a single animation.
Ogre::Entity::mTempSkelAnimInfo
TempBlendedBufferInfo mTempSkelAnimInfo
Temp buffer details for software skeletal anim of shared geometry.
Definition: OgreEntity.h:116
Ogre::ShadowTechnique
ShadowTechnique
An enumeration of broad shadow techniques.
Definition: OgreCommon.h:191
Ogre::VectorIterator
Concrete IteratorWrapper for nonconst access to the underlying container.
Definition: OgreIteratorWrapper.h:186
Ogre::Light
Representation of a dynamic light source in the scene.
Definition: OgreLight.h:74
Ogre::Entity::mLastParentXform
Matrix4 mLastParentXform
Last parent transform.
Definition: OgreEntity.h:265
OgreQuaternion.h
Ogre::Entity::mSkipAnimStateUpdates
bool mSkipAnimStateUpdates
Flag indicating whether to skip automatic updating of the Skeleton's AnimationState.
Definition: OgreEntity.h:225
Ogre::Entity::mSoftwareVertexAnimVertexData
VertexData * mSoftwareVertexAnimVertexData
Vertex data details for software vertex anim of shared geometry.
Definition: OgreEntity.h:122
Ogre::Entity::clone
Entity * clone(const String &newName) const
Clones this entity and returns a pointer to the clone.
Ogre::Entity::extractTempBufferInfo
void extractTempBufferInfo(VertexData *sourceData, TempBlendedBufferInfo *info)
Internal method for extracting metadata out of source vertex data for fast assignment of temporary bu...
Ogre::Entity::getSkipAnimationStateUpdate
bool getSkipAnimationStateUpdate() const
Entity's skeleton's AnimationState will not be automatically updated when set to true.
Definition: OgreEntity.h:836
Ogre::Entity::mPreparedForShadowVolumes
bool mPreparedForShadowVolumes
Have the temp buffers already had their geometry prepared for use in rendering shadow volumes?
Definition: OgreEntity.h:130
Ogre::Entity::getTypeFlags
uint32 getTypeFlags(void) const
Override to return specific type flag.
Ogre::Entity::getSkeletonInstanceSharingSet
const EntitySet * getSkeletonInstanceSharingSet() const
Returns a pointer to the set of entities which share a SkeletonInstance.
Definition: OgreEntity.h:701
Ogre::Entity::SchemeHardwareAnimMap
map< unsigned short, bool >::type SchemeHardwareAnimMap
Definition: OgreEntity.h:90
Ogre::MovableObject
Abstract class defining a movable object in a scene.
Definition: OgreMovableObject.h:61
Ogre::Entity::buildSubEntityList
void buildSubEntityList(MeshPtr &mesh, SubEntityList *sublist)
Builds a list of SubEntities based on the SubMeshes contained in the Mesh.
Ogre::HardwareIndexBufferSharedPtr
Shared pointer implementation used to share index buffers.
Definition: OgreHardwareIndexBuffer.h:80
Ogre::EntityFactory::EntityFactory
EntityFactory()
Definition: OgreEntity.h:865
Ogre::ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME
static String AUTODETECT_RESOURCE_GROUP_NAME
Special resource group name which causes resource group to be automatically determined based on searc...
Definition: OgreResourceGroupManager.h:270
Ogre::Entity::shareSkeletonInstanceWith
void shareSkeletonInstanceWith(Entity *entity)
Shares the SkeletonInstance with the supplied entity.
Ogre::Entity::refreshAvailableAnimationState
void refreshAvailableAnimationState(void)
Updates the internal animation state set to include the latest available animations from the attached...
Ogre::uint32
unsigned int uint32
Definition: OgrePlatform.h:359
Ogre::Entity::backgroundLoadingComplete
void backgroundLoadingComplete(Resource *res)
Resource::Listener hook to notify Entity that a delay-loaded Mesh is complete.
Ogre::Entity::addSoftwareAnimationRequest
void addSoftwareAnimationRequest(bool normalsAlso)
Add a request for software animation.
Ogre::String
_StringBase String
Definition: OgrePrerequisites.h:439
Ogre::Entity::finalisePoseNormals
void finalisePoseNormals(const VertexData *srcData, VertexData *destData)
When animating normals for pose animation, finalise normals by filling in with the reference mesh nor...
Ogre::Entity::getBoundingRadius
Real getBoundingRadius(void) const
Retrieves the radius of the origin-centered bounding sphere for this object.
Ogre::MovableObjectFactory
Interface definition for a factory class which produces a certain kind of MovableObject,...
Definition: OgreMovableObject.h:579
Ogre::Entity::EntityShadowRenderable::rebindIndexBuffer
virtual void rebindIndexBuffer(const HardwareIndexBufferSharedPtr &indexBuffer)
Ogre::Entity::setMaterial
void setMaterial(const MaterialPtr &material)
Sets the material to use for the whole of this entity.
OgreResourceGroupManager.h
Ogre::Entity::getSoftwareAnimationNormalsRequests
int getSoftwareAnimationNormalsRequests(void) const
Returns the number of requests that have been made for software animation of normals.
Definition: OgreEntity.h:651
Ogre::Entity::mMeshLodFactorTransformed
Real mMeshLodFactorTransformed
LOD bias factor, transformed for optimisation when calculating adjusted LOD value.
Definition: OgreEntity.h:234
Ogre::Entity::getAllAnimationStates
AnimationStateSet * getAllAnimationStates(void) const
For entities based on animated meshes, gets the AnimationState objects for all animations.
Ogre::Entity::hasVertexAnimation
bool hasVertexAnimation(void) const
Returns whether or not this entity is either morph or pose animated.
Ogre::Entity::applyVertexAnimation
void applyVertexAnimation(bool hardwareAnimation, bool stencilShadows)
Apply vertex animation.
Ogre::Entity::attachObjectImpl
void attachObjectImpl(MovableObject *pMovable, TagPoint *pAttachingPoint)
Internal implementation of attaching a 'child' object to this entity and assign the parent node to th...
Ogre::Entity::_notifyAttached
void _notifyAttached(Node *parent, bool isTagPoint=false)
Internal method called to notify the object that it has been attached to a node.
Ogre::NameValuePairList
map< String, String >::type NameValuePairList
Name / value parameter pair (first = name, second = value)
Definition: OgreCommon.h:550
Ogre::Entity::_updateRenderQueue
void _updateRenderQueue(RenderQueue *queue)
Ogre::Entity::Entity
Entity(const String &name, const MeshPtr &mesh)
Private constructor - specify name (the usual constructor used).
Ogre::Entity
Defines an instance of a discrete, movable object based on a Mesh.
Definition: OgreEntity.h:83
Ogre::AnimationState
Represents the state of an animation and the weight of its influence.
Definition: OgreAnimationState.h:55
Ogre::Entity::hasEdgeList
bool hasEdgeList(void)
Ogre::Entity::mNumBoneMatrices
unsigned short mNumBoneMatrices
Definition: OgreEntity.h:182
Ogre::Entity::EntityShadowRenderable::~EntityShadowRenderable
~EntityShadowRenderable()
Ogre::Entity::EntityShadowRenderable::mSubEntity
SubEntity * mSubEntity
Link to SubEntity, only present if SubEntity has it's own geometry.
Definition: OgreEntity.h:328
Ogre::Entity::mBoneWorldMatrices
Matrix4 * mBoneWorldMatrices
Cached bone matrices, including any world transform.
Definition: OgreEntity.h:179
Ogre::Entity::mSoftwareAnimationNormalsRequests
int mSoftwareAnimationNormalsRequests
Counter indicating number of requests for software blended normals.
Definition: OgreEntity.h:223
Ogre::VertexData
Summary class collecting together vertex source information.
Definition: OgreVertexIndexData.h:50
Ogre::Quaternion
Implementation of a Quaternion, i.e.
Definition: OgreQuaternion.h:58
Ogre::Entity::VertexDataBindChoice
VertexDataBindChoice
Identify which vertex data we should be sending to the renderer.
Definition: OgreEntity.h:774
Ogre::Entity::BIND_SOFTWARE_MORPH
@ BIND_SOFTWARE_MORPH
Definition: OgreEntity.h:777
Ogre::Entity::EntityShadowRenderable::mCurrentVertexData
const VertexData * mCurrentVertexData
Link to current vertex data used to bind (maybe changes).
Definition: OgreEntity.h:324
Ogre::Entity::getSubEntity
SubEntity * getSubEntity(const String &name) const
Gets a pointer to a SubEntity by name.
Ogre::EntityFactory::createInstanceImpl
MovableObject * createInstanceImpl(const String &name, const NameValuePairList *params)
Internal implementation of create method - must be overridden.
OgreHeaderPrefix.h
Ogre::Entity::getCurrentLodIndex
ushort getCurrentLodIndex()
Returns the current LOD used to render.
Definition: OgreEntity.h:474
Ogre::Matrix4
Class encapsulating a standard 4x4 homogeneous matrix.
Definition: OgreMatrix4.h:79
Ogre::Entity::isInitialised
bool isInitialised(void) const
Has this Entity been initialised yet?
Definition: OgreEntity.h:797
Ogre::Entity::detachObjectFromBone
MovableObject * detachObjectFromBone(const String &movableName)
Detach a MovableObject previously attached using attachObjectToBone.
Ogre::Entity::mSkeletonInstance
SkeletonInstance * mSkeletonInstance
This Entity's personal copy of the skeleton, if skeletally animated.
Definition: OgreEntity.h:259
Ogre::Entity::prepareTempBlendBuffers
void prepareTempBlendBuffers(void)
Internal method for preparing this Entity for use in animation.
Ogre::Entity::mMaxMeshLodIndex
ushort mMaxMeshLodIndex
Index of maximum detail LOD (NB lower index is higher detail).
Definition: OgreEntity.h:238
Ogre::Entity::_getBuffersMarkedForAnimation
bool _getBuffersMarkedForAnimation(void) const
Are buffers already marked as vertex animated?
Definition: OgreEntity.h:784
OgrePrerequisites.h
Ogre::Entity::setMeshLodBias
void setMeshLodBias(Real factor, ushort maxDetailIndex=0, ushort minDetailIndex=99)
Sets a level-of-detail bias for the mesh detail of this entity.
Ogre::HardwareVertexBufferSharedPtr
Shared pointer implementation used to share vertex buffers.
Definition: OgreHardwareVertexBuffer.h:87
Ogre::Entity::BIND_SOFTWARE_SKELETAL
@ BIND_SOFTWARE_SKELETAL
Definition: OgreEntity.h:776
Ogre::Entity::ChildObjectList
map< String, MovableObject * >::type ChildObjectList
Contains the child objects (attached to bones) indexed by name.
Definition: OgreEntity.h:304
Ogre::Entity::mVertexAnimationAppliedThisFrame
bool mVertexAnimationAppliedThisFrame
Have we applied any vertex animation to shared geometry?
Definition: OgreEntity.h:128
Ogre::Entity::EntityShadowRenderable::isVisible
bool isVisible(void) const
Ogre::Entity::getSkeleton
SkeletonInstance * getSkeleton(void) const
Get this Entity's personal skeleton instance.
Definition: OgreEntity.h:612
Ogre::Entity::getWorldBoundingSphere
const Sphere & getWorldBoundingSphere(bool derive=false) const
Retrieves the worldspace bounding sphere for this object.
Ogre::Entity::getWorldBoundingBox
const AxisAlignedBox & getWorldBoundingBox(bool derive=false) const
Retrieves the axis-aligned bounding box for this object in world coordinates.
Ogre::Entity::mTempVertexAnimInfo
TempBlendedBufferInfo mTempVertexAnimInfo
Temp buffer details for software vertex anim of shared geometry.
Definition: OgreEntity.h:120
Ogre::Entity::_deinitialise
void _deinitialise(void)
Tear down the internal structures of this Entity, rendering it uninitialised.
Ogre::Entity::mHardwarePoseCount
ushort mHardwarePoseCount
Number of hardware poses supported by materials.
Definition: OgreEntity.h:217
Ogre::Entity::mSubEntityList
SubEntityList mSubEntityList
Definition: OgreEntity.h:108
Ogre::Entity::setRenderQueueGroup
void setRenderQueueGroup(uint8 queueID)
Ogre::AxisAlignedBox
A 3D box aligned with the x/y/z axes.
Definition: OgreAxisAlignedBox.h:55
_OgreExport
#define _OgreExport
Definition: OgrePlatform.h:257
Ogre::Entity::_getHardwareVertexAnimVertexData
VertexData * _getHardwareVertexAnimVertexData(void) const
Advanced method to get the hardware morph vertex information.
Ogre::Entity::getMovableType
const String & getMovableType(void) const
Returns the type name of this object.
OgreCommon.h
Ogre::Entity::hasAnimationState
bool hasAnimationState(const String &name) const
Returns whether the AnimationState with the given name exists.
Ogre::Entity::mBoneMatrices
Matrix4 * mBoneMatrices
Cached bone matrices in skeleton local space, might shares with other entity instances.
Definition: OgreEntity.h:181
Ogre::Entity::detachAllObjectsImpl
void detachAllObjectsImpl(void)
Internal implementation of detaching all 'child' objects of this entity.
Ogre::Entity::mMaxMaterialLodIndex
ushort mMaxMaterialLodIndex
Index of maximum detail LOD (NB lower index is higher detail).
Definition: OgreEntity.h:247
Ogre::Entity::stopSharingSkeletonInstance
void stopSharingSkeletonInstance()
Stops sharing the SkeletonInstance with other entities.
Ogre::Entity::EntityShadowRenderable
Nested class to allow entity shadows.
Definition: OgreEntity.h:316
Ogre::Entity::mFrameAnimationLastUpdated
unsigned long mFrameAnimationLastUpdated
Records the last frame in which animation was updated.
Definition: OgreEntity.h:184
Ogre::Entity::SubEntityList
vector< SubEntity * >::type SubEntityList
List of SubEntities (point to SubMeshes).
Definition: OgreEntity.h:107
Ogre::Entity::visitRenderables
void visitRenderables(Renderable::Visitor *visitor, bool debugRenderables=false)
Method to allow a caller to abstractly iterate over the Renderable instances that this MovableObject ...
Ogre::Entity::mAnimationState
AnimationStateSet * mAnimationState
State of animation for animable meshes.
Definition: OgreEntity.h:112
Ogre::Entity::mSharedSkeletonEntities
EntitySet * mSharedSkeletonEntities
A set of all the entities which shares a single SkeletonInstance.
Definition: OgreEntity.h:198
Ogre::Entity::EntityShadowRenderable::mWBuffer
HardwareVertexBufferSharedPtr mWBuffer
Shared link to w-coord buffer (optional).
Definition: OgreEntity.h:322
Ogre::Sphere
A sphere primitive, mostly used for bounds checking.
Definition: OgreSphere.h:52
Ogre::Entity::_initialise
void _initialise(bool forceReinitialise=false)
Try to initialise the Entity from the underlying resources.
Ogre::Entity::_getSkelAnimTempBufferInfo
TempBlendedBufferInfo * _getSkelAnimTempBufferInfo(void)
Advanced method to get the temp buffer information for software skeletal animation.
Ogre::SharedPtr< Mesh >
Ogre::Entity::ChildObjectListIterator
MapIterator< ChildObjectList > ChildObjectListIterator
Definition: OgreEntity.h:584
Ogre::Entity::getSubEntity
SubEntity * getSubEntity(unsigned int index) const
Gets a pointer to a SubEntity, ie a part of an Entity.
Ogre::Entity::_markBuffersUsedForAnimation
void _markBuffersUsedForAnimation(void)
Mark just this vertex data as animated.
Ogre::uint8
unsigned char uint8
Definition: OgrePlatform.h:361
Ogre::MapIterator
Concrete IteratorWrapper for nonconst access to the underlying key-value container.
Definition: OgreIteratorWrapper.h:319
OgreRenderable.h
Ogre::AnimationStateSet
Class encapsulating a set of AnimationState objects.
Definition: OgreAnimationState.h:197
OgreMovableObject.h
Ogre::Entity::restoreBuffersForUnusedAnimation
void restoreBuffersForUnusedAnimation(bool hardwareAnimation)
Internal method to restore original vertex data where we didn't perform any vertex animation this fra...
Ogre::Resource
Abstract class representing a loadable resource (e.g.
Definition: OgreResource.h:80
Ogre::Entity::mMaterialLodFactor
Real mMaterialLodFactor
LOD bias factor, not transformed.
Definition: OgreEntity.h:241
Ogre::Entity::_getMeshLodFactorTransformed
Real _getMeshLodFactorTransformed() const
Get the LOD strategy transformation of the mesh LOD factor.
Ogre::Entity::getMesh
const MeshPtr & getMesh(void) const
Gets the Mesh that this Entity is based on.
Ogre::SkeletonInstance
A SkeletonInstance is a single instance of a Skeleton used by a world object.
Definition: OgreSkeletonInstance.h:54
Ogre::Entity::attachObjectToBone
TagPoint * 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.
Ogre::Entity::EntityShadowRenderable::_createSeparateLightCap
void _createSeparateLightCap()
Create the separate light cap if it doesn't already exists.
Ogre::Entity::calcVertexProcessing
bool calcVertexProcessing(void)
Calculates the kind of vertex processing in use.
Ogre::TempBlendedBufferInfo
Structure for recording the use of temporary blend buffers.
Definition: OgreHardwareBufferManager.h:72
Ogre::Entity::_getNumBoneMatrices
unsigned short _getNumBoneMatrices(void) const
Internal method for retrieving bone matrix information.
Definition: OgreEntity.h:608
Ogre::Entity::EntityShadowRenderable::rebindPositionBuffer
void rebindPositionBuffer(const VertexData *vertexData, bool force)
Rebind the source positions (for temp buffer users).
Ogre::EntityFactory::destroyInstance
void destroyInstance(MovableObject *obj)
Destroy an instance of the object.
Ogre::Resource::Listener
Definition: OgreResource.h:84
Ogre::Entity::chooseVertexDataForBinding
VertexDataBindChoice chooseVertexDataForBinding(bool hasVertexAnim)
Choose which vertex data to bind to the renderer.
Ogre::Entity::getManualLodLevel
Entity * getManualLodLevel(size_t index) const
Gets a pointer to the entity representing the numbered manual level of detail.
Ogre::Renderable::Visitor
Visitor object that can be used to iterate over a collection of Renderable instances abstractly.
Definition: OgreRenderable.h:378
Ogre::Entity::mMeshStateCount
size_t mMeshStateCount
Mesh state count, used to detect differences.
Definition: OgreEntity.h:268
Ogre::Entity::tempSkelAnimBuffersBound
bool tempSkelAnimBuffersBound(bool requestNormals) const
Are software skeleton animation temp buffers bound?
Ogre::Entity::reevaluateVertexProcessing
void reevaluateVertexProcessing(void)
Ensures reevaluation of the vertex processing usage.
Ogre::Entity::mMeshLodIndex
ushort mMeshLodIndex
The LOD number of the mesh to use, calculated by _notifyCurrentCamera.
Definition: OgreEntity.h:231
Ogre::Entity::mLodEntityList
LODEntityList mLodEntityList
Definition: OgreEntity.h:255
Ogre::Entity::EntityShadowRenderable::EntityShadowRenderable
EntityShadowRenderable(Entity *parent, HardwareIndexBufferSharedPtr *indexBuffer, const VertexData *vertexData, bool createSeparateLightCap, SubEntity *subent, bool isLightCap=false)
Ogre::Entity::_getSoftwareVertexAnimVertexData
VertexData * _getSoftwareVertexAnimVertexData(void) const
Advanced method to get the temporarily blended software vertex animation information.
Ogre::Entity::EntitySet
set< Entity * >::type EntitySet
Definition: OgreEntity.h:89
Ogre::Entity::detachObjectFromBone
void detachObjectFromBone(MovableObject *obj)
Detaches an object by pointer.
Ogre::Entity::mDisplaySkeleton
bool mDisplaySkeleton
Flag determines whether or not to display skeleton.
Definition: OgreEntity.h:207
Ogre::Entity::mShadowRenderables
ShadowRenderableList mShadowRenderables
Definition: OgreEntity.h:312
Ogre::Quaternion::IDENTITY
static const Quaternion IDENTITY
Definition: OgreQuaternion.h:301
Ogre::Entity::mMaterialLodFactorTransformed
Real mMaterialLodFactorTransformed
LOD bias factor, transformed for optimisation when calculating adjusted LOD value.
Definition: OgreEntity.h:243
Ogre::Entity::EntityShadowRenderable::getPositionBuffer
HardwareVertexBufferSharedPtr getPositionBuffer(void)
Definition: OgreEntity.h:341
Ogre::Entity::mAlwaysUpdateMainSkeleton
bool mAlwaysUpdateMainSkeleton
Flag indicating whether to update the main entity skeleton even when an LOD is displayed.
Definition: OgreEntity.h:227
Ogre::Real
float Real
Software floating point type.
Definition: OgrePrerequisites.h:70
Ogre::Entity::detachObjectImpl
void detachObjectImpl(MovableObject *pObject)
Internal implementation of detaching a 'child' object of this entity and clear the parent node of the...
Ogre::Entity::_notifyCurrentCamera
void _notifyCurrentCamera(Camera *cam)
Ogre::Entity::setMaterialName
void setMaterialName(const String &name, const String &groupName=ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME)
Sets the material to use for the whole of this entity.
Ogre::Entity::EntityShadowRenderable::getWBuffer
HardwareVertexBufferSharedPtr getWBuffer(void)
Definition: OgreEntity.h:342
Ogre::Entity::removeSoftwareAnimationRequest
void removeSoftwareAnimationRequest(bool normalsAlso)
Removes a request for software animation.
Ogre::Entity::mMesh
MeshPtr mMesh
The Mesh that this Entity is based on.
Definition: OgreEntity.h:103
Ogre::EdgeData
This class contains the information required to describe the edge connectivity of a given set of vert...
Definition: OgreEdgeListBuilder.h:53
Ogre::Entity::EntityShadowRenderable::mPositionBuffer
HardwareVertexBufferSharedPtr mPositionBuffer
Shared link to position buffer.
Definition: OgreEntity.h:320
OgreHardwareBufferManager.h
Ogre::Entity::getChildObjectsBoundingBox
AxisAlignedBox getChildObjectsBoundingBox(void) const
Merge all the child object Bounds a return it.
Ogre::Entity::updateAnimation
void updateAnimation(void)
Perform all the updates required for an animated entity.
Ogre::Entity::findBlendedVertexData
const VertexData * findBlendedVertexData(const VertexData *orig)
Internal method - given vertex data which could be from the Mesh or any submesh, finds the temporary ...
Ogre::Node
Class representing a general-purpose node an articulated scene graph.
Definition: OgreNode.h:65
Ogre::Entity::LODEntityList
vector< Entity * >::type LODEntityList
List of LOD Entity instances (for manual LODs).
Definition: OgreEntity.h:254
Ogre::Entity::_getBoneMatrices
const Matrix4 * _getBoneMatrices(void) const
Internal method for retrieving bone matrix information.
Definition: OgreEntity.h:606
OgreString.h
Ogre::Entity::setMaterialLodBias
void setMaterialLodBias(Real factor, ushort maxDetailIndex=0, ushort minDetailIndex=99)
Sets a level-of-detail bias for the material detail of this entity.
Ogre::Entity::mCurrentHWAnimationState
bool mCurrentHWAnimationState
Current state of the hardware animation as represented by the entities parameters.
Definition: OgreEntity.h:214
Ogre::vector
Definition: OgrePrerequisites.h:492
Ogre::Entity::mFrameBonesLastUpdated
unsigned long * mFrameBonesLastUpdated
Records the last frame in which the bones was updated.
Definition: OgreEntity.h:192
Ogre::Entity::getSoftwareAnimationRequests
int getSoftwareAnimationRequests(void) const
Returns the number of requests that have been made for software animation.
Definition: OgreEntity.h:639
Ogre::Entity::tempVertexAnimBuffersBound
bool tempVertexAnimBuffersBound(void) const
Are software vertex animation temp buffers bound?
Ogre::Entity::sharesSkeletonInstance
bool sharesSkeletonInstance() const
Returns whether this entity shares it's SkeltonInstance with other entity instances.
Definition: OgreEntity.h:696
Ogre::Entity::mInitialised
bool mInitialised
Has this entity been initialised yet?
Definition: OgreEntity.h:262
OgreVector3.h
Ogre::Entity::getDisplaySkeleton
bool getDisplaySkeleton(void) const
Returns whether or not the entity is currently displaying its skeleton.
Ogre::Entity::~Entity
~Entity()
Default destructor.
Ogre::Vector3
Standard 3-dimensional vector.
Definition: OgreVector3.h:52
Ogre::Entity::Entity
Entity()
Private constructor (instances cannot be created directly).
Ogre::EntityFactory::getType
const String & getType(void) const
Get the type of the object to be created.
Ogre::RenderQueue
Class to manage the scene object rendering queue.
Definition: OgreRenderQueue.h:93
Ogre::Entity::BIND_ORIGINAL
@ BIND_ORIGINAL
Definition: OgreEntity.h:775
Ogre::Entity::findSubEntityForVertexData
SubEntity * findSubEntityForVertexData(const VertexData *orig)
Internal method - given vertex data which could be from the Mesh or any SubMesh, finds the correspond...
Ogre::Entity::initialisePoseVertexData
void initialisePoseVertexData(const VertexData *srcData, VertexData *destData, bool animateNormals)
When performing software pose animation, initialise software copy of vertex data.

Copyright © 2012 Torus Knot Software Ltd
Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.