Sen API
Sen Libraries
Loading...
Searching...
No Matches
sen::util::Mat3< T > Class Template Reference

Handles all mathematical ops involving 3D Matrices. More...

#include <mat3.h>

Public Member Functions

 Mat3 ()=default
 ~Mat3 ()=default
 Mat3 (std::initializer_list< std::initializer_list< T > > list)
 Initializer list constructor.
T & operator() (u32 row, u32 col)
 Allows read/write access to the elements of the matrix.
operator() (u32 row, u32 col) const
 Allows read-only access to the elements of the matrix.
void transpose (const Mat3 &value)
 Transforms a matrix into its transpose.
void mult (const Mat3 &lhs, const Mat3 &rhs)
 Performs a matrix multiplication and stores the result in the current instance.
void preMult (const Mat3 &other)
 Pre-multiplies the matrix given as argument to the current instance.
void postMult (const Mat3 &other)
 Post-multiplies the matrix given as argument to the current instance.
Vec3< T > preMult (const Vec3< T > &vec) const noexcept
 Pre-multiplies the vector given as argument to the current instance.
Vec3< T > postMult (const Vec3< T > &vec) const noexcept
 Post-multiplies the vector given as argument to the current instance.
Vec3< T > operator* (const Vec3< T > &vec) const noexcept
 Operator for post-multiplying the matrix by a vector.
Mat3 operator* (const Mat3 &other) const noexcept
 Operator for post-multiplying the matrix by another matrix.
Mat3 operator* (T scalar) const noexcept
 Operator for multiplying the matrix by a constant.
Mat3 operator+ (const Mat3 &other) const noexcept
 Operator for summing the matrix with another matrix.

Static Public Member Functions

static Mat3 makeIdentity ()
 Constructs an identity matrix.
static Mat3 makeFromEulerYPB (const Vec3d &eulerAngles)
 Returns the world to body transformation matrix given the Euler angles.
static Mat3 makeTransposedFromEulerYPB (const Vec3d &eulerAngles)
 Returns the world to body transformation matrix given the Euler angles.
static Mat3 makeOmegaOmegaTranspose (const Vec3d &omega)
 Returns the matrix generated when multiplying the angular velocity vector by its transpose.
static Mat3 makeSkewMatrix (const Vec3d &omega)
 Returns the skew matrix given an angular velocity.

Detailed Description

template<typename T>
class sen::util::Mat3< T >

Handles all mathematical ops involving 3D Matrices.

Constructor & Destructor Documentation

◆ Mat3() [1/2]

template<typename T>
sen::util::Mat3< T >::Mat3 ( )
default

◆ ~Mat3()

template<typename T>
sen::util::Mat3< T >::~Mat3 ( )
default

◆ Mat3() [2/2]

template<typename T>
sen::util::Mat3< T >::Mat3 ( std::initializer_list< std::initializer_list< T > > list)

Initializer list constructor.

Member Function Documentation

◆ makeIdentity()

template<typename T>
Mat3< T > sen::util::Mat3< T >::makeIdentity ( )
static

Constructs an identity matrix.

◆ makeFromEulerYPB()

template<typename T>
Mat3< T > sen::util::Mat3< T >::makeFromEulerYPB ( const Vec3d & eulerAngles)
static

Returns the world to body transformation matrix given the Euler angles.

◆ makeTransposedFromEulerYPB()

template<typename T>
Mat3< T > sen::util::Mat3< T >::makeTransposedFromEulerYPB ( const Vec3d & eulerAngles)
static

Returns the world to body transformation matrix given the Euler angles.

◆ makeOmegaOmegaTranspose()

template<typename T>
Mat3< T > sen::util::Mat3< T >::makeOmegaOmegaTranspose ( const Vec3d & omega)
static

Returns the matrix generated when multiplying the angular velocity vector by its transpose.

◆ makeSkewMatrix()

template<typename T>
Mat3< T > sen::util::Mat3< T >::makeSkewMatrix ( const Vec3d & omega)
static

Returns the skew matrix given an angular velocity.

◆ operator()() [1/2]

template<typename T>
T & sen::util::Mat3< T >::operator() ( u32 row,
u32 col )
inline

Allows read/write access to the elements of the matrix.

◆ operator()() [2/2]

template<typename T>
T sen::util::Mat3< T >::operator() ( u32 row,
u32 col ) const
inline

Allows read-only access to the elements of the matrix.

◆ transpose()

template<typename T>
void sen::util::Mat3< T >::transpose ( const Mat3< T > & value)
inline

Transforms a matrix into its transpose.

◆ mult()

template<typename T>
void sen::util::Mat3< T >::mult ( const Mat3< T > & lhs,
const Mat3< T > & rhs )
inline

Performs a matrix multiplication and stores the result in the current instance.

◆ preMult() [1/2]

template<typename T>
void sen::util::Mat3< T >::preMult ( const Mat3< T > & other)
inline

Pre-multiplies the matrix given as argument to the current instance.

◆ postMult() [1/2]

template<typename T>
void sen::util::Mat3< T >::postMult ( const Mat3< T > & other)
inline

Post-multiplies the matrix given as argument to the current instance.

◆ preMult() [2/2]

template<typename T>
Vec3< T > sen::util::Mat3< T >::preMult ( const Vec3< T > & vec) const
nodiscardnoexcept

Pre-multiplies the vector given as argument to the current instance.

◆ postMult() [2/2]

template<typename T>
Vec3< T > sen::util::Mat3< T >::postMult ( const Vec3< T > & vec) const
inlinenodiscardnoexcept

Post-multiplies the vector given as argument to the current instance.

◆ operator*() [1/3]

template<typename T>
Vec3< T > sen::util::Mat3< T >::operator* ( const Vec3< T > & vec) const
inlinenodiscardnoexcept

Operator for post-multiplying the matrix by a vector.

◆ operator*() [2/3]

template<typename T>
Mat3< T > sen::util::Mat3< T >::operator* ( const Mat3< T > & other) const
inlinenoexcept

Operator for post-multiplying the matrix by another matrix.

◆ operator*() [3/3]

template<typename T>
Mat3< T > sen::util::Mat3< T >::operator* ( T scalar) const
inlinenoexcept

Operator for multiplying the matrix by a constant.

◆ operator+()

template<typename T>
Mat3< T > sen::util::Mat3< T >::operator+ ( const Mat3< T > & other) const
inlinenoexcept

Operator for summing the matrix with another matrix.


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