A 4x4 3D transformation matrix. More...

Public Member Functions

 Matrix3D () noexcept
 Creates an identity matrix. More...
 
 Matrix3D (const Matrix3D &other) noexcept
 Creates a copy of another matrix. More...
 
Matrix3Doperator= (const Matrix3D &other) noexcept
 Copies another matrix. More...
 
 Matrix3D (const Type &m00, const Type &m10, const Type &m20, const Type &m30, const Type &m01, const Type &m11, const Type &m21, const Type &m31, const Type &m02, const Type &m12, const Type &m22, const Type &m32, const Type &m03, const Type &m13, const Type &m23, const Type &m33) noexcept
 Creates a matrix from its raw 4x4 values. More...
 
 Matrix3D (const Type *values) noexcept
 Creates a matrix from an array of 16 raw values. More...
 
 Matrix3D (const AffineTransform &transform) noexcept
 Creates a matrix from a 2D affine transform. More...
 
 Matrix3D (Vector3D< Type > vector) noexcept
 Creates a matrix from a 3D vector translation. More...
 
Matrix3Doperator*= (const Matrix3D &other) noexcept
 Multiplies this matrix by another. More...
 
Matrix3D operator* (const Matrix3D &other) const noexcept
 Multiplies this matrix by another, and returns the result. More...
 
Matrix3D rotated (Vector3D< Type > eulerAngleRadians) const noexcept
 Returns a copy of this matrix after rotation through the Y, X and then Z angles specified by the vector. More...
 

Static Public Member Functions

static Matrix3D fromFrustum (Type left, Type right, Type bottom, Type top, Type nearDistance, Type farDistance) noexcept
 Returns a new matrix from the given frustrum values. More...
 

Public Attributes

Type mat [16]
 The 4x4 matrix values. More...
 

Detailed Description

template<typename Type>
class Matrix3D< Type >

A 4x4 3D transformation matrix.

See also
Vector3D, Quaternion, AffineTransform

Constructor & Destructor Documentation

◆ Matrix3D() [1/6]

template<typename Type >
Matrix3D< Type >::Matrix3D ( )
noexcept

◆ Matrix3D() [2/6]

template<typename Type >
Matrix3D< Type >::Matrix3D ( const Matrix3D< Type > &  other)
noexcept

Creates a copy of another matrix.

References Matrix3D< Type >::mat.

◆ Matrix3D() [3/6]

template<typename Type >
Matrix3D< Type >::Matrix3D ( const Type &  m00,
const Type &  m10,
const Type &  m20,
const Type &  m30,
const Type &  m01,
const Type &  m11,
const Type &  m21,
const Type &  m31,
const Type &  m02,
const Type &  m12,
const Type &  m22,
const Type &  m32,
const Type &  m03,
const Type &  m13,
const Type &  m23,
const Type &  m33 
)
noexcept

Creates a matrix from its raw 4x4 values.

References Matrix3D< Type >::mat.

◆ Matrix3D() [4/6]

template<typename Type >
Matrix3D< Type >::Matrix3D ( const Type *  values)
noexcept

Creates a matrix from an array of 16 raw values.

References Matrix3D< Type >::mat.

◆ Matrix3D() [5/6]

template<typename Type >
Matrix3D< Type >::Matrix3D ( const AffineTransform transform)
noexcept

Creates a matrix from a 2D affine transform.

References Matrix3D< Type >::mat.

◆ Matrix3D() [6/6]

template<typename Type >
Matrix3D< Type >::Matrix3D ( Vector3D< Type >  vector)
noexcept

Creates a matrix from a 3D vector translation.

References Matrix3D< Type >::mat.

Member Function Documentation

◆ operator=()

template<typename Type >
Matrix3D& Matrix3D< Type >::operator= ( const Matrix3D< Type > &  other)
noexcept

Copies another matrix.

References Matrix3D< Type >::mat.

◆ fromFrustum()

template<typename Type >
static Matrix3D Matrix3D< Type >::fromFrustum ( Type  left,
Type  right,
Type  bottom,
Type  top,
Type  nearDistance,
Type  farDistance 
)
staticnoexcept

Returns a new matrix from the given frustrum values.

References Matrix3D< Type >::Matrix3D().

◆ operator*=()

template<typename Type >
Matrix3D& Matrix3D< Type >::operator*= ( const Matrix3D< Type > &  other)
noexcept

Multiplies this matrix by another.

◆ operator*()

template<typename Type >
Matrix3D Matrix3D< Type >::operator* ( const Matrix3D< Type > &  other) const
noexcept

Multiplies this matrix by another, and returns the result.

References Matrix3D< Type >::mat, and Matrix3D< Type >::Matrix3D().

◆ rotated()

template<typename Type >
Matrix3D Matrix3D< Type >::rotated ( Vector3D< Type >  eulerAngleRadians) const
noexcept

Returns a copy of this matrix after rotation through the Y, X and then Z angles specified by the vector.

References Matrix3D< Type >::Matrix3D().

Member Data Documentation

◆ mat

template<typename Type >
Type Matrix3D< Type >::mat[16]

The 4x4 matrix values.

These are stored in the standard OpenGL order.

Referenced by Matrix3D< Type >::Matrix3D(), Matrix3D< Type >::operator*(), and Matrix3D< Type >::operator=().


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