Example #1
0
        public static float getElbowRoll_Right(Skeleton skeleton)
        {
            // Get fitting joints
            Joint shoulder_j = skeleton.Joints[JointType.ShoulderRight];
            Joint elbow_j    = skeleton.Joints[JointType.ElbowRight];
            Joint hand_j     = skeleton.Joints[JointType.HandRight];

            //Vector of Joints
            Vector3D shoulder = new Vector3D(shoulder_j.Position.X, shoulder_j.Position.Y, shoulder_j.Position.Z);
            Vector3D elbow    = new Vector3D(elbow_j.Position.X, elbow_j.Position.Y, elbow_j.Position.Z);
            Vector3D hand     = new Vector3D(hand_j.Position.X, hand_j.Position.Y, hand_j.Position.Z);

            // Vektorberechnung
            return(AngleCalculation.getAngle(shoulder, elbow, hand));
        }
Example #2
0
        public static float getShoulderRoll_Right(Skeleton skeleton)
        {
            // Get fitting joints
            Joint hip_right_j = skeleton.Joints[JointType.HipRight];
            Joint hip__left_j = skeleton.Joints[JointType.HipLeft];
            Joint shoulder_j  = skeleton.Joints[JointType.ShoulderRight];
            Joint elbow_j     = skeleton.Joints[JointType.ElbowRight];

            //Vector of Joints
            Vector3D hip_right = new Vector3D(hip_right_j.Position.X, hip_right_j.Position.Y, hip_right_j.Position.Z);
            Vector3D hip_left  = new Vector3D(hip__left_j.Position.X, hip__left_j.Position.Y, hip__left_j.Position.Z);
            Vector3D shoulder  = new Vector3D(shoulder_j.Position.X, shoulder_j.Position.Y, shoulder_j.Position.Z);
            Vector3D elbow     = new Vector3D(elbow_j.Position.X, elbow_j.Position.Y, elbow_j.Position.Z);

            // Vektorberechnung
            return(AngleCalculation.getAngle(hip_right, hip_left, shoulder, elbow));
        }