#[repr(C)]pub struct b3RayResult {
pub shapeId: b3ShapeId,
pub point: b3Pos,
pub normal: b3Vec3,
pub userMaterialId: u64,
pub fraction: f32,
pub triangleIndex: c_int,
pub childIndex: c_int,
pub nodeVisits: c_int,
pub leafVisits: c_int,
pub hit: bool,
}Expand description
Result from b3World_RayCastClosest.
Fields§
§shapeId: b3ShapeIdThe shape hit.
point: b3PosThe world point of the hit.
normal: b3Vec3The world normal of the shape surface at the hit point.
userMaterialId: u64The user material id at the hit point. This can be per triangle if the shape is a mesh, height-field, or compound with child mesh.
fraction: f32The fraction of the input ray.
triangleIndex: c_intThe triangle index if the shape is a mesh, height-field, or compound with child mesh.
childIndex: c_intThe child index if the shape is a compound.
nodeVisits: c_intThe number of BVH nodes visited. Diagnostic.
leafVisits: c_intThe number of BVH leaves visited. Diagnostic.
hit: boolDid the ray hit? If false, all other data is invalid.
Trait Implementations§
Source§impl Clone for b3RayResult
impl Clone for b3RayResult
Source§fn clone(&self) -> b3RayResult
fn clone(&self) -> b3RayResult
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for b3RayResult
Auto Trait Implementations§
impl Freeze for b3RayResult
impl RefUnwindSafe for b3RayResult
impl Send for b3RayResult
impl Sync for b3RayResult
impl Unpin for b3RayResult
impl UnsafeUnpin for b3RayResult
impl UnwindSafe for b3RayResult
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