private void ReparentArm(Arm arm, Body body)
 {
     arm.shoulder.bone.SetParent(body.spine[body.spine.Length - 1].bone);
     arm.upperArm.bone.SetParent(arm.shoulder.bone);
     arm.lowerArm.bone.SetParent(arm.upperArm.bone);
     arm.hand.wrist.bone.SetParent(arm.lowerArm.bone);
 }
 public void Clear()
 {
     head     = new Head();
     body     = new Body();
     armLeft  = new Arm();
     armRight = new Arm();
     legLeft  = new Leg();
     legRight = new Leg();
 }
Exemple #3
0
        private void DrawArm(Arm arm, Body body)
        {
            // Draw Skeleton
            ConnectBones(arm.lowerArm, arm.hand.wrist);
            ConnectBones(body.spine[body.spine.Length - 1], arm.shoulder);
            ConnectBones(arm.shoulder, arm.upperArm);
            ConnectBones(arm.upperArm, arm.lowerArm);

            // Draw Bones
            DrawHand(arm.hand);

            DrawBone(arm.shoulder, size);
            DrawBone(arm.upperArm, size);
            DrawBone(arm.lowerArm, size);
        }
 void ParentArmToArm(Arm parent, Arm child)
 {
     InsertBoneParent(child.shoulder.bone, parent.shoulder.bone);
     InsertBoneParent(child.upperArm.bone, parent.upperArm.bone);
     InsertBoneParent(child.lowerArm.bone, parent.lowerArm.bone);
 }