Kinect.KinectManager.IsJointTracked C# (CSharp) 메소드

IsJointTracked() 공개 메소드

Determines whether the given joint of the specified user is being tracked.
public IsJointTracked ( Int64 userId, int joint ) : bool
userId Int64 User ID
joint int Joint index
리턴 bool
        public bool IsJointTracked(Int64 userId, int joint)
        {
            if (dictUserIdToIndex.ContainsKey(userId))
            {
                int index = dictUserIdToIndex[userId];

                if (index >= 0 && index < sensorData.bodyCount &&
                    bodyFrame.bodyData[index].bIsTracked != 0)
                {
                    if (joint >= 0 && joint < sensorData.jointCount)
                    {
                        KinectInterop.JointData jointData = bodyFrame.bodyData[index].joint[joint];

                        return ignoreInferredJoints ? (jointData.trackingState == KinectInterop.TrackingState.Tracked) :
                            (jointData.trackingState != KinectInterop.TrackingState.NotTracked);
                    }
                }
            }

            return false;
        }
KinectManager