public InstanceBone(Bone bone) { Bone = bone; Position = bone.Position; RotationMatrix = bone.RotationMatrix; Childeren = new List<InstanceBone>(); }
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); } }
internal void linkObjects(Bone[] bones) { foreach (var bone in bones) { if (parentName == bone.Name) { Parent = bone; parentName = null; break; } } }