pub type IPLBatchedClosestHitCallback = Option<unsafe extern "C" fn(numRays: IPLint32, rays: *const IPLRay, minDistances: *const IPLfloat32, maxDistances: *const IPLfloat32, hits: *mut IPLHit, userData: *mut c_void)>;
Expand description

Callback for calculating the closest hit along a batch of rays.

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 numRays The number of rays to trace. \param rays Array containing the rays. \param minDistances Array containing, for each ray, the minimum distance from the origin at which an intersection may occur for it to be considered. \param maxDistances Array containing, for each ray, the maximum distance from the origin at which an intersection may occur for it to be considered. \param hits [out] Information describing each 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.