Aeon Engine c550894
AeonGames Open Source Game Engine
Loading...
Searching...
No Matches
AeonGames::Matrix3x3 Class Reference

3 by 3 matrix in colum mayor order. More...

#include <aeongames/Matrix3x3.hpp>

Collaboration diagram for AeonGames::Matrix3x3:
Collaboration graph

Public Member Functions

DLL Matrix3x3 ()
 Default constructor.
DLL Matrix3x3 (const Transform &aTransform)
 Constructor.
DLL Matrix3x3 (const float *const aMatrix)
 Construct from a float array.
DLL Matrix3x3 (const std::initializer_list< const float > aList)
 Construct from an initializer list.
DLL const float *const GetMatrix3x3 () const
 Get a pointer to the internal matrix data.
DLL const Matrix3x3 GetInvertedMatrix3x3 ()
 Get the inverted matrix.
DLL Matrix3x3Invert ()
 Invert this matrix in place.
DLL Matrix3x3Rotate (float angle, float x, float y, float z)
 Apply a rotation to this matrix.

Operators

float mMatrix [9]
 Lineal row mayor matrix.
DLL Matrix3x3operator*= (const Matrix3x3 &lhs)
 Multiply this matrix by another matrix.
DLL const float operator[] (size_t aIndex) const
 Access a matrix element by index.
static DLL const Matrix3x3 GetRotationMatrix (float angle, float x, float y, float z)
 Constructs the rotation matrix defined by the axis-angle provided.

Detailed Description

3 by 3 matrix in colum mayor order.

Definition at line 32 of file Matrix3x3.hpp.

Constructor & Destructor Documentation

◆ Matrix3x3() [1/4]

AeonGames::Matrix3x3::Matrix3x3 ( )

Default constructor.

Definition at line 25 of file Matrix3x3.cpp.

◆ Matrix3x3() [2/4]

AeonGames::Matrix3x3::Matrix3x3 ( const Transform & aTransform)

Constructor.

Parameters
aTransformTransform from which to initialize the matrix. Only Scale and Rotation are used.

Definition at line 27 of file Matrix3x3.cpp.

◆ Matrix3x3() [3/4]

AeonGames::Matrix3x3::Matrix3x3 ( const float *const aMatrix)

Construct from a float array.

Parameters
aMatrixPointer to a float array of at least 9 elements in column-major order.

Definition at line 31 of file Matrix3x3.cpp.

◆ Matrix3x3() [4/4]

AeonGames::Matrix3x3::Matrix3x3 ( const std::initializer_list< const float > aList)

Construct from an initializer list.

Parameters
aListInitializer list of float values for the matrix elements.

Definition at line 36 of file Matrix3x3.cpp.

Member Function Documentation

◆ GetInvertedMatrix3x3()

const Matrix3x3 AeonGames::Matrix3x3::GetInvertedMatrix3x3 ( )

Get the inverted matrix.

Returns
A new Matrix3x3 that is the inverse of this matrix.

Definition at line 56 of file Matrix3x3.cpp.

◆ GetMatrix3x3()

const float *const AeonGames::Matrix3x3::GetMatrix3x3 ( ) const

Get a pointer to the internal matrix data.

Returns
Pointer to the 9 float elements of the matrix.

Definition at line 45 of file Matrix3x3.cpp.

◆ GetRotationMatrix()

const Matrix3x3 AeonGames::Matrix3x3::GetRotationMatrix ( float angle,
float x,
float y,
float z )
static

Constructs the rotation matrix defined by the axis-angle provided.

The Matrix returned is a 3x3 matrix constructed using the same formula glRotate* uses.

Parameters
angle[in] Angle in degrees of rotation.
x[in] X element of axis of rotation.
y[in] Y element of axis of rotation.
z[in] Z element of axis of rotation.
Returns
Rotation matrix.

Definition at line 101 of file Matrix3x3.cpp.

◆ Invert()

Matrix3x3 & AeonGames::Matrix3x3::Invert ( )

Invert this matrix in place.

Returns
Reference to this matrix after inversion.

Definition at line 50 of file Matrix3x3.cpp.

◆ operator*=()

Matrix3x3 & AeonGames::Matrix3x3::operator*= ( const Matrix3x3 & lhs)

Multiply this matrix by another matrix.

Definition at line 69 of file Matrix3x3.cpp.

◆ operator[]()

const float AeonGames::Matrix3x3::operator[] ( size_t aIndex) const

Access a matrix element by index.

Definition at line 95 of file Matrix3x3.cpp.

◆ Rotate()

Matrix3x3 & AeonGames::Matrix3x3::Rotate ( float angle,
float x,
float y,
float z )

Apply a rotation to this matrix.

Parameters
angleAngle in degrees of rotation.
xX component of the axis of rotation.
yY component of the axis of rotation.
zZ component of the axis of rotation.
Returns
Reference to this matrix after rotation.

Definition at line 61 of file Matrix3x3.cpp.

Member Data Documentation

◆ mMatrix

float AeonGames::Matrix3x3::mMatrix[9]
protected

Lineal row mayor matrix.

Definition at line 89 of file Matrix3x3.hpp.


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