SA_Maths
Sapphire Suite's C++ Maths Library
|
Transform Sapphire's class. More...
#include <Transform.hpp>
Public Types | |
using | Type = T |
Transform type alias. | |
Public Member Functions | |
bool | IsZero () const noexcept |
Whether this transform is a zero transform. | |
bool | IsIdentity () const noexcept |
Whether this transform is an identity transform. | |
bool | Equals (const Tr &_other, T _epsilon=std::numeric_limits< T >::epsilon()) const noexcept |
Compare 2 transform. | |
bool | operator== (const Tr &_rhs) const noexcept |
Compare 2 transform equality. | |
bool | operator!= (const Tr &_rhs) const noexcept |
Compare 2 transform inequality. | |
template<typename TrFunc = TrRotateAxisFunctor> | |
Vec3< T > | Right (TrFunc _functor=TrFunc()) const |
Getter of right vector (X axis) of this transform. | |
template<typename TrFunc = TrRotateAxisFunctor> | |
Vec3< T > | Up (TrFunc _functor=TrFunc()) const |
Getter of up vector (Y axis) of this transform. | |
template<typename TrFunc = TrRotateAxisFunctor> | |
Vec3< T > | Forward (TrFunc _functor=TrFunc()) const |
Getter of forward vector (Z axis) of this transform. | |
template<typename TrFunc = TrTRSMatrixFunctor> | |
Mat4< T > | Matrix (TrFunc _functor=TrFunc()) const noexcept |
Compute matrix from transform Use default TRS order application. | |
template<template< typename > typename... InArgs> | |
Tr | operator* (const Tr< T, InArgs... > &_rhs) const |
Multiply transform to compute transformation. | |
template<template< typename > typename... InArgs> | |
Tr | operator/ (const Tr< T, InArgs... > &_rhs) const |
Divide transform to compute inverse-transformation. | |
template<template< typename > typename... InArgs> | |
Tr & | operator*= (const Tr< T, InArgs... > &_rhs) |
Multiply transform to compute transformation. | |
template<template< typename > typename... InArgs> | |
Tr & | operator/= (const Tr< T, InArgs... > &_rhs) |
Divide transform to compute inverse-transformation. | |
template<typename TOut , template< typename > typename... ArgsOut> | |
operator Tr< TOut, ArgsOut... > () const noexcept | |
Cast operator into other Transf type. | |
Static Public Member Functions | |
template<template< typename > typename Comp> | |
static constexpr bool | HasComponent () noexcept |
compile-time HasComponent. | |
static Tr | Lerp (const Tr &_start, const Tr &_end, float _alpha) noexcept |
Clamped Lerp from _start to _end at _alpha. | |
static Tr | LerpUnclamped (const Tr &_start, const Tr &_end, float _alpha) noexcept |
Unclamped Lerp from _start to _end at _alpha. | |
Transform Sapphire's class.
T | Transform type. |
Args | Transform component types. |
|
noexcept |
Compare 2 transform.
[in] | _other | Other transform to compare to. |
[in] | _epsilon | Epsilon value for threshold comparison. |
Vec3< T > SA::Tr< T, Args >::Forward | ( | TrFunc | _functor = TrFunc() | ) | const |
Getter of forward vector (Z axis) of this transform.
|
staticconstexprnoexcept |
compile-time HasComponent.
Comp | Transform Component type |
|
noexcept |
Whether this transform is an identity transform.
|
noexcept |
Whether this transform is a zero transform.
|
staticnoexcept |
Clamped Lerp from _start to _end at _alpha.
Reference: https://en.wikipedia.org/wiki/Linear_interpolation
_start | Starting point of the lerp. |
_end | Ending point of the lerp. |
_alpha | Alpha of the lerp. |
|
staticnoexcept |
Unclamped Lerp from _start to _end at _alpha.
Reference: https://en.wikipedia.org/wiki/Linear_interpolation
_start | Starting point of the lerp. |
_end | Ending point of the lerp. |
_alpha | Alpha of the lerp. |
|
noexcept |
Compute matrix from transform Use default TRS order application.
|
noexcept |
Cast operator into other Transf type.
TOut | Type of the casted transform. |
ArgsOut | Args Type of the casted transform. |
|
noexcept |
Compare 2 transform inequality.
[in] | _rhs | Other transform to compare to. |
Tr SA::Tr< T, Args >::operator* | ( | const Tr< T, InArgs... > & | _rhs | ) | const |
Multiply transform to compute transformation.
[in] | _rhs | Transform to multiply. |
Tr & SA::Tr< T, Args >::operator*= | ( | const Tr< T, InArgs... > & | _rhs | ) |
Multiply transform to compute transformation.
[in] | _rhs | Transform to multiply. |
Tr SA::Tr< T, Args >::operator/ | ( | const Tr< T, InArgs... > & | _rhs | ) | const |
Divide transform to compute inverse-transformation.
[in] | _rhs | Transform to divide. |
Tr & SA::Tr< T, Args >::operator/= | ( | const Tr< T, InArgs... > & | _rhs | ) |
Divide transform to compute inverse-transformation.
[in] | _rhs | Transform to divide. |
|
noexcept |
Compare 2 transform equality.
[in] | _rhs | Other transform to compare to. |
Vec3< T > SA::Tr< T, Args >::Right | ( | TrFunc | _functor = TrFunc() | ) | const |
Getter of right vector (X axis) of this transform.
Vec3< T > SA::Tr< T, Args >::Up | ( | TrFunc | _functor = TrFunc() | ) | const |
Getter of up vector (Y axis) of this transform.