Struct rtow::hitable::HitPoint
[−]
[src]
pub struct HitPoint { pub t: f64, pub p: Point3<f64>, pub normal: Vector3<f64>, pub material: Material, }
The point of contact between a ray and a material.
Fields
t: f64
the distance along the ray where the contact happens; more specifically, it satisfies the
equation ray.origin + t * ray.direction() = p
.
p: Point3<f64>
the actual 3D contact point.
normal: Vector3<f64>
the normal vector on the material surface in point p
.
material: Material
describes material properties; useful for determining what happens to the ray after contact (is it absorbed/reflected/refracted?).