SA_Maths
Sapphire Suite's C++ Maths Library
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions | List of all members
SA::TrRotation< T > Struct Template Reference

Transform rotation component. More...

#include <TransformRotation.hpp>

Public Member Functions

 TrRotation ()=default
 Default constructor.
 
 TrRotation (const Quat< T > &_rot) noexcept
 Constructor from Quat.
 
template<typename TOut >
 operator TrRotation< TOut > () const noexcept
 Cast operator.
 

Public Attributes

Quat< T > rotation = Quat<T>::Identity
 Handled rotation.
 

Protected Member Functions

constexpr bool IsZero () const noexcept
 IsZero component implementation.
 
constexpr bool IsIdentity () const noexcept
 IsIdentity component implementation. rotation must be at Quat::Identity for identity transform.
 
constexpr bool Equals (const TrRotation &_other, T _epsilon=std::numeric_limits< T >::epsilon()) const noexcept
 Equals component implementation.
 

Static Protected Member Functions

static TrRotation LerpUnclamped (const TrRotation &_start, const TrRotation &_end, float _alpha) noexcept
 LerpUnclamped component implementation. Use SLerp implementation.
 
template<typename RhsT >
static TrRotation Multiply (const TrRotation &_lhs, const RhsT &_rhs) noexcept
 Transform multiplication implementation for rotation component.
 
template<typename RhsT >
static TrRotation Divide (const TrRotation &_lhs, const RhsT &_rhs) noexcept
 Transform division implementation for rotation component.
 

Detailed Description

template<typename T>
struct SA::TrRotation< T >

Transform rotation component.

Template Parameters
TType of the Quaternion

Constructor & Destructor Documentation

◆ TrRotation()

template<typename T >
SA::TrRotation< T >::TrRotation ( const Quat< T > & _rot)
inlinenoexcept

Constructor from Quat.

Parameters
_rotinput rotation.

Member Function Documentation

◆ Divide()

template<typename T >
template<typename RhsT >
static TrRotation SA::TrRotation< T >::Divide ( const TrRotation< T > & _lhs,
const RhsT & _rhs )
inlinestaticprotectednoexcept

Transform division implementation for rotation component.

Template Parameters
RhsTright-hand side transform type.
Parameters
_lhsleft-hand side transform's rotation component.
_rhsright-hand side transform.
Returns
output rotation component from division.

◆ Equals()

template<typename T >
constexpr bool SA::TrRotation< T >::Equals ( const TrRotation< T > & _other,
T _epsilon = std::numeric_limits<T>::epsilon() ) const
inlineconstexprprotectednoexcept

Equals component implementation.

Parameters
_otherother component to compare to.
_epsilonepsilon max used for comparison.
Returns
Whether this and _other are equal.

◆ IsIdentity()

template<typename T >
constexpr bool SA::TrRotation< T >::IsIdentity ( ) const
inlineconstexprprotectednoexcept

IsIdentity component implementation. rotation must be at Quat::Identity for identity transform.

Returns
rotation.IsZero().

◆ IsZero()

template<typename T >
constexpr bool SA::TrRotation< T >::IsZero ( ) const
inlineconstexprprotectednoexcept

IsZero component implementation.

Returns
rotation.IsZero()

◆ LerpUnclamped()

template<typename T >
static TrRotation SA::TrRotation< T >::LerpUnclamped ( const TrRotation< T > & _start,
const TrRotation< T > & _end,
float _alpha )
inlinestaticprotectednoexcept

LerpUnclamped component implementation. Use SLerp implementation.

Parameters
_startStarting point of the lerp.
_endEnding point of the lerp.
_alphaAlpha of the lerp.
Returns
Interpolated rotation between start and end.

◆ Multiply()

template<typename T >
template<typename RhsT >
static TrRotation SA::TrRotation< T >::Multiply ( const TrRotation< T > & _lhs,
const RhsT & _rhs )
inlinestaticprotectednoexcept

Transform multiplication implementation for rotation component.

Template Parameters
RhsTright-hand side transform type.
Parameters
_lhsleft-hand side transform's rotation component.
_rhsright-hand side transform.
Returns
output rotation component from multiplication.

◆ operator TrRotation< TOut >()

template<typename T >
template<typename TOut >
SA::TrRotation< T >::operator TrRotation< TOut > ( ) const
inlinenoexcept

Cast operator.

Template Parameters
TOutoutput cast type.
Returns
TrPosition<TOut> Casted component.

The documentation for this struct was generated from the following file: