pub type IPLClosestHitCallback = Option<unsafe extern "C" fn(ray: *const IPLRay, minDistance: IPLfloat32, maxDistance: IPLfloat32, hit: *mut IPLHit, userData: *mut c_void)>;
Expand description

Callback for calculating the closest hit along a ray.

Strictly speaking, the intersection is calculated with a ray interval (equivalent to a line segment). Any ray interval may have multiple points of intersection with scene geometry; this function must return information about the point of intersection that is closest to the ray’s origin.

\param ray The ray to trace. \param minDistance The minimum distance from the origin at which an intersection may occur for it to be considered. This function must not return any intersections closer to the origin than this value. \param maxDistance The maximum distance from the origin at which an intersection may occur for it to be considered. This function must not return any intersections farther from the origin than this value. \param hit [out] Information describing the ray’s intersection with geometry, if any. \param userData Pointer to a block of memory containing arbitrary data, specified during the call to \c iplSceneCreate.