pub struct Hit3<T> {
pub point: Point3<T>,
pub distance: T,
pub normal: Vec3<T>,
pub index: usize,
pub side: HitSide,
}
Expand description
Hit3 structure.
Represents an intersection point between a ray and a shape.
Fields§
§point: Point3<T>
The point of intersection.
distance: T
The distance from the ray’s origin to the intersection point.
normal: Vec3<T>
The surface normal at the intersection point.
This vector can be assumed to be normalized.
index: usize
Index of the shape that was hit, if applicable.
side: HitSide
Side of the hit (entry or exit).
Trait Implementations§
impl<T: Copy> Copy for Hit3<T>
impl<T> StructuralPartialEq for Hit3<T>
Auto Trait Implementations§
impl<T> Freeze for Hit3<T>where
T: Freeze,
impl<T> RefUnwindSafe for Hit3<T>where
T: RefUnwindSafe,
impl<T> Send for Hit3<T>where
T: Send,
impl<T> Sync for Hit3<T>where
T: Sync,
impl<T> Unpin for Hit3<T>where
T: Unpin,
impl<T> UnwindSafe for Hit3<T>where
T: UnwindSafe,
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