예제 #1
0
 public HumanPose(uint version)
 {
     if (version < AssetCabinet.VERSION_5_4_1)
     {
         m_RootX          = new xform(new Vector4(), Quaternion.Identity, new Vector4(1, 1, 1, 1));
         m_LookAtPosition = new Vector4();
     }
     else
     {
         m_RootX          = new xform(new Vector3(), Quaternion.Identity, new Vector3(1, 1, 1));
         m_LookAtPosition = new Vector3();
     }
     m_LookAtWeight  = new Vector4();
     m_GoalArray     = new List <HumanGoal>(new HumanGoal[] { new HumanGoal(version), new HumanGoal(version), new HumanGoal(version), new HumanGoal(version) });
     m_LeftHandPose  = new HandPose(version);
     m_RightHandPose = new HandPose(version);
     m_DoFArray      = new float[52];
     m_TDoFArray     = new object[7];
 }
예제 #2
0
        public void LoadFrom(Stream stream)
        {
            BinaryReader reader = new BinaryReader(stream);

            m_RootX          = new xform(stream);
            m_LookAtPosition = reader.ReadVector4();
            m_LookAtWeight   = reader.ReadVector4();

            int numGoals = reader.ReadInt32();

            m_GoalArray = new List <HumanGoal>(numGoals);
            for (int i = 0; i < numGoals; i++)
            {
                m_GoalArray.Add(new HumanGoal(stream));
            }

            m_LeftHandPose  = new HandPose(stream);
            m_RightHandPose = new HandPose(stream);

            int numDoFs = reader.ReadInt32();

            m_DoFArray = reader.ReadSingleArray(numDoFs);
        }