Example #1
0
 /// <summary>
 /// Serialize an array of animation curves with tangents as binary data.
 /// </summary>
 public static void WriteFloatCurveArray(BinaryWriter writer, AnimationCurve[] curves, float startTime)
 {
     foreach (AnimationCurve curve in curves)
     {
         InputAnimationSerializationUtils.WriteFloatCurve(writer, curve, startTime);
     }
 }
        private static void PoseCurvesToStream(BinaryWriter writer, PoseCurves curves, float startTime)
        {
            InputAnimationSerializationUtils.WriteFloatCurve(writer, curves.PositionX, startTime);
            InputAnimationSerializationUtils.WriteFloatCurve(writer, curves.PositionY, startTime);
            InputAnimationSerializationUtils.WriteFloatCurve(writer, curves.PositionZ, startTime);

            InputAnimationSerializationUtils.WriteFloatCurve(writer, curves.RotationX, startTime);
            InputAnimationSerializationUtils.WriteFloatCurve(writer, curves.RotationY, startTime);
            InputAnimationSerializationUtils.WriteFloatCurve(writer, curves.RotationZ, startTime);
            InputAnimationSerializationUtils.WriteFloatCurve(writer, curves.RotationW, startTime);
        }