pub type b3CastResultFcn = Option<unsafe extern "C" fn(shapeId: b3ShapeId, point: b3Pos, normal: b3Vec3, fraction: f32, userMaterialId: u64, triangleIndex: c_int, childIndex: c_int, context: *mut c_void) -> f32>;Expand description
Prototype callback for ray casts. Called for each shape found in the query. You control how the ray cast proceeds by returning a float: return -1: ignore this shape and continue return 0: terminate the ray cast return fraction: clip the ray to this point return 1: don’t clip the ray and continue @param shapeId the shape hit by the ray @param point the point of initial intersection @param normal the normal vector at the point of intersection @param fraction the fraction along the ray at the point of intersection @param userMaterialId the shape or triangle surface type @param triangleIndex the triangle index for mesh or height field shapes or -1 for other shape types @param childIndex the child shape index for compound shapes @param context the user context @return -1 to filter, 0 to terminate, fraction to clip the ray for closest hit, 1 to continue @see b3World_CastRay @ingroup world
Aliased Type§
pub enum b3CastResultFcn {
None,
Some(unsafe extern "C" fn(b3ShapeId, b3Vec3, b3Vec3, f32, u64, i32, i32, *mut c_void) -> f32),
}