예제 #1
0
 public void Write(TextWriter writer)
 {
     foreach (CompositeElement joint in m_bvh.JointList)
     {
         JointFrame a = m_map[joint.Name];
         foreach (string channel in joint.Channels.ChannelList)
         {
             writer.Write("{0} ", a.GetValue(channel));
         }
     }
     writer.WriteLine();
 }
예제 #2
0
        private FrameElement ConvertFrame(BVH dest, FrameElement srcFrame)
        {
            FrameElement destFrame = new FrameElement(dest);

            foreach (CompositeElement joint in dest.JointList)
            {
                JointFrame jfDest = destFrame.GetJointFrame(joint.Name);
                JointFrame jfSrc  = srcFrame.GetJointFrame(GetSrcJointName(joint.Name));
                if (jfSrc == null)
                {
                    continue;
                }

                foreach (string channel in new string[] { "Zrotation", "Xrotation", "Yrotation" })
                {
                    jfDest.SetValue(channel, jfSrc.GetValue(channel));
                }

                ConvertJointFrame(jfDest, joint.Name, srcFrame);
            }
            return(destFrame);
        }