28 #ifndef __InstancedEntity_H__ 29 #define __InstancedEntity_H__ 130 size_t getTransforms(
Matrix4 *xform )
const;
132 size_t getTransforms3x4(
float *xform )
const;
135 bool findVisible(
Camera *camera )
const;
138 void createSkeletonInstance();
139 void destroySkeletonInstance();
143 void stopSharingTransformAsSlave(
bool notifyMaster );
146 void unlinkTransform(
bool notifyMaster=
true );
152 inline void markTransformDirty();
188 void stopSharingTransform();
192 const String& getMovableType(
void)
const;
195 Real getBoundingRadius(
void)
const;
199 Real getSquaredViewDepth(
const Camera* cam )
const;
202 void _notifyMoved(
void);
203 void _notifyAttached(
Node* parent,
bool isTagPoint =
false );
224 virtual bool _updateAnimation(
void);
232 void setPosition(
const Vector3& position,
bool doUpdate =
true);
237 void setOrientation(
const Quaternion& orientation,
bool doUpdate =
true);
242 void setScale(
const Vector3& scale,
bool doUpdate =
true);
245 Real getMaxScaleCoef()
const;
248 void updateTransforms();
253 void setInUse(
bool used);
257 assert((!mNeedTransformUpdate || !mUseLocalTransform) &&
"Transform data should be updated at this point");
258 return mUseLocalTransform ? mFullLocalTransform :
264 assert((!mNeedTransformUpdate || !mUseLocalTransform) &&
"Transform data should be updated at this point");
265 return mUseLocalTransform ? mDerivedLocalPosition :
266 mParentNode ? mParentNode->_getDerivedPosition() :
Vector3::ZERO;
288 void setCustomParam(
unsigned char idx,
const Vector4 &newParam );
289 const Vector4& getCustomParam(
unsigned char idx );
Abstract class defining a movable object in a scene.
Matrix4 * mBoneWorldMatrices
bool mNeedTransformUpdate
Tells if mFullTransform needs an updated.
Instancing implementation using vertex texture through Vertex Texture Fetch (VTF) and hardware instan...
bool hasSkeleton(void) const
Vector3 mDerivedLocalPosition
Implementation of a Quaternion, i.e.
uint16 mTransformLookupNumber
Used in conjunction with bone matrix lookup.
static const Matrix4 IDENTITY
4-dimensional homogeneous vector.
InstancedEntity * mSharedTransformEntity
void setTransformLookupNumber(uint16 num)
Sets the transformation look up number.
Utility class to generate a sequentially numbered series of names.
static NameGenerator msNameGenerator
Incremented count for next name extension.
float Real
Software floating point type.
Class to manage the scene object rendering queue.
Real mMaxScaleLocal
The maximum absolute scale for all dimension.
InstancedEntityVec mSharingPartners
Quaternion mOrientation
Object orientation.
Matrix4 mFullLocalTransform
Full world transform.
const Vector3 & getPosition() const
Retrieve the position.
void visitRenderables(Renderable::Visitor *visitor, bool debugRenderables=false)
Method to allow a caller to abstractly iterate over the Renderable instances that this MovableObject ...
Class encapsulating a set of AnimationState objects.
bool mUseLocalTransform
Tells whether to use the local transform parameters.
const Quaternion & getOrientation() const
Retrieve the orientation.
const Vector3 & getScale() const
Retrieve the local scale.
Class encapsulating a standard 4x4 homogeneous matrix.
Standard 3-dimensional vector.
InstanceBatch * mBatchOwner
A SkeletonInstance is a single instance of a Skeleton used by a world object.
Visitor object that can be used to iterate over a collection of Renderable instances abstractly...
Class representing a general-purpose node an articulated scene graph.
virtual const Matrix4 & _getParentNodeFullTransform(void) const
Returns the world transform of the instanced entity including local transform.
vector< InstancedEntity * >::type InstancedEntityVec
Stores the master when we're the slave, store our slaves when we're the master.
virtual bool isInScene(void) const
bool isInUse() const
Tells if the entity is in use.
SkeletonInstance * getSkeleton(void) const
A viewpoint from which the scene will be rendered.
InstanceBatch forms part of the new Instancing system This is an abstract class that must be derived ...
Vector3 mScale
Object scale.
SkeletonInstance * mSkeletonInstance
bool mNeedAnimTransformUpdate
Tells if the animation world transform needs an update.
AnimationStateSet * mAnimationState
Vector3 mPosition
Object position.
Instancing implementation using vertex texture through Vertex Texture Fetch (VTF) This implementation...
Represents the state of an animation and the weight of its influence.
This is the same technique the old "InstancedGeometry" implementation used (with improvements).
InstanceBatch * _getOwner() const
A 3D box aligned with the x/y/z axes.
const Vector3 & _getDerivedPosition() const
Returns the derived position of the instanced entity including local transform.
This is technique requires true instancing hardware support.
unsigned long mFrameAnimationLastUpdated
void _updateRenderQueue(RenderQueue *queue)
Do nothing, InstanceBatch takes care of this.
static const Vector3 ZERO