41#pragma warning(disable : 26495)
69 constexpr void reset() {
t = std::numeric_limits<float>::infinity(); }
77 inline bool exists()
const {
return std::isfinite(
t); }
Provides various mathematical utilities, vector operations, and custom hash specializations.
Contains mathematical utility functions and classes.
Represents the data of a ray's intersection with an object.
constexpr Intersection()=default
float t
The intersection parameter.
constexpr Intersection(Intersection const &)=default
constexpr Intersection & operator=(Intersection &&)=default
constexpr Intersection & operator=(Intersection const &)=default
bool exists() const
Determines if the intersection exists based on the value of t.
vec3 point
The 3D point of intersection.
constexpr Intersection(Intersection &&)=default
static constexpr Intersection infinite()
Creates and returns an intersection with t set to infinity.
vec3 normal
The 3D normal at the point of intersection.
constexpr void reset()
Resets the intersection data.