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

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

#include <Matrix.hpp>

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) const
 Elementwise matrix addition. More...
 
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
 Inverts provided matrix. More...
 
Matrix Multiply (const ::Matrix &right) const
 Matrix multiplication. More...
 
 operator float16 ()
 
bool operator!= (const ::Matrix &other)
 
Matrix operator* (const ::Matrix &matrix) const
 Matrix multiplication. More...
 
Matrix operator+ (const ::Matrix &matrix) const
 Elementwise matrix addition. More...
 
Matrix operator- (const ::Matrix &matrix) const
 Elementwise matrix subtraction. More...
 
Matrixoperator= (const ::Matrix &matrix)
 
Matrixoperator= (const Matrix &matrix)
 
bool operator== (const ::Matrix &other)
 
Matrix Rotate (GlobalSpace_t, Quaternion quat) const
 Rotates the current matrix in global space around the given quaternion. More...
 
Matrix Rotate (GlobalSpace_t, Vector3 axis, Radian angle) const
 Rotates the current matrix in global space around the given axis. More...
 
Matrix Rotate (LocalSpace_t, Quaternion quat) const
 Rotates the current matrix in local space around the given quaternion. More...
 
Matrix Rotate (LocalSpace_t, Vector3 axis, Radian angle) const
 Rotates the current matrix in local space around the given axis. More...
 
Matrix Rotate (Quaternion quat) const
 Rotates the current matrix in local space around the given quaternion. More...
 
Matrix Rotate (Vector3 axis, Radian angle) const
 Rotates the current matrix in local space around the given axis. More...
 
Matrix RotateX (GlobalSpace_t, Radian angle) const
 Rotates the current matrix in global space around the X axis. More...
 
Matrix RotateX (LocalSpace_t, Radian angle) const
 Rotates the current matrix in local space around the X axis. More...
 
Matrix RotateX (Radian angle) const
 Rotates the current matrix in local space around the X axis. More...
 
Matrix RotateXYZ (GlobalSpace_t, Radian x, Radian y, Radian z) const
 Rotates the current matrix using the provided euler angles in global space. More...
 
Matrix RotateXYZ (GlobalSpace_t, Vector3 angle) const
 Rotates the current matrix using the provided euler angles in global space. More...
 
Matrix RotateXYZ (LocalSpace_t, Radian x, Radian y, Radian z) const
 Rotates the current matrix using the provided euler angles in local space. More...
 
Matrix RotateXYZ (LocalSpace_t, Vector3 angle) const
 Rotates the current matrix using the provided euler angles in local space. More...
 
Matrix RotateXYZ (Radian x, Radian y, Radian z) const
 Rotates the current matrix using the provided euler angles in local space. More...
 
Matrix RotateXYZ (Vector3 angle) const
 Rotates the current matrix using the provided euler angles in local space. More...
 
Matrix RotateY (GlobalSpace_t, Radian angle) const
 Rotates the current matrix in global space around the Y axis. More...
 
Matrix RotateY (LocalSpace_t, Radian angle) const
 Rotates the current matrix in local space around the Y axis. More...
 
Matrix RotateY (Radian angle) const
 Rotates the current matrix in local space around the Y axis. More...
 
Matrix RotateZ (GlobalSpace_t, Radian angle) const
 Rotates the current matrix in global space around the Z axis. More...
 
Matrix RotateZ (LocalSpace_t, Radian angle) const
 Rotates the current matrix in local space around the Z axis. More...
 
Matrix RotateZ (Radian angle) const
 Rotates the current matrix in local space around the Z axis. More...
 
Matrix Scale (float all) const
 
Matrix Scale (float x, float y, float z) const
 Scales the current matrix in local space. More...
 
Matrix Scale (GlobalSpace_t, float all) const
 
Matrix Scale (GlobalSpace_t, float x, float y, float z) const
 Scales the current matrix in global space. More...
 
Matrix Scale (LocalSpace_t, float all) const
 
Matrix Scale (LocalSpace_t, float x, float y, float z) const
 Scales the current matrix in local space. More...
 
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) More...
 
Matrix Subtract (const ::Matrix &right) const
 Elementwise matrix subtraction. More...
 
float16 ToFloatV () const
 
float Trace () const
 Returns the trace of the matrix (sum of the values along the diagonal) More...
 
Matrix Translate (float x, float y, float z) const
 Translates the current matrix in global space. More...
 
Matrix Translate (GlobalSpace_t, float x, float y, float z) const
 Translates the current matrix in global space. More...
 
Matrix Translate (GlobalSpace_t, Vector3 translation) const
 Translates the current matrix in global space. More...
 
Matrix Translate (LocalSpace_t, float x, float y, float z) const
 Translates the current matrix in local space. More...
 
Matrix Translate (LocalSpace_t, Vector3 translation) const
 Translates the current matrix in local space. More...
 
Matrix Translate (Vector3 translation) const
 Translates the current matrix in global space. More...
 
Matrix TranslateToOrigin () const
 Creates a matrix that when multiplied by the current matrix will translate back to the origin (New function not provided by raylib) More...
 
Matrix Transpose () const
 Transposes provided matrix. More...
 

Static Public Member Functions

static Matrix CreateRotate (Quaternion quat)
 Creates a rotation matrix around the given quaternion. More...
 
static Matrix CreateRotate (Vector3 axis, Radian angle)
 Creates a rotation matrix around the given axis. More...
 
static Matrix CreateRotateX (Radian angle)
 Creates a rotation matrix around the X axis. More...
 
static Matrix CreateRotateXYZ (Radian x, Radian y, Radian z)
 Creates a rotation matrix using the provided euler angles. More...
 
static Matrix CreateRotateXYZ (Vector3 angle)
 Creates a rotation matrix using the provided euler angles. More...
 
static Matrix CreateRotateY (Radian angle)
 Creates a rotation matrix around the Y axis. More...
 
static Matrix CreateRotateZ (Radian angle)
 Creates a rotation matrix around the given axis. More...
 
static Matrix CreateScale (float x, float y, float z)
 Creates a scale matrix. More...
 
static Matrix CreateTranslate (float x, float y, float z)
 Creates a translation matrix. More...
 
static Matrix CreateTranslate (Vector3 translation)
 Creates a translation matrix. More...
 
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 ()
 Creates an identity matrix. More...
 
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 Public Attributes

static constexpr GlobalSpace_t GlobalSpace {}
 
static constexpr LocalSpace_t LocalSpace {}
 

Protected Member Functions

void set (const ::Matrix &mat)
 

Detailed Description

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

Definition at line 18 of file Matrix.hpp.

Constructor & Destructor Documentation

◆ Matrix() [1/2]

raylib::Matrix::Matrix ( const ::Matrix &  mat)
inline

Definition at line 25 of file Matrix.hpp.

◆ Matrix() [2/2]

raylib::Matrix::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 
)
inline

Definition at line 33 of file Matrix.hpp.

Member Function Documentation

◆ Add()

Matrix raylib::Matrix::Add ( const ::Matrix &  right) const
inline

Elementwise matrix addition.

Definition at line 136 of file Matrix.hpp.

◆ CreateRotate() [1/2]

static Matrix raylib::Matrix::CreateRotate ( Quaternion  quat)
inlinestatic

Creates a rotation matrix around the given quaternion.

Definition at line 263 of file Matrix.hpp.

References CreateRotate().

◆ CreateRotate() [2/2]

static Matrix raylib::Matrix::CreateRotate ( Vector3  axis,
Radian  angle 
)
inlinestatic

Creates a rotation matrix around the given axis.

Definition at line 234 of file Matrix.hpp.

Referenced by CreateRotate(), and Rotate().

◆ CreateRotateX()

static Matrix raylib::Matrix::CreateRotateX ( Radian  angle)
inlinestatic

Creates a rotation matrix around the X axis.

Definition at line 351 of file Matrix.hpp.

Referenced by RotateX().

◆ CreateRotateXYZ() [1/2]

static Matrix raylib::Matrix::CreateRotateXYZ ( Radian  x,
Radian  y,
Radian  z 
)
inlinestatic

