Example #1
0
        public void UpdateJointPosition(Microsoft.Kinect.JointCollection joints, JointType j)
        {
            var seg = new Segment(
                (joints[j].Position.X * this.playerScale) + this.playerCenter.X,
                this.playerCenter.Y - (joints[j].Position.Y * this.playerScale))
            {
                Radius = this.playerBounds.Height * ((j == JointType.Head) ? HeadSize : HandSize) / 2
            };

            this.UpdateSegmentPosition(j, j, seg);
        }
Example #2
0
        public void UpdateBonePosition(Microsoft.Kinect.JointCollection joints, JointType j1, JointType j2)
        {
            var seg = new Segment(
                (joints[j1].Position.X * this.playerScale) + this.playerCenter.X,
                this.playerCenter.Y - (joints[j1].Position.Y * this.playerScale),
                (joints[j2].Position.X * this.playerScale) + this.playerCenter.X,
                this.playerCenter.Y - (joints[j2].Position.Y * this.playerScale))
            {
                Radius = Math.Max(3.0, this.playerBounds.Height * BoneSize) / 2
            };

            this.UpdateSegmentPosition(j1, j2, seg);
        }
Example #3
0
        public void UpdateJointPosition(Microsoft.Kinect.JointCollection joints, JointType j)
        {
            if (j == JointType.HandLeft)
            {
                leftHandPosition = new Point((joints[j].Position.X * this.playerScale) + this.playerCenter.X, (((joints[j].Position.Y * -1) * this.playerScale) + this.playerCenter.Y));
            }
            if (j == JointType.HandRight)
            {
                rightHandPosition = new Point((joints[j].Position.X * this.playerScale) + this.playerCenter.X, (((joints[j].Position.Y * -1) * this.playerScale) + this.playerCenter.Y));
            }
            var seg = new Segment(
                (joints[j].Position.X * this.playerScale) + this.playerCenter.X,
                this.playerCenter.Y - (joints[j].Position.Y * this.playerScale))
            {
                radius = this.playerBounds.Height * ((j == JointType.Head) ? headSize : handSize) / 2
            };

            this.UpdateSegmentPosition(j, j, seg);
        }
Example #4
0
 public void UpdateAllJoints(Microsoft.Kinect.JointCollection joints)
 {
     this.joints = joints;
 }