Exemplo n.º 1
0
 public Dictionary <Kinect.JointType, Vector3> GetJoints(ulong bodyId)
 {
     if (bodies.TryGetValue(bodyId, out IKinectBody kinectBody))
     {
         KinectBody3D kinectBody3D = (KinectBody3D)kinectBody;
         return(kinectBody3D.joints);
     }
     return(null);
 }
Exemplo n.º 2
0
//TODO: would be better more generic...
    public Vector3 GetPosition(ulong bodyId, Kinect.JointType jointType)
    {
        if (bodies.TryGetValue(bodyId, out IKinectBody kinectBody))
        {
            KinectBody3D kinectBody3D = (KinectBody3D)kinectBody;
            if (kinectBody3D.joints.TryGetValue(jointType, out Vector3 position))
            {
                return(position);
            }
        }
        return(Vector3.zero); //?
    }