MCPcopy Create free account
hub / github.com/OGRECave/ogre-next / _buildKeyFrameIndexMap

Method _buildKeyFrameIndexMap

OgreMain/src/OgreAnimationTrack.cpp:227–240  ·  view source on GitHub ↗

---------------------------------------------------------------------

Source from the content-addressed store, hash-verified

225 }
226 //---------------------------------------------------------------------
227 void AnimationTrack::_buildKeyFrameIndexMap( const vector<Real>::type &keyFrameTimes )
228 {
229 // Pre-allocate memory
230 mKeyFrameIndexMap.resize( keyFrameTimes.size() + 1 );
231
232 size_t i = 0, j = 0;
233 while( j <= keyFrameTimes.size() )
234 {
235 mKeyFrameIndexMap[j] = static_cast<ushort>( i );
236 while( i < mKeyFrames.size() && mKeyFrames[i]->getTime() <= keyFrameTimes[j] )
237 ++i;
238 ++j;
239 }
240 }
241 //--------------------------------------------------------------------------
242 void AnimationTrack::_applyBaseKeyFrame( const KeyFrame * ) {}
243 //---------------------------------------------------------------------

Callers 1

buildKeyFrameTimeListMethod · 0.80

Calls 3

getTimeMethod · 0.80
resizeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected