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

Public Member Functions

 Matrix (const ::Matrix &mat)
 
 Matrix (float M0=0, float M1=0, float M2=0, float M3=0, float M4=0, float M5=0, float M6=0, float M7=0, float M8=0, float M9=0, float M10=0, float M11=0, float M12=0, float M13=0, float M14=0, float M15=0)
 
Matrix Add (const ::Matrix &right)
 
float GetM0 () const
 
float GetM1 () const
 
float GetM10 () const
 
float GetM11 () const
 
float GetM12 () const
 
float GetM13 () const
 
float GetM14 () const
 
float GetM15 () const
 
float GetM2 () const
 
float GetM3 () const
 
float GetM4 () const
 
float GetM5 () const
 
float GetM6 () const
 
float GetM7 () const
 
float GetM8 () const
 
float GetM9 () const
 
Matrix Invert () const
 
Matrix Multiply (const ::Matrix &right) const
 
Matrix Normalize () const
 
 operator float16 ()
 
Matrix operator* (const ::Matrix &matrix)
 
Matrix operator+ (const ::Matrix &matrix)
 
Matrix operator- (const ::Matrix &matrix)
 
Matrix & operator= (const ::Matrix &matrix)
 
Matrix & operator= (const Matrix &matrix)
 
bool operator== (const ::Matrix &other)
 
void SetM0 (float value)
 
void SetM1 (float value)
 
void SetM10 (float value)
 
void SetM11 (float value)
 
void SetM12 (float value)
 
void SetM13 (float value)
 
void SetM14 (float value)
 
void SetM15 (float value)
 
void SetM2 (float value)
 
void SetM3 (float value)
 
void SetM4 (float value)
 
void SetM5 (float value)
 
void SetM6 (float value)
 
void SetM7 (float value)
 
void SetM8 (float value)
 
void SetM9 (float value)
 
Matrix & SetModelview ()
 Set a custom modelview matrix (replaces internal modelview matrix) More...
 
Matrix & SetProjection ()
 Set a custom projection matrix (replaces internal projection matrix) More...
 
Matrix & SetShaderValue (::Shader shader, int uniformLoc)
 Set shader uniform value (matrix 4x4) More...
 
Matrix Subtract (const ::Matrix &right)
 
float16 ToFloatV () const
 
float Trace () const
 Returns the trace of the matrix (sum of the values along the diagonal) More...
 
Matrix Transpose () const
 Transposes provided matrix. More...
 

Static Public Member Functions

static Matrix Frustum (double left, double right, double bottom, double top, double near, double far)
 
static Matrix GetModelview ()
 Get internal modelview matrix. More...
 
static Matrix GetProjection ()
 Get internal projection matrix. More...
 
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

Definition at line 46 of file Matrix.hpp.

Constructor & Destructor Documentation

◆ Matrix() [1/2]

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

Definition at line 48 of file Matrix.hpp.

References set().

◆ Matrix() [2/2]

raylib::Matrix::Matrix ( float  M0 = 0,
float  M1 = 0,
float  M2 = 0,
float  M3 = 0,
float  M4 = 0,
float  M5 = 0,
float  M6 = 0,
float  M7 = 0,
float  M8 = 0,
float  M9 = 0,
float  M10 = 0,
float  M11 = 0,
float  M12 = 0,
float  M13 = 0,
float  M14 = 0,
float  M15 = 0 
)
inline

Definition at line 52 of file Matrix.hpp.

Member Function Documentation

◆ Add()

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

Definition at line 176 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 228 of file Matrix.hpp.

◆ GetM0()

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

Definition at line 73 of file Matrix.hpp.

◆ GetM1()

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

Definition at line 74 of file Matrix.hpp.

◆ GetM10()

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

Definition at line 83 of file Matrix.hpp.

◆ GetM11()

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

Definition at line 84 of file Matrix.hpp.

◆ GetM12()

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

Definition at line 85 of file Matrix.hpp.

◆ GetM13()

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

Definition at line 86 of file Matrix.hpp.

◆ GetM14()

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

Definition at line 87 of file Matrix.hpp.

◆ GetM15()

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

Definition at line 88 of file Matrix.hpp.

◆ GetM2()

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

Definition at line 75 of file Matrix.hpp.

◆ GetM3()

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

Definition at line 76 of file Matrix.hpp.

◆ GetM4()

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

Definition at line 77 of file Matrix.hpp.

◆ GetM5()

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

Definition at line 78 of file Matrix.hpp.

◆ GetM6()

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

Definition at line 79 of file Matrix.hpp.

◆ GetM7()

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

Definition at line 80 of file Matrix.hpp.

◆ GetM8()

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

Definition at line 81 of file Matrix.hpp.

◆ GetM9()

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