Creates a rotation matrix using the provided euler angles.

Definition at line 322 of file Matrix.hpp.

References CreateRotateXYZ().

◆ CreateRotateXYZ() [2/2]

static Matrix raylib::Matrix::CreateRotateXYZ ( Vector3  angle)
inlinestatic

Creates a rotation matrix using the provided euler angles.

Definition at line 293 of file Matrix.hpp.

Referenced by CreateRotateXYZ(), and RotateXYZ().

◆ CreateRotateY()

static Matrix raylib::Matrix::CreateRotateY ( Radian  angle)
inlinestatic

Creates a rotation matrix around the Y axis.

Definition at line 380 of file Matrix.hpp.

Referenced by RotateY().

◆ CreateRotateZ()

static Matrix raylib::Matrix::CreateRotateZ ( Radian  angle)
inlinestatic

Creates a rotation matrix around the given axis.

Definition at line 409 of file Matrix.hpp.

Referenced by RotateZ().

◆ CreateScale()

static Matrix raylib::Matrix::CreateScale ( float  x,
float  y,
float  z 
)
inlinestatic

Creates a scale matrix.

Definition at line 438 of file Matrix.hpp.

Referenced by Scale().

◆ CreateTranslate() [1/2]

static Matrix raylib::Matrix::CreateTranslate ( float  x,
float  y,
float  z 
)
inlinestatic

Creates a translation matrix.

Definition at line 178 of file Matrix.hpp.

Referenced by Translate(), and TranslateToOrigin().

◆ CreateTranslate() [2/2]

static Matrix raylib::Matrix::CreateTranslate ( Vector3  translation)
inlinestatic

Creates a translation matrix.

Definition at line 206 of file Matrix.hpp.

◆ Frustum()

static Matrix raylib::Matrix::Frustum ( double  left,
double  right,
double  bottom,
double  top,
double  near,
double  far 
)
inlinestatic

Definition at line 473 of file Matrix.hpp.

◆ GetCamera() [1/2]

static Matrix raylib::Matrix::GetCamera ( const ::Camera &  camera)
inlinestatic

Definition at line 507 of file Matrix.hpp.

◆ GetCamera() [2/2]

static Matrix raylib::Matrix::GetCamera ( const ::Camera2D &  camera)
inlinestatic

Definition at line 511 of file Matrix.hpp.

◆ GetM0()

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

Retrieves the m0 value for the object.

Returns
The m0 value of the object.

Definition at line 46 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 47 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 56 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 57 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 58 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 59 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 60 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 61 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 48 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 49 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 50 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 51 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 52 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 53 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 54 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 55 of file Matrix.hpp.

◆ Identity()

static Matrix raylib::Matrix::Identity ( )
inlinestatic

Creates an identity matrix.

Definition at line 121 of file Matrix.hpp.

◆ Invert()

Matrix raylib::Matrix::Invert ( ) const
inline

Inverts provided matrix.

Definition at line 114 of file Matrix.hpp.

Referenced by Rotate(), RotateX(), RotateXYZ(), RotateY(), RotateZ(), and Scale().

◆ LookAt()

static Matrix raylib::Matrix::LookAt ( Vector3  eye,
Vector3  target,
Vector3  up 
)
inlinestatic

Definition at line 487 of file Matrix.hpp.

◆ Multiply()

Matrix raylib::Matrix::Multiply ( const ::Matrix &  right) const
inline

Matrix multiplication.

Definition at line 164 of file Matrix.hpp.

◆ operator float16()

raylib::Matrix::operator float16 ( )
inline

Definition at line 495 of file Matrix.hpp.

◆ operator!=()

bool raylib::Matrix::operator!= ( const ::Matrix &  other)
inline

Definition at line 92 of file Matrix.hpp.

◆ operator*()

Matrix raylib::Matrix::operator* ( const ::Matrix &  matrix) const
inline

Matrix multiplication.

Definition at line 171 of file Matrix.hpp.

◆ operator+()

Matrix raylib::Matrix::operator+ ( const ::Matrix &  matrix) const
inline

Elementwise matrix addition.

Definition at line 143 of file Matrix.hpp.

