#[repr(C)]pub struct b3BodyCastResult {
pub shapeId: b3ShapeId,
pub point: b3Pos,
pub normal: b3Vec3,
pub fraction: f32,
pub triangleIndex: c_int,
pub userMaterialId: u64,
pub iterations: c_int,
pub hit: bool,
}Expand description
Body cast result for ray and shape casts.
Fields§
§shapeId: b3ShapeIdThe shape hit.
point: b3PosThe world point on the shape surface.
normal: b3Vec3The world normal vector on the shape surface.
fraction: f32The fraction along the ray hit. hit point = origin + fraction * translation
triangleIndex: c_intThe triangle index if the shape is a mesh or height-field.
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.
iterations: c_intThe number of iterations used. Diagnostic.
hit: boolDid the cast hit? If false, all other fields are invalid.
Trait Implementations§
Source§impl Clone for b3BodyCastResult
impl Clone for b3BodyCastResult
Source§fn clone(&self) -> b3BodyCastResult
fn clone(&self) -> b3BodyCastResult
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 b3BodyCastResult
Auto Trait Implementations§
impl Freeze for b3BodyCastResult
impl RefUnwindSafe for b3BodyCastResult
impl Send for b3BodyCastResult
impl Sync for b3BodyCastResult
impl Unpin for b3BodyCastResult
impl UnsafeUnpin for b3BodyCastResult
impl UnwindSafe for b3BodyCastResult
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