raylib-cpp
C++ object-oriented wrapper library for raylib.
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
raylib::Matrix Class Reference

Matrix type (OpenGL style 4x4 - right handed, column major) More...

Public Member Functions

 Matrix (const ::Matrix &mat)
 
 Matrix (float m0=0, float m4=0, float m8=0, float m12=0, float m1=0, float m5=0, float m9=0, float m13=0, float m2=0, float m6=0, float m10=0, float m14=0, float m3=0, float m7=0, float m11=0, float m15=0)
 
Matrix Add (const ::Matrix &right)
 
float GetM0 () const
 Retrieves the m0 value for the object. More...
 
float GetM1 () const
 Retrieves the m1 value for the object. More...
 
float GetM10 () const
 Retrieves the m10 value for the object. More...
 
float GetM11 () const
 Retrieves the m11 value for the object. More...
 
float GetM12 () const
 Retrieves the m12 value for the object. More...
 
float GetM13 () const
 Retrieves the m13 value for the object. More...
 
float GetM14 () const
 Retrieves the m14 value for the object. More...
 
float GetM15 () const
 Retrieves the m15 value for the object. More...
 
float GetM2 () const
 Retrieves the m2 value for the object. More...
 
float GetM3 () const
 Retrieves the m3 value for the object. More...
 
float GetM4 () const
 Retrieves the m4 value for the object. More...
 
float GetM5 () const
 Retrieves the m5 value for the object. More...
 
float GetM6 () const
 Retrieves the m6 value for the object. More...
 
float GetM7 () const
 Retrieves the m7 value for the object. More...
 
float GetM8 () const
 Retrieves the m8 value for the object. More...
 
float GetM9 () const
 Retrieves the m9 value for the object. More...
 
Matrix Invert () const
 
Matrix Multiply (const ::Matrix &right) const
 
 operator float16 ()
 
bool operator!= (const ::Matrix &other)
 
Matrix operator* (const ::Matrix &matrix)
 
Matrix operator+ (const ::Matrix &matrix)
 
Matrix operator- (const ::Matrix &matrix)
 
Matrixoperator= (const ::Matrix &matrix)
 
Matrixoperator= (const Matrix &matrix)
 
bool operator== (const ::Matrix &other)
 
void SetM0 (float value)
 Sets the m0 value for the object. More...
 
void SetM1 (float value)
 Sets the m1 value for the object. More...
 
void SetM10 (float value)
 Sets the m10 value for the object. More...
 
void SetM11 (float value)
 Sets the m11 value for the object. More...
 
void SetM12 (float value)
 Sets the m12 value for the object. More...
 
void SetM13 (float value)
 Sets the m13 value for the object. More...
 
void SetM14 (float value)
 Sets the m14 value for the object. More...
 
void SetM15 (float value)
 Sets the m15 value for the object. More...
 
void SetM2 (float value)
 Sets the m2 value for the object. More...
 
void SetM3 (float value)
 Sets the m3 value for the object. More...
 
void SetM4 (float value)
 Sets the m4 value for the object. More...
 
void SetM5 (float value)
 Sets the m5 value for the object. More...
 
void SetM6 (float value)
 Sets the m6 value for the object. More...
 
void SetM7 (float value)
 Sets the m7 value for the object. More...
 
void SetM8 (float value)
 Sets the m8 value for the object. More...
 
void SetM9 (float value)
 Sets the m9 value for the object. More...
 
MatrixSetShaderValue (const ::Shader &shader, int uniformLoc)
 Set shader uniform value (matrix 4x4)
 
Matrix Subtract (const ::Matrix &right)
 
float16 ToFloatV () const
 
float Trace () const
 Returns the trace of the matrix (sum of the values along the diagonal)
 
Matrix Transpose () const
 Transposes provided matrix.
 

Static Public Member Functions

static Matrix Frustum (double left, double right, double bottom, double top, double near, double far)
 
