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

Method writeAnimationTrack

OgreMain/src/OgreSkeletonSerializer.cpp:282–298  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

280 }
281 //---------------------------------------------------------------------
282 void SkeletonSerializer::writeAnimationTrack( const Skeleton *pSkel,
283 const OldNodeAnimationTrack *track )
284 {
285 writeChunkHeader( SKELETON_ANIMATION_TRACK, calcAnimationTrackSize( pSkel, track ) );
286
287 // unsigned short boneIndex : Index of bone to apply to
288 OldBone *bone = (OldBone *)track->getAssociatedNode();
289 unsigned short boneid = bone->getHandle();
290 writeShorts( &boneid, 1 );
291 pushInnerChunk( mStream );
292 // Write all keyframes
293 for( unsigned short i = 0; i < track->getNumKeyFrames(); ++i )
294 {
295 writeKeyFrame( pSkel, track->getNodeKeyFrame( i ) );
296 }
297 popInnerChunk( mStream );
298 }
299 //---------------------------------------------------------------------
300 void SkeletonSerializer::writeKeyFrame( const Skeleton *pSkel, const TransformKeyFrame *key )
301 {

Callers

nothing calls this directly

Calls 4

getAssociatedNodeMethod · 0.80
getNumKeyFramesMethod · 0.80
getNodeKeyFrameMethod · 0.80
getHandleMethod · 0.45

Tested by

no test coverage detected