 |
raylib-cpp
C++ object-oriented wrapper library for raylib.
|
25 #ifndef RAYLIB_CPP_INCLUDE_MATRIX_HPP_
26 #define RAYLIB_CPP_INCLUDE_MATRIX_HPP_
32 #ifndef RAYLIB_CPP_NO_MATH
39 #ifndef RAYLIB_CPP_NO_MATH
43 #include "./raylib-cpp-utils.hpp"
52 Matrix(
float M0 = 0,
float M1 = 0,
float M2 = 0,
float M3 = 0,
float M4 = 0,
float M5 = 0,
53 float M6 = 0,
float M7 = 0,
float M8 = 0,
float M9 = 0,
float M10 = 0,
float M11 = 0,
54 float M12 = 0,
float M13 = 0,
float M14 = 0,
float M15 = 0) {
73 GETTERSETTER(
float, M0, m0)
74 GETTERSETTER(
float, M1, m1)
75 GETTERSETTER(
float, M2, m2)
76 GETTERSETTER(
float, M3, m3)
77 GETTERSETTER(
float, M4, m4)
78 GETTERSETTER(
float, M5, m5)
79 GETTERSETTER(
float, M6, m6)
80 GETTERSETTER(
float, M7, m7)
81 GETTERSETTER(
float, M8, m8)
82 GETTERSETTER(
float, M9, m9)
83 GETTERSETTER(
float, M10, m10)
84 GETTERSETTER(
float, M11, m11)
85 GETTERSETTER(
float, M12, m12)
86 GETTERSETTER(
float, M13, m13)
87 GETTERSETTER(
float, M14, m14)
88 GETTERSETTER(
float, M15, m15)
101 return m0 == other.m0
120 return m0 == other.m0
142 ::SetMatrixProjection(*
this);
150 ::SetMatrixModelview(*
this);
158 return ::GetMatrixModelview();
165 return ::GetMatrixProjection();
168 #ifndef RAYLIB_CPP_NO_MATH
170 return ::MatrixTrace(*
this);
174 return ::MatrixTranspose(*
this);
178 return ::MatrixInvert(*
this);
182 return ::MatrixNormalize(*
this);
186 return ::MatrixIdentity();
190 return ::MatrixAdd(*
this, right);
194 return ::MatrixAdd(*
this, matrix);
198 return ::MatrixSubtract(*
this, right);
202 return ::MatrixSubtract(*
this, matrix);
206 return ::MatrixTranslate(x, y, z);
210 return ::MatrixRotate(axis, angle);
214 return ::MatrixRotateXYZ(angle);
218 return ::MatrixRotateX(angle);
222 return ::MatrixRotateY(angle);
226 return ::MatrixRotateZ(angle);
230 return ::MatrixScale(x, y, z);
234 return ::MatrixMultiply(*
this, right);
238 return ::MatrixMultiply(*
this, matrix);
242 double near,
double far) {
243 return ::MatrixFrustum(left, right, bottom, top, near, far);
247 return ::MatrixPerspective(fovy, aspect, near, far);
250 static Matrix Ortho(
double left,
double right,
double bottom,
double top,
251 double near,
double far) {
252 return ::MatrixOrtho(left, right, bottom, top, near, far);
256 return ::MatrixLookAt(eye, target, up);
260 return ::MatrixToFloatV(*
this);
271 ::SetShaderValueMatrix(shader, uniformLoc, *
this);
278 inline void set(const ::Matrix& mat) {
300 #endif // RAYLIB_CPP_INCLUDE_MATRIX_HPP_
Provides all the classes associated with raylib-cpp.
Matrix operator-(const ::Matrix &matrix)
bool operator==(::Matrix &other)
static Matrix Frustum(double left, double right, double bottom, double top, double near, double far)
Matrix(const ::Matrix &mat)
Matrix & SetShaderValue(::Shader shader, int uniformLoc)
Set shader uniform value (matrix 4x4)
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)
Matrix operator+(const ::Matrix &matrix)
Matrix operator*(const ::Matrix &matrix)
static Matrix RotateZ(float angle)
Matrix & SetProjection()
Set a custom projection matrix (replaces internal projection matrix)
Matrix & SetModelview()
Set a custom modelview matrix (replaces internal modelview matrix)
Matrix & operator=(const Matrix &matrix)
static Matrix RotateX(float angle)
static Matrix Perspective(double fovy, double aspect, double near, double far)
void set(const ::Matrix &mat)
Matrix Add(const ::Matrix &right)
static Matrix GetModelview()
Get internal modelview 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)
static Matrix LookAt(Vector3 eye, Vector3 target, Vector3 up)
Matrix Subtract(const ::Matrix &right)
static Matrix RotateY(float angle)
bool operator==(const Matrix &other)
static Matrix GetProjection()
Get internal projection matrix.
Matrix Multiply(const ::Matrix &right) const
static Matrix Ortho(double left, double right, double bottom, double top, double near, double far)