 |
raylib-cpp
C++ object-oriented wrapper library for raylib.
|
1 #ifndef RAYLIB_CPP_MATRIX_HPP_
2 #define RAYLIB_CPP_MATRIX_HPP_
8 #ifndef RAYLIB_CPP_NO_MATH
15 #include "./raylib-cpp-utils.hpp"
16 #ifndef RAYLIB_CPP_NO_MATH
27 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) {
46 GETTERSETTER(
float,M0,m0)
47 GETTERSETTER(
float,M1,m1)
48 GETTERSETTER(
float,M2,m2)
49 GETTERSETTER(
float,M3,m3)
50 GETTERSETTER(
float,M4,m4)
51 GETTERSETTER(
float,M5,m5)
52 GETTERSETTER(
float,M6,m6)
53 GETTERSETTER(
float,M7,m7)
54 GETTERSETTER(
float,M8,m8)
55 GETTERSETTER(
float,M9,m9)
56 GETTERSETTER(
float,M10,m10)
57 GETTERSETTER(
float,M11,m11)
58 GETTERSETTER(
float,M12,m12)
59 GETTERSETTER(
float,M13,m13)
60 GETTERSETTER(
float,M14,m14)
61 GETTERSETTER(
float,M15,m15)
93 ::SetMatrixProjection(*
this);
98 ::SetMatrixModelview(*
this);
103 return ::GetMatrixModelview();
107 return ::GetMatrixProjection();
110 #ifndef RAYLIB_CPP_NO_MATH
112 return ::MatrixTrace(*
this);
115 return ::MatrixTranspose(*
this);
118 return ::MatrixInvert(*
this);
121 return ::MatrixNormalize(*
this);
124 return ::MatrixIdentity();
127 return ::MatrixAdd(*
this, right);
130 return ::MatrixAdd(*
this, matrix);
133 return ::MatrixSubtract(*
this, right);
136 return ::MatrixSubtract(*
this, matrix);
139 return ::MatrixTranslate(x, y, z);
142 return ::MatrixRotate(axis, angle);
145 return ::MatrixRotateXYZ(angle);
148 return ::MatrixRotateX(angle);
151 return ::MatrixRotateY(angle);
154 return ::MatrixRotateZ(angle);
157 return ::MatrixScale(x, y, z);
160 return ::MatrixMultiply(*
this, right);
163 return ::MatrixMultiply(*
this, matrix);
166 static Matrix Frustum(
double left,
double right,
double bottom,
double top,
double near,
double far) {
167 return ::MatrixFrustum(left, right, bottom, top, near, far);
171 return ::MatrixPerspective(fovy, aspect, near, far);
174 static Matrix Ortho(
double left,
double right,
double bottom,
double top,
double near,
double far) {
175 return ::MatrixOrtho(left, right, bottom, top, near, far);
179 return ::MatrixLookAt(eye, target, up);
183 return ::MatrixToFloatV(*
this);
Provides all the classes associated with raylib-cpp.
Matrix operator*(const Matrix &matrix)
static Matrix Frustum(double left, double right, double bottom, double top, double near, double far)
Matrix Add(::Matrix right)
static Matrix RotateXYZ(Vector3 angle)
static Matrix Scale(float x, float y, float z)
static Matrix Translate(float x, float y, float z)
static Matrix Rotate(Vector3 axis, float angle)
static Matrix RotateZ(float angle)
Matrix operator-(const Matrix &matrix)
Matrix & operator=(const Matrix &matrix)
static Matrix RotateX(float angle)
static Matrix Perspective(double fovy, double aspect, double near, double far)
Matrix Subtract(::Matrix right)
static Matrix GetModelview()
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)
static Matrix LookAt(Vector3 eye, Vector3 target, Vector3 up)
static Matrix RotateY(float angle)
Matrix Multiply(Matrix right)
bool operator==(const Matrix &other)
static Matrix GetProjection()
Matrix operator+(const Matrix &matrix)
static Matrix Ortho(double left, double right, double bottom, double top, double near, double far)