public void ApplyPose(Keyframe pose) { currentPose = pose; SetLocalTranslation(pose.GetTranslation()); poseRot = pose.GetRotation(); UpdateTransform(); }
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(); }