Antkeeper  0.0.1
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
math::transform< T > Struct Template Reference

SRT transformation. More...

#include <transform.hpp>

Public Types

using scalar_type = T
 Scalar type. More...
 
using vector_type = vec3< T >
 Vector type. More...
 
using quaternion_type = quat< T >
 Quaternion type. More...
 
using matrix_type = mat4< T >
 Transformation matrix type. More...
 

Public Member Functions

template<class U >
constexpr operator transform< U > () const noexcept
 
constexpr operator matrix_type () const noexcept
 Constructs a matrix representing the transformation. More...
 
constexpr matrix_type matrix () const noexcept
 Constructs a matrix representing the transformation. More...
 

Static Public Member Functions

static constexpr transform identity () noexcept
 Returns an identity transform. More...
 

Public Attributes

vector_type translation
 Translation vector. More...
 
quaternion_type rotation
 Rotation quaternion. More...
 
vector_type scale
 Scale vector. More...
 

Detailed Description

template<class T>
struct math::transform< T >

SRT transformation.

Template Parameters
TScalar type.

Definition at line 35 of file transform.hpp.

Member Typedef Documentation

◆ matrix_type

template<class T >
using math::transform< T >::matrix_type = mat4<T>

Transformation matrix type.

Definition at line 47 of file transform.hpp.

◆ quaternion_type

template<class T >
using math::transform< T >::quaternion_type = quat<T>

Quaternion type.

Definition at line 44 of file transform.hpp.

◆ scalar_type

template<class T >
using math::transform< T >::scalar_type = T

Scalar type.

Definition at line 38 of file transform.hpp.

◆ vector_type

template<class T >
using math::transform< T >::vector_type = vec3<T>

Vector type.

Definition at line 41 of file transform.hpp.

Member Function Documentation

◆ identity()

template<class T >
static constexpr transform math::transform< T >::identity ( )
inlinestaticconstexprnoexcept

Returns an identity transform.

Definition at line 107 of file transform.hpp.

◆ matrix()

template<class T >
constexpr matrix_type math::transform< T >::matrix ( ) const
inlineconstexprnoexcept

Constructs a matrix representing the transformation.

Returns
Transformation matrix.

Definition at line 87 of file transform.hpp.

◆ operator matrix_type()

template<class T >
constexpr math::transform< T >::operator matrix_type ( ) const
inlineexplicitconstexprnoexcept

Constructs a matrix representing the transformation.

Returns
Transformation matrix.

Definition at line 64 of file transform.hpp.

◆ operator transform< U >()

template<class T >
template<class U >
constexpr math::transform< T >::operator transform< U > ( ) const
inlineexplicitconstexprnoexcept

Definition at line 101 of file transform.hpp.

Member Data Documentation

◆ rotation

template<class T >
quaternion_type math::transform< T >::rotation

Rotation quaternion.

Definition at line 53 of file transform.hpp.

◆ scale

template<class T >
vector_type math::transform< T >::scale

Scale vector.

Definition at line 56 of file transform.hpp.

◆ translation

template<class T >
vector_type math::transform< T >::translation

Translation vector.

Definition at line 50 of file transform.hpp.


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