◆ operator-()

Matrix raylib::Matrix::operator- ( const ::Matrix &  matrix) const
inline

Elementwise matrix subtraction.

Definition at line 157 of file Matrix.hpp.

◆ operator=() [1/2]

Matrix & raylib::Matrix::operator= ( const ::Matrix &  matrix)
inline

Definition at line 63 of file Matrix.hpp.

◆ operator=() [2/2]

Matrix & raylib::Matrix::operator= ( const Matrix matrix)
inline

Definition at line 68 of file Matrix.hpp.

◆ operator==()

bool raylib::Matrix::operator== ( const ::Matrix &  other)
inline

Definition at line 73 of file Matrix.hpp.

◆ Ortho()

static Matrix raylib::Matrix::Ortho ( double  left,
double  right,
double  bottom,
double  top,
double  near,
double  far 
)
inlinestatic

Definition at line 482 of file Matrix.hpp.

◆ Perspective()

static Matrix raylib::Matrix::Perspective ( double  fovy,
double  aspect,
double  near,
double  far 
)
inlinestatic

Definition at line 478 of file Matrix.hpp.

◆ Rotate() [1/6]

Matrix raylib::Matrix::Rotate ( GlobalSpace_t  ,
Quaternion  quat 
) const
inline

Rotates the current matrix in global space around the given quaternion.

Definition at line 271 of file Matrix.hpp.

References CreateRotate().

◆ Rotate() [2/6]

Matrix raylib::Matrix::Rotate ( GlobalSpace_t  ,
Vector3  axis,
Radian  angle 
) const
inline

Rotates the current matrix in global space around the given axis.

Definition at line 241 of file Matrix.hpp.

References CreateRotate().

Referenced by Rotate().

◆ Rotate() [3/6]

Matrix raylib::Matrix::Rotate ( LocalSpace_t  ,
Quaternion  quat 
) const
inline

Rotates the current matrix in local space around the given quaternion.

Definition at line 278 of file Matrix.hpp.

References CreateRotate(), Invert(), and TranslateToOrigin().

◆ Rotate() [4/6]

Matrix raylib::Matrix::Rotate ( LocalSpace_t  ,
Vector3  axis,
Radian  angle 
) const
inline

Rotates the current matrix in local space around the given axis.

Definition at line 248 of file Matrix.hpp.

References CreateRotate(), Invert(), and TranslateToOrigin().

◆ Rotate() [5/6]

Matrix raylib::Matrix::Rotate ( Quaternion  quat) const
inline

Rotates the current matrix in local space around the given quaternion.

Definition at line 286 of file Matrix.hpp.

References Rotate().

◆ Rotate() [6/6]

Matrix raylib::Matrix::Rotate ( Vector3  axis,
Radian  angle 
) const
inline

Rotates the current matrix in local space around the given axis.

Definition at line 256 of file Matrix.hpp.

References Rotate().

◆ RotateX() [1/3]

Matrix raylib::Matrix::RotateX ( GlobalSpace_t  ,
Radian  angle 
) const
inline

Rotates the current matrix in global space around the X axis.

Definition at line 358 of file Matrix.hpp.

References CreateRotateX().

Referenced by RotateX().

◆ RotateX() [2/3]

Matrix raylib::Matrix::RotateX ( LocalSpace_t  ,
Radian  angle 
) const
inline

Rotates the current matrix in local space around the X axis.

Definition at line 365 of file Matrix.hpp.

References CreateRotateX(), Invert(), and TranslateToOrigin().

◆ RotateX() [3/3]

Matrix raylib::Matrix::RotateX ( Radian  angle) const
inline

Rotates the current matrix in local space around the X axis.

Definition at line 373 of file Matrix.hpp.

References RotateX().

◆ RotateXYZ() [1/6]

Matrix raylib::Matrix::RotateXYZ ( GlobalSpace_t  ,
Radian  x,
Radian  y,
Radian  z 
) const
inline

Rotates the current matrix using the provided euler angles in global space.

Definition at line 329 of file Matrix.hpp.

References CreateRotateXYZ().

