Kinect.KinectManager.MapDepthPointToSpaceCoords C# (CSharp) Method

MapDepthPointToSpaceCoords() public method

Returns the space coordinates of a depth-map point, or Vector3.zero if the sensor is not initialized
public MapDepthPointToSpaceCoords ( Vector2 posPoint, ushort depthValue, bool bWorldCoords ) : Vector3
posPoint UnityEngine.Vector2 Depth point coordinates
depthValue ushort Depth value
bWorldCoords bool If set to true, applies the sensor height and angle to the space coordinates.
return UnityEngine.Vector3
        public Vector3 MapDepthPointToSpaceCoords(Vector2 posPoint, ushort depthValue, bool bWorldCoords)
        {
            Vector3 posKinect = Vector3.zero;

            if (kinectInitialized)
            {
                posKinect = KinectInterop.MapDepthPointToSpaceCoords(sensorData, posPoint, depthValue);

                if (bWorldCoords)
                {
                    posKinect = kinectToWorld.MultiplyPoint3x4(posKinect);
                }
            }

            return posKinect;
        }
KinectManager