static Matrix GetCamera (const ::Camera &camera)
 
static Matrix GetCamera (const ::Camera2D &camera)
 
static Matrix Identity ()
 
static Matrix LookAt (Vector3 eye, Vector3 target, Vector3 up)
 
static Matrix Ortho (double left, double right, double bottom, double top, double near, double far)
 
static Matrix Perspective (double fovy, double aspect, double near, double far)
 
static Matrix Rotate (Vector3 axis, float angle)
 
static Matrix RotateX (float angle)
 
static Matrix RotateXYZ (Vector3 angle)
 
static Matrix RotateY (float angle)
 
static Matrix RotateZ (float angle)
 
static Matrix Scale (float x, float y, float z)
 
static Matrix Translate (float x, float y, float z)
 

Protected Member Functions

void set (const ::Matrix &mat)
 

Detailed Description

Matrix type (OpenGL style 4x4 - right handed, column major)

Definition at line 16 of file Matrix.hpp.

Member Function Documentation

◆ GetM0()

float raylib::Matrix::GetM0 ( ) const
inline

Retrieves the m0 value for the object.

Returns
The m0 value of the object.

Definition at line 60 of file Matrix.hpp.

◆ GetM1()

float raylib::Matrix::GetM1 ( ) const
inline

Retrieves the m1 value for the object.

Returns
The m1 value of the object.

Definition at line 61 of file Matrix.hpp.

◆ GetM10()

float raylib::Matrix::GetM10 ( ) const
inline

Retrieves the m10 value for the object.

Returns
The m10 value of the object.

Definition at line 70 of file Matrix.hpp.

◆ GetM11()

float raylib::Matrix::GetM11 ( ) const
inline

Retrieves the m11 value for the object.

Returns
The m11 value of the object.

Definition at line 71 of file Matrix.hpp.

◆ GetM12()

float raylib::Matrix::GetM12 ( ) const
inline

Retrieves the m12 value for the object.

Returns
The m12 value of the object.

Definition at line 72 of file Matrix.hpp.

◆ GetM13()

float raylib::Matrix::GetM13 ( ) const
inline

Retrieves the m13 value for the object.

Returns
The m13 value of the object.

Definition at line 73 of file Matrix.hpp.

◆ GetM14()

float raylib::Matrix::GetM14 ( ) const
inline

Retrieves the m14 value for the object.

Returns
The m14 value of the object.

Definition at line 74 of file Matrix.hpp.

◆ GetM15()

float raylib::Matrix::GetM15 ( ) const
inline

Retrieves the m15 value for the object.

Returns
The m15 value of the object.

Definition at line 75 of file Matrix.hpp.

◆ GetM2()

float raylib::Matrix::GetM2 ( ) const
inline

Retrieves the m2 value for the object.

Returns
The m2 value of the object.

Definition at line 62 of file Matrix.hpp.

◆ GetM3()

float raylib::Matrix::GetM3 ( ) const
inline

Retrieves the m3 value for the object.

Returns
The m3 value of the object.

Definition at line 63 of file Matrix.hpp.

◆ GetM4()

float raylib::Matrix::GetM4 ( ) const
inline

Retrieves the m4 value for the object.

Returns
The m4 value of the object.

Definition at line 64 of file Matrix.hpp.

◆ GetM5()

float raylib::Matrix::GetM5 ( ) const
inline

Retrieves the m5 value for the object.

Returns
The m5 value of the object.

Definition at line 65 of file Matrix.hpp.

◆ GetM6()

float raylib::Matrix::GetM6 ( ) const
inline

Retrieves the m6 value for the object.

Returns
The m6 value of the object.

Definition at line 66 of file Matrix.hpp.

◆ GetM7()

float raylib::Matrix::GetM7 ( ) const
inline

Retrieves the m7 value for the object.

Returns
The m7 value of the object.

Definition at line 67 of file Matrix.hpp.

◆ GetM8()

