| 160 | } |
| 161 | |
| 162 | void 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 | |
| 186 | void TSThread::transitionToSequence(S32 seq, F32 toPos, F32 duration, bool continuePlay) |
| 187 | { |
no test coverage detected