#[non_exhaustive]pub struct WorldRayHit {
pub t: Fix128,
pub point: Vec3Fix,
pub normal: Vec3Fix,
pub target: RayTarget,
pub body: Option<usize>,
}Expand description
A hit of PhysicsWorld::cast_ray and its variants.
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 along the (normalized) direction.
point: Vec3FixWorld-space hit point, origin + direction·t.
normal: Vec3FixUnit normal at the hit (see the module conventions for its side).
target: RayTargetThe collider hit.
body: Option<usize>The body the hit belongs to: the body for RayTarget::Body, the body an
SDF collider is attached to (if any) for RayTarget::Sdf, None for a
static collider.
Trait Implementations§
Source§impl Clone for WorldRayHit
impl Clone for WorldRayHit
impl Copy for WorldRayHit
Source§impl Debug for WorldRayHit
impl Debug for WorldRayHit
impl Eq for WorldRayHit
Source§impl PartialEq for WorldRayHit
impl PartialEq for WorldRayHit
impl StructuralPartialEq for WorldRayHit
Auto Trait Implementations§
impl Freeze for WorldRayHit
impl RefUnwindSafe for WorldRayHit
impl Send for WorldRayHit
impl Sync for WorldRayHit
impl Unpin for WorldRayHit
impl UnsafeUnpin for WorldRayHit
impl UnwindSafe for WorldRayHit
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