AnimationComponent
Engine/source/T3D/components/animation/animationComponent.h
Classes:
Public Types
enum
MaskBits { ThreadMaskN = Parent::NextFreeMask << 0 ThreadMask = (ThreadMaskN << MaxScriptThreads) - ThreadMaskN NextFreeMask = ThreadMaskN << MaxScriptThreads }
enum
PublicConstants { ThreadSequenceBits = 6 MaxSequenceIndex = (1 << ThreadSequenceBits) - 1 MaxScriptThreads = 16 }
Private Types
Parent
Protected Attributes
mAnimationThreads [MaxScriptThreads]
Public Functions
advanceThreads(F32 dt)
advanceTime(F32 dt)
componentAddedToOwner(Component * comp)
componentRemovedFromOwner(Component * comp)
DECLARE_CALLBACK(void , onAnimationEnd , (Component *obj, const char *animName) )
DECLARE_CALLBACK(void , onAnimationStart , (Component *obj, const String &animName) )
bool
destroyThread(U32 slot)
getAnimationIndex(const char * name)
const char *
getAnimationName(S32 index)
getThreadSequenceID(S32 slot)
const char *
getThreadSequenceName(U32 slot)
bool
onAdd()
Called when the object is added to the sim.
packUpdate(NetConnection * conn, U32 mask, BitStream * stream)
Instructs this object to pack its state for transfer over the network.
bool
pauseThread(U32 slot)
bool
playThread(U32 slot)
bool
playThread(U32 slot, const char * name, bool transition, F32 transitionTime)
bool
setThreadAnimation(U32 slot, const char * name)
bool
setThreadDir(U32 slot, bool forward)
bool
setThreadPosition(U32 slot, F32 pos)
bool
setThreadSequence(U32 slot, S32 seq, bool reset, bool transition, F32 transitionTime)
bool
setThreadTimeScale(U32 slot, F32 timeScale)
startSequenceSound(Thread & thread)
bool
stopThread(U32 slot)
stopThreadSound(Thread & thread)
targetShapeChanged(RenderComponentInterface * instanceInterface)
unpackUpdate(NetConnection * conn, BitStream * stream)
Instructs this object to read state data previously packed with packUpdate.
updateThread(Thread & st)
Public Static Functions
Detailed Description
Public Types
MaskBits
Enumerator
- ThreadMaskN = Parent::NextFreeMask << 0
- ThreadMask = (ThreadMaskN << MaxScriptThreads) - ThreadMaskN
- NextFreeMask = ThreadMaskN << MaxScriptThreads
PublicConstants
Enumerator
- ThreadSequenceBits = 6
- MaxSequenceIndex = (1 << ThreadSequenceBits) - 1
- MaxScriptThreads = 16
Should be a power of 2.
Private Types
typedef Component Parent
Protected Attributes
Thread mAnimationThreads [MaxScriptThreads]
RenderComponentInterface * mOwnerRenderInst
TSShapeInstance * mOwnerShapeInstance
Public Functions
AnimationComponent()
~AnimationComponent()
advanceThreads(F32 dt)
advanceTime(F32 dt)
Reimplemented from: Component
componentAddedToOwner(Component * comp)
Reimplemented from: Component
componentRemovedFromOwner(Component * comp)
Reimplemented from: Component
DECLARE_CALLBACK(void , onAnimationEnd , (Component *obj, const char *animName) )
DECLARE_CALLBACK(void , onAnimationStart , (Component *obj, const String &animName) )
DECLARE_CALLBACK(void , onAnimationTrigger , (Component *obj, const String &animName, S32 triggerID) )
DECLARE_CONOBJECT(AnimationComponent )
destroyThread(U32 slot)
getAnimationCount()
getAnimationIndex(const char * name)
getAnimationName(S32 index)
getShape()
getThreadSequenceID(S32 slot)
getThreadSequenceName(U32 slot)
onAdd()
Reimplemented from: Component
onComponentAdd()
Reimplemented from: Component
onRemove()
Reimplemented from: Component
packUpdate(NetConnection * conn, U32 mask, BitStream * stream)
Reimplemented from: Component
pauseThread(U32 slot)
playThread(U32 slot)
playThread(U32 slot, const char * name, bool transition, F32 transitionTime)
processTick()
Reimplemented from: Component
setThreadAnimation(U32 slot, const char * name)
setThreadDir(U32 slot, bool forward)
setThreadPosition(U32 slot, F32 pos)
setThreadSequence(U32 slot, S32 seq, bool reset, bool transition, F32 transitionTime)
setThreadTimeScale(U32 slot, F32 timeScale)
startSequenceSound(Thread & thread)
stopThread(U32 slot)
stopThreadSound(Thread & thread)
targetShapeChanged(RenderComponentInterface * instanceInterface)
unpackUpdate(NetConnection * conn, BitStream * stream)
Reimplemented from: Component
updateThread(Thread & st)
