pub struct RayHit3 {
pub t: f64,
pub triangle: usize,
pub barycentric: [f64; 3],
pub side: FaceSide,
pub point: DVec3,
}Expand description
One nearest-hit record.
Fields§
§t: f64Parametric distance along the supplied (possibly unnormalised) direction.
triangle: usizeIndex of the hit triangle in the source mesh.
barycentric: [f64; 3]Barycentric coordinates (u, v, w) with w = 1 - u - v, ordered to
match the triangle’s stored corner order.
side: FaceSideSide the ray origin was on.
point: DVec3Hit position reconstructed as origin + direction * t.
Trait Implementations§
impl Copy for RayHit3
impl StructuralPartialEq for RayHit3
Auto Trait Implementations§
impl Freeze for RayHit3
impl RefUnwindSafe for RayHit3
impl Send for RayHit3
impl Sync for RayHit3
impl Unpin for RayHit3
impl UnwindSafe for RayHit3
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