20 #ifndef ANTKEEPER_GEOM_PRIMITIVES_RAY_HPP
21 #define ANTKEEPER_GEOM_PRIMITIVES_RAY_HPP
36 template <
class T, std::
size_t N>
constexpr T sqr_distance(const vector< T, N > &p0, const vector< T, N > &p1) noexcept
Calculates the square distance between two points.
vector< T, N > sqrt(const vector< T, N > &x)
Takes the square root of each element.
constexpr T dot(const quaternion< T > &a, const quaternion< T > &b) noexcept
Calculates the dot product of two quaternions.
Half of a line proceeding from an initial point.
T distance(const vector_type &point) const noexcept
Calculates the distance from the ray to a point.
constexpr vector_type closest_point(const vector_type &point) const noexcept
Calculates the closest point on the ray to a point.
vector_type direction
Ray direction vector.
constexpr T sqr_distance(const vector_type &point) const noexcept
Calculates the square distance from the ray to a point.
constexpr vector_type extrapolate(T distance) const noexcept
Extrapolates from the ray origin along the ray direction vector.
vector_type origin
Ray origin position.