◆ RotateXYZ() [2/6]

Matrix raylib::Matrix::RotateXYZ ( GlobalSpace_t  ,
Vector3  angle 
) const
inline

Rotates the current matrix using the provided euler angles in global space.

Definition at line 300 of file Matrix.hpp.

References CreateRotateXYZ().

Referenced by RotateXYZ().

◆ RotateXYZ() [3/6]

Matrix raylib::Matrix::RotateXYZ ( LocalSpace_t  ,
Radian  x,
Radian  y,
Radian  z 
) const
inline

Rotates the current matrix using the provided euler angles in local space.

Definition at line 336 of file Matrix.hpp.

References CreateRotateXYZ(), Invert(), and TranslateToOrigin().

◆ RotateXYZ() [4/6]

Matrix raylib::Matrix::RotateXYZ ( LocalSpace_t  ,
Vector3  angle 
) const
inline

Rotates the current matrix using the provided euler angles in local space.

Definition at line 307 of file Matrix.hpp.

References CreateRotateXYZ(), Invert(), and TranslateToOrigin().

◆ RotateXYZ() [5/6]

Matrix raylib::Matrix::RotateXYZ ( Radian  x,
Radian  y,
Radian  z 
) const
inline

Rotates the current matrix using the provided euler angles in local space.

Definition at line 344 of file Matrix.hpp.

References RotateXYZ().

◆ RotateXYZ() [6/6]

Matrix raylib::Matrix::RotateXYZ ( Vector3  angle) const
inline

Rotates the current matrix using the provided euler angles in local space.

Definition at line 315 of file Matrix.hpp.

References RotateXYZ().

◆ RotateY() [1/3]

Matrix raylib::Matrix::RotateY ( GlobalSpace_t  ,
Radian  angle 
) const
inline

Rotates the current matrix in global space around the Y axis.

Definition at line 387 of file Matrix.hpp.

References CreateRotateY().

Referenced by RotateY().

◆ RotateY() [2/3]

Matrix raylib::Matrix::RotateY ( LocalSpace_t  ,
Radian  angle 
) const
inline

Rotates the current matrix in local space around the Y axis.

Definition at line 394 of file Matrix.hpp.

References CreateRotateY(), Invert(), and TranslateToOrigin().

◆ RotateY() [3/3]

Matrix raylib::Matrix::RotateY ( Radian  angle) const
inline

Rotates the current matrix in local space around the Y axis.

Definition at line 402 of file Matrix.hpp.

References RotateY().

◆ RotateZ() [1/3]

Matrix raylib::Matrix::RotateZ ( GlobalSpace_t  ,
Radian  angle 
) const
inline

Rotates the current matrix in global space around the Z axis.

Definition at line 416 of file Matrix.hpp.

References CreateRotateZ().

Referenced by RotateZ().

◆ RotateZ() [2/3]

Matrix raylib::Matrix::RotateZ ( LocalSpace_t  ,
Radian  angle 
) const
inline

Rotates the current matrix in local space around the Z axis.

Definition at line 423 of file Matrix.hpp.

References CreateRotateZ(), Invert(), and TranslateToOrigin().

◆ RotateZ() [3/3]

Matrix raylib::Matrix::RotateZ ( Radian  angle) const
inline

Rotates the current matrix in local space around the Z axis.

Definition at line 431 of file Matrix.hpp.

References RotateZ().

◆ Scale() [1/6]

Matrix raylib::Matrix::Scale ( float  all) const
inline

Definition at line 469 of file Matrix.hpp.

◆ Scale() [2/6]

Matrix raylib::Matrix::Scale ( float  x,
float  y,
float  z 
) const
inline

Scales the current matrix in local space.

Definition at line 466 of file Matrix.hpp.

References Scale().

◆ Scale() [3/6]

Matrix raylib::Matrix::Scale ( GlobalSpace_t  ,
float  all 
) const
inline

Definition at line 448 of file Matrix.hpp.

◆ Scale() [4/6]

Matrix raylib::Matrix::Scale ( GlobalSpace_t  ,
float  x,
float  y,
float  z 
) const
inline

Scales the current matrix in global space.

Definition at line 445 of file Matrix.hpp.

References CreateScale().

Referenced by Scale().

◆ Scale() [5/6]

Matrix raylib::Matrix::Scale ( LocalSpace_t  ,
float  all 
) const
inline

Definition at line 459 of file Matrix.hpp.

◆ Scale() [6/6]

Matrix raylib::Matrix::Scale ( LocalSpace_t  ,
float  x,
float  y,
float  z 
) const
inline

Scales the current matrix in local space.

Definition at line 455 of file Matrix.hpp.

References CreateScale(), Invert(), and TranslateToOrigin().

◆ set()

void raylib::Matrix::set ( const ::Matrix &  mat)
inlineprotected

Definition at line 518 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 46 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 47 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 56 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 57 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 58 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 59 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 60 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 61 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 48 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 49 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 50 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 51 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 52 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 53 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 54 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 55 of file Matrix.hpp.

◆ SetShaderValue()

Matrix & raylib::Matrix::SetShaderValue ( const ::Shader &  shader,
int  uniformLoc 
)
inline

Set shader uniform value (matrix 4x4)

Definition at line 502 of file Matrix.hpp.

◆ Subtract()

Matrix raylib::Matrix::Subtract ( const ::Matrix &  right) const
inline

Elementwise matrix subtraction.

Definition at line 150 of file Matrix.hpp.

◆ ToFloatV()

float16 raylib::Matrix::ToFloatV ( ) const
inline

Definition at line 491 of file Matrix.hpp.

◆ Trace()

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

Returns the trace of the matrix (sum of the values along the diagonal)

Definition at line 100 of file Matrix.hpp.

◆ Translate() [1/6]

Matrix raylib::Matrix::Translate ( float  x,
float  y,
float  z 
) const
inline

Translates the current matrix in global space.

Definition at line 199 of file Matrix.hpp.

References Translate().

◆ Translate() [2/6]

Matrix raylib::Matrix::Translate ( GlobalSpace_t  ,
float  x,
float  y,
float  z 
) const
inline

Translates the current matrix in global space.

Definition at line 185 of file Matrix.hpp.

References CreateTranslate().

Referenced by Translate().

◆ Translate() [3/6]

Matrix raylib::Matrix::Translate ( GlobalSpace_t  ,
Vector3  translation 
) const
inline

Translates the current matrix in global space.

Definition at line 213 of file Matrix.hpp.

References CreateTranslate().

◆ Translate() [4/6]

Matrix raylib::Matrix::Translate ( LocalSpace_t  ,
float  x,
float  y,
float  z 
) const
inline

Translates the current matrix in local space.

Definition at line 192 of file Matrix.hpp.

References CreateTranslate().

◆ Translate() [5/6]

Matrix raylib::Matrix::Translate ( LocalSpace_t  ,
Vector3  translation 
) const
inline

Translates the current matrix in local space.

Definition at line 220 of file Matrix.hpp.

References CreateTranslate().

◆ Translate() [6/6]

Matrix raylib::Matrix::Translate ( Vector3  translation) const
inline

Translates the current matrix in global space.

Definition at line 227 of file Matrix.hpp.

References Translate().

◆ TranslateToOrigin()

Matrix raylib::Matrix::TranslateToOrigin ( ) const
inline

Creates a matrix that when multiplied by the current matrix will translate back to the origin (New function not provided by raylib)

Definition at line 129 of file Matrix.hpp.

References CreateTranslate().

Referenced by Rotate(), RotateX(), RotateXYZ(), RotateY(), RotateZ(), and Scale().

◆ Transpose()

Matrix raylib::Matrix::Transpose ( ) const
inline

Transposes provided matrix.

Definition at line 107 of file Matrix.hpp.

Member Data Documentation

◆ GlobalSpace

constexpr GlobalSpace_t raylib::Matrix::GlobalSpace {}
staticconstexpr

Definition at line 23 of file Matrix.hpp.

◆ LocalSpace

constexpr LocalSpace_t raylib::Matrix::LocalSpace {}
staticconstexpr

Definition at line 21 of file Matrix.hpp.