Axiom.Serialization.OgreSkeletonSerializer.ReadKeyFrame C# (CSharp) Метод

ReadKeyFrame() защищенный Метод

Reads an animation track section.
protected ReadKeyFrame ( BinaryReader reader, NodeAnimationTrack track ) : void
reader BinaryReader
track NodeAnimationTrack
Результат void
	    protected void ReadKeyFrame( BinaryReader reader, NodeAnimationTrack track )
		{
			float time = ReadFloat( reader );

			// create a new keyframe with the specified length
			TransformKeyFrame keyFrame = track.CreateNodeKeyFrame( time );

			// read orientation
			Quaternion rotate = ReadQuat( reader );
			keyFrame.Rotation = rotate;

			// read translation
			Vector3 translate = ReadVector3( reader );
			keyFrame.Translate = translate;

			// read scale if it is in there
			if ( currentChunkLength >= 50 )
			{
				Vector3 scale = ReadVector3( reader );
				keyFrame.Scale = scale;
			}
			else
			{
				keyFrame.Scale = Vector3.UnitScale;
			}
		}