pub struct HitRecord {
    pub world_point: Point,
    pub normal: Normal,
    pub surface_point: Vector2D,
    pub t: f32,
    pub ray: Ray,
    pub material: Material,
}Expand description
Struct used to store the results of RayIntersection.
Fields§
§world_point: PointCoordinates of the point of impact.
normal: NormalNormal of the shape surface on the impact point.
surface_point: Vector2DCoordinates of the point of impact in the frame of reference of the shape’s surface.
t: f32Time the ray travelled before the impact.
ray: RayThe ray that impacted on the shape.
material: MaterialThe Material of the impacted shape
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for HitRecord
impl Send for HitRecord
impl Sync for HitRecord
impl Unpin for HitRecord
impl UnwindSafe for HitRecord
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