Ejemplo n.º 1
0
        public void OnDeserialization(object sender)
        {
            Position2D = KinectMath.SkeletonPointToScreen(PositionSkeleton);
            _pos3D     = KinectMath.SkeletonPointToVector3(PositionSkeleton);
            HitBox     = new Rect(new Point(Position2D.X - (BOUNDS / 2), Position2D.Y - (BOUNDS / 2)), new Size(BOUNDS, BOUNDS));

            HierarchicalRotation = new Matrix(_hierArr);
            AbsoluteRotation     = new Matrix(_absArr);
        }
Ejemplo n.º 2
0
        public KinectJoint(Joint joint, BoneOrientation boneOrientation)
        {
            Type             = joint.JointType;
            TrackState       = joint.TrackingState;
            PositionSkeleton = joint.Position;

            Orientation = boneOrientation;

            SetUpMatrices();

            Position2D = KinectMath.SkeletonPointToScreen(joint.Position);
            Position3D = KinectMath.SkeletonPointToVector3(joint.Position);
            HitBox     = new Rect(new Point(Position2D.X - (BOUNDS / 2), Position2D.Y - (BOUNDS / 2)), new Size(BOUNDS, BOUNDS));
        }