6 #include <glm/vec3.hpp>
14 class CESIUMGEOMETRY_API
Ray final {
24 Ray(
const glm::dvec3& origin,
const glm::dvec3& direction);
29 const glm::dvec3&
getOrigin() const noexcept {
return this->_origin; }
34 const glm::dvec3&
getDirection() const noexcept {
return this->_direction; }
61 glm::dvec3 _direction;
A ray that extends infinitely from the provided origin in the provided direction.
glm::dvec3 pointFromDistance(double distance) const noexcept
Calculates a point on the ray that corresponds to the given distance from origin. Can be positive,...
Ray operator-() const noexcept
Constructs a new ray with its direction opposite this one.
Ray transform(const glm::dmat4x4 &transformation) const noexcept
Transforms the ray using a given 4x4 transformation matrix.
Ray(const glm::dvec3 &origin, const glm::dvec3 &direction)
Construct a new ray.
const glm::dvec3 & getOrigin() const noexcept
Gets the origin of the ray.
const glm::dvec3 & getDirection() const noexcept
Gets the direction of the ray.
Basic geometry classes for Cesium.