float raylib::Matrix::GetM8 ( ) const
inline

Retrieves the m8 value for the object.

Returns
The m8 value of the object.

Definition at line 68 of file Matrix.hpp.

◆ GetM9()

float raylib::Matrix::GetM9 ( ) const
inline

Retrieves the m9 value for the object.

Returns
The m9 value of the object.

Definition at line 69 of file Matrix.hpp.

◆ SetM0()

void raylib::Matrix::SetM0 ( float  value)
inline

Sets the m0 value for the object.

Parameters
valueThe value of which to set m0 to.

Definition at line 60 of file Matrix.hpp.

◆ SetM1()

void raylib::Matrix::SetM1 ( float  value)
inline

Sets the m1 value for the object.

Parameters
valueThe value of which to set m1 to.

Definition at line 61 of file Matrix.hpp.

◆ SetM10()

void raylib::Matrix::SetM10 ( float  value)
inline

Sets the m10 value for the object.

Parameters
valueThe value of which to set m10 to.

Definition at line 70 of file Matrix.hpp.

◆ SetM11()

void raylib::Matrix::SetM11 ( float  value)
inline

Sets the m11 value for the object.

Parameters
valueThe value of which to set m11 to.

Definition at line 71 of file Matrix.hpp.

◆ SetM12()

void raylib::Matrix::SetM12 ( float  value)
inline

Sets the m12 value for the object.

Parameters
valueThe value of which to set m12 to.

Definition at line 72 of file Matrix.hpp.

◆ SetM13()

void raylib::Matrix::SetM13 ( float  value)
inline

Sets the m13 value for the object.

Parameters
valueThe value of which to set m13 to.

Definition at line 73 of file Matrix.hpp.

◆ SetM14()

void raylib::Matrix::SetM14 ( float  value)
inline

Sets the m14 value for the object.

Parameters
valueThe value of which to set m14 to.

Definition at line 74 of file Matrix.hpp.

◆ SetM15()

void raylib::Matrix::SetM15 ( float  value)
inline

Sets the m15 value for the object.

Parameters
valueThe value of which to set m15 to.

Definition at line 75 of file Matrix.hpp.

◆ SetM2()

void raylib::Matrix::SetM2 ( float  value)
inline

Sets the m2 value for the object.

Parameters
valueThe value of which to set m2 to.

Definition at line 62 of file Matrix.hpp.

◆ SetM3()

void raylib::Matrix::SetM3 ( float  value)
inline

Sets the m3 value for the object.

Parameters
valueThe value of which to set m3 to.

Definition at line 63 of file Matrix.hpp.

◆ SetM4()

void raylib::Matrix::SetM4 ( float  value)
inline

Sets the m4 value for the object.

Parameters
valueThe value of which to set m4 to.

Definition at line 64 of file Matrix.hpp.

◆ SetM5()

void raylib::Matrix::SetM5 ( float  value)
inline

Sets the m5 value for the object.

Parameters
valueThe value of which to set m5 to.

Definition at line 65 of file Matrix.hpp.

◆ SetM6()

void raylib::Matrix::SetM6 ( float  value)
inline

Sets the m6 value for the object.

Parameters
valueThe value of which to set m6 to.

Definition at line 66 of file Matrix.hpp.

◆ SetM7()

void raylib::Matrix::SetM7 ( float  value)
inline

Sets the m7 value for the object.

Parameters
valueThe value of which to set m7 to.

Definition at line 67 of file Matrix.hpp.

◆ SetM8()

void raylib::Matrix::SetM8 ( float  value)
inline

Sets the m8 value for the object.

Parameters
valueThe value of which to set m8 to.

Definition at line 68 of file Matrix.hpp.

◆ SetM9()

void raylib::Matrix::SetM9 ( float  value)
inline

Sets the m9 value for the object.

Parameters
valueThe value of which to set m9 to.

Definition at line 69 of file Matrix.hpp.