Represents a ray in 3D space defined by an origin and a direction. Used for raycasting and picking.
More...
#include <src/core/Ray.h>
|
| | Ray (const Vec3 &orig, const Vec3 &dir) |
| | Constructs a ray.
|
| |
| Vec3 | at (float t) const noexcept |
| | Calculates a point along the ray at distance t.
|
| |
Represents a ray in 3D space defined by an origin and a direction. Used for raycasting and picking.
◆ Ray()
| Core::Ray::Ray |
( |
const Vec3 & |
orig, |
|
|
const Vec3 & |
dir |
|
) |
| |
|
inline |
Constructs a ray.
- Parameters
-
| orig | The starting point of the ray. |
| dir | The direction vector (automatically normalized). |
◆ at()
| Vec3 Core::Ray::at |
( |
float |
t | ) |
const |
|
inlinenoexcept |
Calculates a point along the ray at distance t.
- Parameters
-
- Returns
- Point = Origin + (Direction * t)
◆ m_objDirection
| Vec3 Core::Ray::m_objDirection |
◆ m_objPtOrigin
| Vec3 Core::Ray::m_objPtOrigin |
The documentation for this struct was generated from the following file: