MCPcopy Create free account
hub / github.com/OGRECave/ogre / readKeyFrame

Method readKeyFrame

OgreMain/src/OgreSkeletonSerializer.cpp:592–616  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

590 }
591 //---------------------------------------------------------------------
592 void SkeletonSerializer::readKeyFrame(DataStreamPtr& stream, NodeAnimationTrack* track,
593 Skeleton* pSkel)
594 {
595 // float time : The time position (seconds)
596 float time;
597 readFloats(stream, &time, 1);
598
599 TransformKeyFrame *kf = track->createNodeKeyFrame(time);
600
601 // Quaternion rotate : Rotation to apply at this keyframe
602 Quaternion rot;
603 readObject(stream, rot);
604 kf->setRotation(rot);
605 // Vector3 translate : Translation to apply at this keyframe
606 Vector3 trans;
607 readObject(stream, trans);
608 kf->setTranslate(trans);
609 // Do we have scale?
610 if (mCurrentstreamLen > calcKeyFrameSizeWithoutScale(pSkel, kf))
611 {
612 Vector3 scale;
613 readObject(stream, scale);
614 kf->setScale(scale);
615 }
616 }
617 //---------------------------------------------------------------------
618 void SkeletonSerializer::writeSkeletonAnimationLink(const Skeleton* pSkel,
619 const LinkedSkeletonAnimationSource& link)

Callers

nothing calls this directly

Calls 4

createNodeKeyFrameMethod · 0.80
setRotationMethod · 0.80
setTranslateMethod · 0.80
setScaleMethod · 0.45

Tested by

no test coverage detected