pub struct HitRecord {
pub p: Point3,
pub normal: Vec3,
pub t: f64,
pub front_face: bool,
pub mat: Option<Arc<dyn Material>>,
}Expand description
Stores the result of a ray–object intersection.
Fields§
§p: Point3Intersection point.
normal: Vec3Surface normal at the intersection (always points against the incident ray).
t: f64Ray parameter at the intersection.
front_face: booltrue if the ray hit the front (outside) face.
mat: Option<Arc<dyn Material>>Material at the hit point (None means no scattering).
Implementations§
Auto Trait Implementations§
impl Freeze for HitRecord
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