public InstanceBone(Bone bone)
 {
     Bone = bone;
     Position = bone.Position;
     RotationMatrix = bone.RotationMatrix;
     Childeren = new List<InstanceBone>();
 }
Ejemplo n.º 2
0
        public Armature(BinaryReader reader)
        {
            Name = reader.ReadString();

            Bones = new Bone[reader.ReadInt32()];
            for (int i = 0; i != Bones.Length; ++i)
            {
                Bones[i] = new Bone(reader);
            }

            // link bones
            foreach (var bone in Bones)
            {
                bone.linkObjects(Bones);
            }
        }
Ejemplo n.º 3
0
 internal void linkObjects(Bone[] bones)
 {
     foreach (var bone in bones)
     {
         if (parentName == bone.Name)
         {
             Parent = bone;
             parentName = null;
             break;
         }
     }
 }