|
sandbox
|
3D ray with normalized direction. More...
#include <ray.hpp>
Public Member Functions | |
| ray () | |
| Constructs a default ray. More... | |
| ray (const vector3 &origin, const vector3 &direction) | |
| Constructs a ray from an origin and a direction. More... | |
| auto | origin () const -> const vector3 & |
| Returns the ray origin. More... | |
| auto | direction () const -> const vector3 & |
| Returns the ray direction. More... | |
| auto | point_at (const std::float_t t) const -> vector3 |
| Computes a point along the ray at parameter t. More... | |
3D ray with normalized direction.
A ray is defined by an origin and a direction. The direction is normalized upon construction to guarantee a unit-length direction vector.
| sbx::math::ray::ray | ( | ) |
Constructs a default ray.
Constructs a ray from an origin and a direction.
| origin | Ray origin. |
| direction | Ray direction (normalized internally). |
| auto sbx::math::ray::direction | ( | ) | const -> const vector3& |
Returns the ray direction.
| auto sbx::math::ray::origin | ( | ) | const -> const vector3& |
Returns the ray origin.
| auto sbx::math::ray::point_at | ( | const std::float_t | t | ) | const -> vector3 |
Computes a point along the ray at parameter t.
| t | Ray parameter. |