|
GREM 3.12.0
Game/Rendering Engine Modules for C++
|
Description of a ray. More...
#include <GREM/physics/Shape.hpp>
Public Types | |
| using | Unit = typename Position<N>::Unit |
| Unit type. | |
| using | DimensionType = typename Unit::DimensionType |
| Unit dimension type. | |
| using | MagnitudeType = typename Unit::MagnitudeType |
| Unit magnitude type. | |
Public Member Functions | |
| template<typename OtherUnitT> requires (OtherUnitT::DIMENSION == LENGTH) | |
| GREM_ALWAYS_INLINE constexpr grem::Ray< N, Scalar > | in (OtherUnitT unit) const noexcept |
| Convert this physical ray to a unitless ray given a desired unit. | |
Static Public Member Functions | |
| static constexpr Optional< Ray > | between (Position< N > origin, Position< N > destination) |
| Create a ray between two points. | |
| template<typename T> | |
| static GREM_ALWAYS_INLINE constexpr Ray | reinterpret (const grem::Ray< N, T > &ray) noexcept |
| Reinterpret a unitless ray as a physical ray in default units. | |
Public Attributes | |
| Position< N > | origin |
| Starting position of the ray. | |
| Direction< N > | direction |
| Unit vector pointing in the direction of the ray. | |
| Distance | maxDistance = Distance::MAX |
| Maximum hit distance of the ray. | |
| Scale< N > | directionInverse = Scale<N>{Scalar{1}} / direction |
| Component-wise reciprocal of the ray direction. | |
Static Public Attributes | |
| static constexpr Unit | UNIT {} |
| Unit. | |
| static constexpr DimensionType | DIMENSION {} |
| Unit dimension. | |
| static constexpr MagnitudeType | MAGNITUDE {} |
| Unit magnitude. | |
Description of a ray.
| N | number of dimensions of the world space (must be 2 or 3). |
| using grem::physics::Ray< N >::Unit = typename Position<N>::Unit |
Unit type.
| using grem::physics::Ray< N >::DimensionType = typename Unit::DimensionType |
Unit dimension type.
| using grem::physics::Ray< N >::MagnitudeType = typename Unit::MagnitudeType |
Unit magnitude type.
|
inlinestaticnodiscardconstexpr |
Create a ray between two points.
| origin | starting point of the ray. |
| destination | end point of the ray. |
|
inlinestaticnodiscardconstexprnoexcept |
Reinterpret a unitless ray as a physical ray in default units.
| ray | ray to reinterpret. |
|
inlinenodiscardconstexprnoexcept |
Convert this physical ray to a unitless ray given a desired unit.
| unit | unit to get the ray in. |
|
staticconstexpr |
Unit.
|
staticconstexpr |
Unit dimension.
|
staticconstexpr |
Unit magnitude.
| Position<N> grem::physics::Ray< N >::origin |
Starting position of the ray.
| Direction<N> grem::physics::Ray< N >::direction |
Unit vector pointing in the direction of the ray.
| Distance grem::physics::Ray< N >::maxDistance = Distance::MAX |
Maximum hit distance of the ray.
| Scale<N> grem::physics::Ray< N >::directionInverse = Scale<N>{Scalar{1}} / direction |
Component-wise reciprocal of the ray direction.