#[non_exhaustive]pub struct WorldShapeHit {
pub t: Fix128,
pub point: Vec3Fix,
pub normal: Vec3Fix,
pub target: RayTarget,
pub body: Option<usize>,
}Expand description
A hit of PhysicsWorld::cast_sphere or PhysicsWorld::cast_capsule.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.t: Fix128Distance the shape travels along the (normalized) direction before it touches.
point: Vec3FixThe contact point on the collider (the cast shape’s centre for a cast that starts overlapping; see the module conventions).
normal: Vec3FixUnit surface normal of the collider at the contact, toward the cast shape
(−direction for a cast that starts overlapping).
target: RayTargetThe collider hit.
body: Option<usize>The body the hit belongs to, as in crate::shape_raycast::WorldRayHit::body.
Trait Implementations§
Source§impl Clone for WorldShapeHit
impl Clone for WorldShapeHit
impl Copy for WorldShapeHit
Source§impl Debug for WorldShapeHit
impl Debug for WorldShapeHit
impl Eq for WorldShapeHit
Source§impl PartialEq for WorldShapeHit
impl PartialEq for WorldShapeHit
impl StructuralPartialEq for WorldShapeHit
Auto Trait Implementations§
impl Freeze for WorldShapeHit
impl RefUnwindSafe for WorldShapeHit
impl Send for WorldShapeHit
impl Sync for WorldShapeHit
impl Unpin for WorldShapeHit
impl UnsafeUnpin for WorldShapeHit
impl UnwindSafe for WorldShapeHit
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more