|
template<typename OtherUnitT>
requires (OtherUnitT::DIMENSION == LENGTH) |
| GREM_ALWAYS_INLINE constexpr grem::RaycastResult< N, Scalar > | in (OtherUnitT unit) const |
| | Convert this physical raycast result to a unitless raycast result given a desired unit.
|
| constexpr | ~Variant () |
| | Destructor.
|
| constexpr Variant & | operator= (const Variant &other)=delete |
| | Deleted copy assignment.
|
| constexpr T & | emplace (Args &&... args) |
| | Construct an alternative given its type, destroying the old value.
|
| constexpr void | swap (Variant &other) noexcept(((std::is_nothrow_move_constructible_v< Ts > &&std::is_nothrow_swappable_v< Ts >) &&...)) |
| | Swap this variant's value with that of another.
|
| constexpr index_type | index () const noexcept |
| | Get the alternative index of the currently active value held by the variant.
|
| constexpr bool | valueless_by_exception () const noexcept |
| | Check if the variant is in the valueless by exception state.
|
| constexpr bool | is () const noexcept |
| | Check if the variant currently holds the alternative with the given type.
|
| constexpr T & | as () &noexcept |
| | Access the underlying value with the given type without a safety check.
|
| constexpr T & | get () & |
| | Access the underlying value with the given type.
|
| constexpr T * | get_if () noexcept |
| | Access the underlying value with the given type if it is the currently active alternative.
|
|
| template<typename T> |
| static GREM_ALWAYS_INLINE constexpr RaycastResult | reinterpret (const grem::RaycastResult< N, T > &raycastResult) noexcept |
| | Reinterpret a unitless raycast result as a physical raycast result in default units.
|
| static constexpr decltype(auto) | visit (Visitor &&visitor, V &&variant) |
| | Call a visitor functor with the currently active underlying value of a variant.
|
| static constexpr decltype(auto) | visitIndex (index_type index, Visitor &&visitor) |
| | Call a visitor functor with the type corresponding to a variant index.
|
| static constexpr decltype(auto) | apply (Function &&function) |
| | Call a functor with all alternative types.
|
template<size_t N>
struct grem::physics::RaycastResult< N >
Result of a raycast.
- Template Parameters
-
| N | number of dimensions of the world space (must be 2 or 3). |