pub unsafe extern "C" fn LeapRectilinearToPixelEx(
    hConnection: LEAP_CONNECTION,
    hDevice: LEAP_DEVICE,
    camera: eLeapPerspectiveType,
    rectilinear: LEAP_VECTOR
) -> LEAP_VECTOR
Expand description

\ingroup Functions Provides the point in the image corresponding to a ray projecting from the camera for a particular device.

Given a ray projected from the camera in the specified direction, LeapRectilinearToPixelEx() corrects for camera distortion and returns the corresponding pixel coordinates in the image.

The ray direction is specified in relationship to the camera. The first vector element is the tangent of the “horizontal” view angle; the second element is the tangent of the “vertical” view angle.

The LeapRectilinearToPixelEx() function returns pixel coordinates outside of the image bounds if you project a ray toward a point for which there is no recorded data.

LeapRectilinearToPixelEx() is typically not fast enough for realtime distortion correction. For better performance, use a shader program executed on a GPU.

@param hConnection The connection handle created by LeapCreateConnection(). @param hDevice A device handle returned by LeapOpenDevice(). @param camera The camera to use, a member of the eLeapPerspectiveType enumeration @param rectilinear A Vector containing the ray direction. @returns A Vector containing the pixel coordinates [x, y, 1] (with z always 1). @since 5.4.0