HitInfo struct

Contains information about a ray intersection hit point.

Used by surface intersection routines to return more than just a single value. Includes the position, traveled ray distance, uv coordinates, the geometric and interpolated shading normals, and a pointer to the intersected surface and underlying material.

Constructors, destructors, conversion operators

HitInfo() defaulted
Default constructor that leaves all members uninitialized.

Public variables

float t
Ray parameter for the hit.
Vec3f p
Hit position.
Vec3f gn
Geometric normal.
Vec3f sn
Interpolated shading normal.
Vec2f uv
UV texture coordinates.
const Material* mat
Material at the hit point.