Exemplo n.º 1
0
 public void ApplyPose(Keyframe pose)
 {
     currentPose = pose;
     SetLocalTranslation(pose.GetTranslation());
     poseRot = pose.GetRotation();
     UpdateTransform();
 }
Exemplo n.º 2
0
        private static void SaveKeyframe(Keyframe frame, XmlWriter writer)
        {
            writer.WriteStartElement(TOKEN_KEYFRAME);

            writer.WriteAttributeString(TOKEN_TIME, frame.GetTime().ToString());

            writer.WriteStartElement(TOKEN_KEYFRAME_TRANSLATION);
            writer.WriteAttributeString("x", frame.GetTranslation().x.ToString());
            writer.WriteAttributeString("y", frame.GetTranslation().y.ToString());
            writer.WriteAttributeString("z", frame.GetTranslation().z.ToString());
            writer.WriteEndElement();

            writer.WriteStartElement(TOKEN_KEYFRAME_ROTATION);
            writer.WriteAttributeString("x", frame.GetRotation().x.ToString());
            writer.WriteAttributeString("y", frame.GetRotation().y.ToString());
            writer.WriteAttributeString("z", frame.GetRotation().z.ToString());
            writer.WriteAttributeString("w", frame.GetRotation().w.ToString());
            writer.WriteEndElement();

            writer.WriteEndElement();
        }
Exemplo n.º 3
0
        private static void SaveKeyframe(Keyframe frame, XmlWriter writer)
        {
            writer.WriteStartElement(TOKEN_KEYFRAME);

            writer.WriteAttributeString(TOKEN_TIME, frame.GetTime().ToString());

            writer.WriteStartElement(TOKEN_KEYFRAME_TRANSLATION);
            writer.WriteAttributeString("x", frame.GetTranslation().x.ToString());
            writer.WriteAttributeString("y", frame.GetTranslation().y.ToString());
            writer.WriteAttributeString("z", frame.GetTranslation().z.ToString());
            writer.WriteEndElement();

            writer.WriteStartElement(TOKEN_KEYFRAME_ROTATION);
            writer.WriteAttributeString("x", frame.GetRotation().x.ToString());
            writer.WriteAttributeString("y", frame.GetRotation().y.ToString());
            writer.WriteAttributeString("z", frame.GetRotation().z.ToString());
            writer.WriteAttributeString("w", frame.GetRotation().w.ToString());
            writer.WriteEndElement();

            writer.WriteEndElement();
        }