SpinParser  1.0
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
geometry::Mat4< T > Struct Template Reference

4x4 dimensional matrix. More...

#include <Geometry.hpp>

Public Member Functions

 Mat4 ()
 Construct a new Mat4 object with uninitialized entries.
 
 Mat4 (const T &m)
 Construct a new Mat4 object and initialize all entries with the same value.
 
 Mat4 (const T &m00, const T &m01, const T &m02, const T &m03, const T &m10, const T &m11, const T &m12, const T &m13, const T &m20, const T &m21, const T &m22, const T &m23, const T &m30, const T &m31, const T &m32, const T &m33)
 Construct a new Mat 4 object and initialize entires. More...
 

Static Public Member Functions

static Mat4< T > identity ()
 Generate a 4x4 identity matrix. More...
 
static Mat4< T > inversion ()
 Generate a spatial inversion operation, acting on a three-dimensional vector with fourth entry of unity. More...
 
static Mat4< T > translation (const Vec3< T > &v)
 Generate a spatial translation operation, acting on a three-dimensional vector with fourth entry of unity. More...
 
static Mat4< T > rotation (const Vec3< T > &axis, T angle)
 Generate a spatial rotation around a specific axis by a specific angle, acting on a three-dimensional vector with fourth entry of unity. More...
 
static Mat4< T > rotation (const Vec3< T > &axis, const Vec3< T > &point, const T &angle)
 Generate a spatial rotation around a specific rotation center and axis by a specific angle, acting on a three-dimensional vector with fourth entry of unity. More...
 

Public Attributes

data [4][4]
 Matrix entries in row-major format.
 

Detailed Description

template<typename T>
struct geometry::Mat4< T >

4x4 dimensional matrix.

Template Parameters
T

Constructor & Destructor Documentation

◆ Mat4()

template<typename T >
geometry::Mat4< T >::Mat4 ( const T &  m00,
const T &  m01,
const T &  m02,
const T &  m03,
const T &  m10,
const T &  m11,
const T &  m12,
const T &  m13,
const T &  m20,
const T &  m21,
const T &  m22,
const T &  m23,
const T &  m30,
const T &  m31,
const T &  m32,
const T &  m33 
)
inline

Construct a new Mat 4 object and initialize entires.

Parameters
m00///< Matrix entry m[0][0].
m01///< Matrix entry m[0][1].
m02///< Matrix entry m[0][2].
m03///< Matrix entry m[0][3].
m10///< Matrix entry m[1][0].
m11///< Matrix entry m[1][1].
m12///< Matrix entry m[1][2].
m13///< Matrix entry m[1][3].
m20///< Matrix entry m[2][0].
m21///< Matrix entry m[2][1].
m22///< Matrix entry m[2][2].
m23///< Matrix entry m[2][3].
m30///< Matrix entry m[3][0].
m31///< Matrix entry m[3][1].
m32///< Matrix entry m[3][2].
m33///< Matrix entry m[3][3].

Member Function Documentation

◆ identity()

template<typename T >
static Mat4<T> geometry::Mat4< T >::identity ( )
inlinestatic

Generate a 4x4 identity matrix.

Returns
Mat4<T> Identity matrix.

◆ inversion()

template<typename T >
static Mat4<T> geometry::Mat4< T >::inversion ( )
inlinestatic

Generate a spatial inversion operation, acting on a three-dimensional vector with fourth entry of unity.

Returns
Mat4<T> Matrix describing spatial inversion.

◆ rotation() [1/2]

template<typename T >
static Mat4<T> geometry::Mat4< T >::rotation ( const Vec3< T > &  axis,
const Vec3< T > &  point,
const T &  angle 
)
inlinestatic

Generate a spatial rotation around a specific rotation center and axis by a specific angle, acting on a three-dimensional vector with fourth entry of unity.

Parameters
axisRotation axis.
pointRotation center.
angleRotation angle.
Returns
Mat4<T> Matrix describing the spatial rotation operation.

◆ rotation() [2/2]

template<typename T >
static Mat4<T> geometry::Mat4< T >::rotation ( const Vec3< T > &  axis,
angle 
)
inlinestatic

Generate a spatial rotation around a specific axis by a specific angle, acting on a three-dimensional vector with fourth entry of unity.

Parameters
axisRotation axis.
angleRotation angle.
Returns
Mat4<T> Matrix describing the spatial rotation operation.

◆ translation()

template<typename T >
static Mat4<T> geometry::Mat4< T >::translation ( const Vec3< T > &  v)
inlinestatic

Generate a spatial translation operation, acting on a three-dimensional vector with fourth entry of unity.

Parameters
vTranslation vector.
Returns
Mat4<T> Matrix describing the spatial translation.

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