pub type IPLBatchedAnyHitCallback = Option<unsafe extern "C" fn(numRays: IPLint32, rays: *const IPLRay, minDistances: *const IPLfloat32, maxDistances: *const IPLfloat32, occluded: *mut IPLuint8, userData: *mut c_void)>;Expand description
Callback for calculating for each ray in a batch of rays, whether the ray hits any geometry.
Strictly speaking, the intersection is calculated with a ray interval (equivalent to a line segment).
\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. If, for some ray with index \c i,
maxDistances[i] is less than minDistances[i], the function should ignore the
ray and set occluded[i] to 1.
\param occluded [out] Array of integers indicating, for each ray, whether the ray intersects any
geometry. 0 indicates no intersection, 1 indicates that an intersection exists.
\param userData Pointer to a block of memory containing arbitrary data, specified during the call to
\c iplSceneCreate.
Aliased Type§
pub enum IPLBatchedAnyHitCallback {
None,
Some(unsafe extern "C" fn(i32, *const IPLRay, *const f32, *const f32, *mut u8, *mut c_void)),
}