Definition at line 82 of file Matrix.hpp.

◆ GetModelview()

static Matrix raylib::Matrix::GetModelview ( )
inlinestatic

Get internal modelview matrix.

Definition at line 138 of file Matrix.hpp.

◆ GetProjection()

static Matrix raylib::Matrix::GetProjection ( )
inlinestatic

Get internal projection matrix.

Definition at line 145 of file Matrix.hpp.

◆ Identity()

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

Definition at line 172 of file Matrix.hpp.

◆ Invert()

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

Definition at line 164 of file Matrix.hpp.

◆ LookAt()

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

Definition at line 242 of file Matrix.hpp.

◆ Multiply()

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

Definition at line 220 of file Matrix.hpp.

◆ Normalize()

Matrix raylib::Matrix::Normalize ( ) const
inline

Definition at line 168 of file Matrix.hpp.

◆ operator float16()

raylib::Matrix::operator float16 ( )
inline

Definition at line 250 of file Matrix.hpp.

References ToFloatV().

◆ operator*()

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

Definition at line 224 of file Matrix.hpp.

◆ operator+()

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

Definition at line 180 of file Matrix.hpp.

◆ operator-()

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

Definition at line 188 of file Matrix.hpp.

◆ operator=() [1/2]

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

Definition at line 90 of file Matrix.hpp.

References set().

◆ operator=() [2/2]

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

Definition at line 95 of file Matrix.hpp.

References set().

◆ operator==()

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

Definition at line 100 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 237 of file Matrix.hpp.

◆ Perspective()

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

Definition at line 233 of file Matrix.hpp.

◆ Rotate()

static Matrix raylib::Matrix::Rotate ( Vector3  axis,
float  angle 
)
inlinestatic

Definition at line 196 of file Matrix.hpp.

◆ RotateX()

static Matrix raylib::Matrix::RotateX ( float  angle)
inlinestatic

Definition at line 204 of file Matrix.hpp.

◆ RotateXYZ()

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

Definition at line 200 of file Matrix.hpp.

◆ RotateY()

static Matrix raylib::Matrix::RotateY ( float  angle)
inlinestatic

Definition at line 208 of file Matrix.hpp.

◆ RotateZ()

static Matrix raylib::Matrix::RotateZ ( float  angle)
inlinestatic

Definition at line 212 of file Matrix.hpp.

◆ Scale()

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

Definition at line 216 of file Matrix.hpp.

◆ set()

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

Definition at line 265 of file Matrix.hpp.

Referenced by Matrix(), and operator=().

◆ SetM0()

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

Definition at line 73 of file Matrix.hpp.

◆ SetM1()

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

Definition at line 74 of file Matrix.hpp.

◆ SetM10()

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

Definition at line 83 of file Matrix.hpp.

◆ SetM11()

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

Definition at line 84 of file Matrix.hpp.

◆ SetM12()

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

Definition at line 85 of file Matrix.hpp.

◆ SetM13()

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

Definition at line 86 of file Matrix.hpp.

◆ SetM14()

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

Definition at line 87 of file Matrix.hpp.

◆ SetM15()

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

Definition at line 88 of file Matrix.hpp.

◆ SetM2()

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

Definition at line 75 of file Matrix.hpp.

◆ SetM3()

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

Definition at line 76 of file Matrix.hpp.

◆ SetM4()

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

Definition at line 77 of file Matrix.hpp.

◆ SetM5()

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

Definition at line 78 of file Matrix.hpp.

◆ SetM6()

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

Definition at line 79 of file Matrix.hpp.

◆ SetM7()

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

Definition at line 80 of file Matrix.hpp.

◆ SetM8()

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

Definition at line 81 of file Matrix.hpp.

◆ SetM9()

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

Definition at line 82 of file Matrix.hpp.

◆ SetModelview()

Matrix& raylib::Matrix::SetModelview ( )
inline

Set a custom modelview matrix (replaces internal modelview matrix)

Definition at line 130 of file Matrix.hpp.

◆ SetProjection()

Matrix& raylib::Matrix::SetProjection ( )
inline

Set a custom projection matrix (replaces internal projection matrix)

Definition at line 122 of file Matrix.hpp.

◆ SetShaderValue()

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

Set shader uniform value (matrix 4x4)

Definition at line 257 of file Matrix.hpp.

◆ Subtract()

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

Definition at line 184 of file Matrix.hpp.

◆ ToFloatV()

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

Definition at line 246 of file Matrix.hpp.

Referenced by operator float16().

◆ Trace()

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

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

Definition at line 153 of file Matrix.hpp.

◆ Translate()

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

Definition at line 192 of file Matrix.hpp.

◆ Transpose()

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

Transposes provided matrix.

Definition at line 160 of file Matrix.hpp.