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

Method setSequence

Engine/source/ts/tsThread.cpp:162–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160}
161
162void TSThread::setSequence(S32 seq, F32 toPos)
163{
164 const TSShape * shape = mShapeInstance->mShape;
165
166 AssertFatal(shape && shape->sequences.size()>seq && toPos>=0.0f && toPos<=1.0f,
167 "TSThread::setSequence: invalid shape handle, sequence number, or position.");
168
169 mShapeInstance->clearTransition(this);
170
171 sequence = seq;
172 priority = getSequence()->priority;
173 mSeqPos = toPos;
174 makePath = getSequence()->makePath();
175 path.start = path.end = 0;
176 path.loop = 0;
177
178 // 1.0f doesn't exist on cyclic sequences
179 if (mSeqPos>0.9999f && getSequence()->isCyclic())
180 mSeqPos = 0.9999f;
181
182 // select keyframes
183 selectKeyframes(mSeqPos,getSequence(),&keyNum1,&keyNum2,&keyPos);
184}
185
186void TSThread::transitionToSequence(S32 seq, F32 toPos, F32 duration, bool continuePlay)
187{

Callers 15

initAnimationThreadMethod · 0.45
onAddMethod · 0.45
setAnimClipMethod · 0.45
initAnimationThreadMethod · 0.45
advancePosMethod · 0.45
onNewDataBlockMethod · 0.45
setThreadSequenceMethod · 0.45
playBlendAnimationMethod · 0.45
_initAnimationMethod · 0.45
processTickMethod · 0.45
onAddMethod · 0.45
advanceTimeMethod · 0.45

Calls 6

clearTransitionMethod · 0.80
makePathMethod · 0.80
sizeMethod · 0.45
isCyclicMethod · 0.45
animatesScaleMethod · 0.45
getSequenceMethod · 0.45

Tested by

no test coverage detected