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::TrUScale< T > Struct Template Reference

Transform uniform scale component. More...

#include <TransformUScale.hpp>

Public Member Functions

 TrUScale ()=default
 Default constructor.
 
 TrUScale (T _uscale) noexcept
 Constructor from T.
 
template<typename TOut >
 operator TrUScale< TOut > () const noexcept
 Cast operator.
 

Public Attributes

uScale = T(1)
 Handled uniform scale.
 

Protected Member Functions

constexpr bool IsZero () const noexcept
 IsZero component implementation.
 
constexpr bool IsIdentity () const noexcept
 IsIdentity component implementation. uniform scale must == 1 for identity transform.
 
constexpr bool Equals (const TrUScale &_other, T _epsilon=std::numeric_limits< T >::epsilon()) const noexcept
 Equals component implementation.
 

Static Protected Member Functions

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

Detailed Description

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

Transform uniform scale component.

Template Parameters
TType of the scale.

Constructor & Destructor Documentation

◆ TrUScale()

template<typename T >
SA::TrUScale< T >::TrUScale ( T _uscale)
inlinenoexcept

Constructor from T.

Parameters
_uscaleinput uniform scale.

Member Function Documentation

◆ Divide()

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

Transform division implementation for uniform scale component.

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

◆ Equals()

template<typename T >
constexpr bool SA::TrUScale< T >::Equals ( const TrUScale< 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::TrUScale< T >::IsIdentity ( ) const
inlineconstexprprotectednoexcept

IsIdentity component implementation. uniform scale must == 1 for identity transform.

Returns
uScale == T(1)

◆ IsZero()

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

IsZero component implementation.

Returns
uScale == T(0)

◆ LerpUnclamped()

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

LerpUnclamped component implementation.

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

◆ Multiply()

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

Transform multiplication implementation for uniform scale component.

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

◆ operator TrUScale< TOut >()

template<typename T >
template<typename TOut >
SA::TrUScale< T >::operator TrUScale< 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: