A ray that extends infinitely from the provided origin in the provided direction.
More...
#include <CesiumGeometry/Ray.h>
|
| Ray (const glm::dvec3 &origin, const glm::dvec3 &direction) |
| Construct a new ray. More...
|
|
const glm::dvec3 & | getOrigin () const noexcept |
| Gets the origin of the ray.
|
|
const glm::dvec3 & | getDirection () const noexcept |
| Gets the direction of the ray.
|
|
glm::dvec3 | pointFromDistance (double distance) const noexcept |
| Calculates a point on the ray that corresponds to the given distance from origin. Can be positive, negative, or 0. More...
|
|
Ray | transform (const glm::dmat4x4 &transformation) const noexcept |
| Transforms the ray using a given 4x4 transformation matrix. More...
|
|
Ray | operator- () const noexcept |
| Constructs a new ray with its direction opposite this one.
|
|
A ray that extends infinitely from the provided origin in the provided direction.
Definition at line 14 of file Ray.h.
◆ Ray()
CesiumGeometry::Ray::Ray |
( |
const glm::dvec3 & |
origin, |
|
|
const glm::dvec3 & |
direction |
|
) |
| |
Construct a new ray.
- Parameters
-
origin | The origin of the ray. |
direction | The direction of the ray (normalized). |
- Exceptions
-
std::exception | direction must be normalized. |
◆ pointFromDistance()
glm::dvec3 CesiumGeometry::Ray::pointFromDistance |
( |
double |
distance | ) |
const |
|
noexcept |
Calculates a point on the ray that corresponds to the given distance from origin. Can be positive, negative, or 0.
- Parameters
-
distance | Desired distance from origin |
- Returns
- The point along the ray.
◆ transform()
Ray CesiumGeometry::Ray::transform |
( |
const glm::dmat4x4 & |
transformation | ) |
const |
|
noexcept |
Transforms the ray using a given 4x4 transformation matrix.
- Parameters
-
transformation | The 4x4 transformation matrix used to transform the ray. |
- Returns
- The transformed ray.
The documentation for this class was generated from the following file:
- /home/runner/work/cesium-native/cesium-native/CesiumGeometry/include/CesiumGeometry/Ray.h