[][src]Function gvr_sys::gvr_compute_distorted_point

pub unsafe extern "C" fn gvr_compute_distorted_point(
    gvr: *const gvr_context,
    eye: i32,
    uv_in: gvr_vec2f,
    uv_out: *mut gvr_vec2f
)

Computes the distorted point for a given point in a given eye. The distortion inverts the optical distortion caused by the lens for the eye. Due to chromatic aberration, the distortion is different for each color channel.

@param gvr Pointer to the gvr instance which will do the computing. @param eye The gvr_eye type (left or right). @param uv_in A point in screen eye Viewport Space in [0,1]^2 with (0, 0) in the lower left corner of the eye's viewport and (1, 1) in the upper right corner of the eye's viewport. @param uv_out A pointer to an array of (at least) 3 elements, with each element being a Point2f representing a point in render texture eye Viewport Space in [0,1]^2 with (0, 0) in the lower left corner of the eye's viewport and (1, 1) in the upper right corner of the eye's viewport. uv_out[0] is the corrected position of uv_in for the red channel uv_out[1] is the corrected position of uv_in for the green channel uv_out[2] is the corrected position of uv_in for the blue channel