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

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
Last modified Tue Apr 13 2021 08:53:15