MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / playAnimation

Method playAnimation

Engine/source/Verve/Torque3D/VAnimation.cpp:114–133  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114void VTorque::playAnimation( SceneObjectType *pObject, const U32 &pThreadIndex, const char *pData )
115{
116 ShapeBase *shape = dynamic_cast<ShapeBase*>( pObject );
117 if ( !shape || !shape->getShape() )
118 {
119 // Sanity!
120 return;
121 }
122
123 // Find Sequence.
124 const S32 sequenceIndex = shape->getShape()->findSequence( pData );
125 if ( sequenceIndex == -1 )
126 {
127 // Invalid Sequence.
128 return;
129 }
130
131 // Play Sequence.
132 shape->setThreadSequence( pThreadIndex, sequenceIndex );
133}
134
135void VTorque::playAnimation( SceneObjectType *pObject, const U32 &pThreadIndex )
136{

Callers

nothing calls this directly

Calls 4

playThreadMethod · 0.80
getShapeMethod · 0.45
findSequenceMethod · 0.45
setThreadSequenceMethod · 0.45

Tested by

no test coverage detected