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 );
Class encapsulating a set of AnimationState objects.
const Quaternion & getOrientation() const
Retrieve the orientation.
A viewpoint from which the scene will be rendered.
Class encapsulating a standard 4x4 homogeneous matrix.
float Real
Software floating point type.
Utility class to generate a sequentially numbered series of names.
unsigned long mFrameAnimationLastUpdated
const Vector3 & _getDerivedPosition() const
Returns the derived position of the instanced entity including local transform.
SkeletonInstance * mSkeletonInstance
void setTransformLookupNumber(uint16 num)
Sets the transformation look up number.
This is the same technique the old "InstancedGeometry" implementation used (with improvements).
Vector3 mDerivedLocalPosition
static const Vector3 ZERO
static const Matrix4 IDENTITY
Quaternion mOrientation
Object orientation.
A 3D box aligned with the x/y/z axes.
bool mUseLocalTransform
Tells whether to use the local transform parameters.
bool mNeedTransformUpdate
Tells if mFullTransform needs an updated.
Matrix4 mFullLocalTransform
Full world transform.
Represents the state of an animation and the weight of its influence.
Real mMaxScaleLocal
The maximum absolute scale for all dimension.
SkeletonInstance * getSkeleton(void) const
InstancedEntity * mSharedTransformEntity
InstancedEntityVec mSharingPartners
bool hasSkeleton(void) const
bool mNeedAnimTransformUpdate
Tells if the animation world transform needs an update.
Abstract class defining a movable object in a scene.
vector< InstancedEntity * >::type InstancedEntityVec
Stores the master when we're the slave, store our slaves when we're the master.
static NameGenerator msNameGenerator
Incremented count for next name extension.
void visitRenderables(Renderable::Visitor *visitor, bool debugRenderables=false)
Method to allow a caller to abstractly iterate over the Renderable instances that this MovableObject ...
Implementation of a Quaternion, i.e.
InstanceBatch * mBatchOwner
const Vector3 & getScale() const
Retrieve the local scale.
virtual const Matrix4 & _getParentNodeFullTransform(void) const
Returns the world transform of the instanced entity including local transform.
bool isInUse() const
Tells if the entity is in use.
Vector3 mScale
Object scale.
Matrix4 * mBoneWorldMatrices
Visitor object that can be used to iterate over a collection of Renderable instances abstractly...
void _updateRenderQueue(RenderQueue *queue)
Do nothing, InstanceBatch takes care of this.
InstanceBatch forms part of the new Instancing system This is an abstract class that must be derived ...
Standard 3-dimensional vector.
virtual bool isInScene(void) const
Vector3 mPosition
Object position.
Instancing implementation using vertex texture through Vertex Texture Fetch (VTF) This implementation...
Class to manage the scene object rendering queue.
AnimationStateSet * mAnimationState
const Vector3 & getPosition() const
Retrieve the position.
4-dimensional homogeneous vector.
uint16 mTransformLookupNumber
Used in conjunction with bone matrix lookup.
Class representing a general-purpose node an articulated scene graph.
A SkeletonInstance is a single instance of a Skeleton used by a world object.
This is technique requires true instancing hardware support.
InstanceBatch * _getOwner() const
Instancing implementation using vertex texture through Vertex Texture Fetch (VTF) and hardware instan...