pub struct RayResult {
pub shape_id: ShapeId,
pub point: Pos,
pub normal: Vec3,
pub user_material_id: u64,
pub fraction: f32,
pub triangle_index: i32,
pub child_index: i32,
pub node_visits: i32,
pub leaf_visits: i32,
pub hit: bool,
}Expand description
Result from b3World_CastRayClosest. (b3RayResult)
Fields§
§shape_id: ShapeIdThe shape hit.
point: PosThe world point of the hit.
normal: Vec3The world normal of the shape surface at the hit point.
user_material_id: u64The user material id at the hit point.
fraction: f32The fraction of the input ray.
triangle_index: i32The triangle index if the shape is a mesh, height-field, or compound with child mesh.
child_index: i32The child index if the shape is a compound.
node_visits: i32The number of BVH nodes visited. Diagnostic.
leaf_visits: i32The number of BVH leaves visited. Diagnostic.
hit: boolDid the ray hit? If false, all other data is invalid.
Trait Implementations§
impl Copy for RayResult
impl StructuralPartialEq for RayResult
Auto Trait Implementations§
impl Freeze for RayResult
impl RefUnwindSafe for RayResult
impl Send for RayResult
impl Sync for RayResult
impl Unpin for RayResult
impl UnsafeUnpin for RayResult
impl UnwindSafe for RayResult
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more