|
GREM 3.12.0
Game/Rendering Engine Modules for C++
|
Result of a raycast hit. 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::RayHit< N, Scalar > | in (OtherUnitT unit) const noexcept |
| Convert this physical ray hit to a unitless ray hit given a desired unit. | |
Static Public Member Functions | |
| template<typename T> | |
| static GREM_ALWAYS_INLINE constexpr RayHit | reinterpret (const grem::RayHit< N, T > &hit) noexcept |
| Reinterpret a unitless ray hit as a physical ray hit in default units. | |
Public Attributes | |
| Length< N > | localOffset |
| Offset from the object's center of mass in shape-local space at which the hit occured. | |
| Distance | distance |
| Distance from the ray origin, along the ray direction, at which the hit occured. | |
| Direction< N > | normal |
| Unit normal vector of the surface that was hit. | |
Static Public Attributes | |
| static constexpr Unit | UNIT {} |
| Unit. | |
| static constexpr DimensionType | DIMENSION {} |
| Unit dimension. | |
| static constexpr MagnitudeType | MAGNITUDE {} |
| Unit magnitude. | |
Result of a raycast hit.
| N | number of dimensions of the world space (must be 2 or 3). |
| using grem::physics::RayHit< N >::Unit = typename Position<N>::Unit |
Unit type.
| using grem::physics::RayHit< N >::DimensionType = typename Unit::DimensionType |
Unit dimension type.
| using grem::physics::RayHit< N >::MagnitudeType = typename Unit::MagnitudeType |
Unit magnitude type.
|
inlinestaticnodiscardconstexprnoexcept |
Reinterpret a unitless ray hit as a physical ray hit in default units.
| hit | ray hit to reinterpret. |
|
inlinenodiscardconstexprnoexcept |
Convert this physical ray hit to a unitless ray hit given a desired unit.
| unit | unit to get the ray hit in. |
|
staticconstexpr |
Unit.
|
staticconstexpr |
Unit dimension.
|
staticconstexpr |
Unit magnitude.
| Length<N> grem::physics::RayHit< N >::localOffset |
Offset from the object's center of mass in shape-local space at which the hit occured.
| Distance grem::physics::RayHit< N >::distance |
Distance from the ray origin, along the ray direction, at which the hit occured.
| Direction<N> grem::physics::RayHit< N >::normal |
Unit normal vector of the surface that was hit.