Contains the Mat4 structure with functions and overloaded operators. This is row major.
More...
#include <Mat4.h>
|
| Mat4 () |
| Constructs the Mat4 setting the values of the matrix to 0. More...
|
|
| Mat4 (Vec4 v1, Vec4 v2, Vec4 v3, Vec4 v4) |
| Constructs the Mat4 setting the values to the input vectors. More...
|
|
Mat4 * | operator+= (Mat4 mIn) |
| Overloads the += operator. More...
|
|
Mat4 * | operator-= (Mat4 mIn) |
| Overloads the -= operator. More...
|
|
void | setAsIdentityMatrix () |
| Sets the values of the matrix to that of a identity matrix. More...
|
|
void | setAsPerspectiveMatrix (float fovy, float aspect, float n, float f) |
| Sets the values of the matrix to that of a Perspective matrix. More...
|
|
void | setPos (Vec3 pv) |
| Sets the position of the matrix using the input vector. More...
|
|
void | setPos (Mat4 &matrix, Vec3 pos) |
|
void | scale (Mat4 &matrix, float sv) |
| Scales the matrix using the input vector. More...
|
|
void | translate (Mat4 &matrix, Vec3 tv) |
| Translates the matrix using the input vector. More...
|
|
void | rotateAlongX (Mat4 &matrix, float angle) |
| Rotate the matrix using the angle of rotation along the x axis. More...
|
|
void | rotateAlongY (Mat4 &matrix, float angle) |
| Rotate the matrix using the angle of rotation along the y axis. More...
|
|
void | rotateAlongZ (Mat4 &matrix, float angle) |
| Rotate the matrix using the angle of rotation along the z axis. More...
|
|
void | rotatePointAroundXAxis (Mat4 &matrix, Maths::Vec3 axisPoint, float angle) |
|
void | rotatePointAroundYAxis (Mat4 &matrix, Maths::Vec3 axisPoint, float angle) |
|
void | rotatePointAroundZAxis (Mat4 &matrix, Maths::Vec3 axisPoint, float angle) |
|
Vec3 | getPos () |
| Gets the position of the matrix. More...
|
|
float * | getMatrixArray () |
| A function to get a pointer to the first index of the array. More...
|
|
Contains the Mat4 structure with functions and overloaded operators. This is row major.
◆ Mat4() [1/2]
Constructs the Mat4 setting the values of the matrix to 0.
◆ Mat4() [2/2]
Constructs the Mat4 setting the values to the input vectors.
- Parameters
-
v1 | The first inputed vector. |
v2 | The second inputed vector. |
v3 | The third inputed vector. |
v4 | The forth inputed vector. |
◆ getMatrixArray()
float* Maths::Mat4::getMatrixArray |
( |
| ) |
|
|
inline |
A function to get a pointer to the first index of the array.
- Returns
- A pointer to the first index of the array.
◆ getPos()
Vec3 Maths::Mat4::getPos |
( |
| ) |
|
|
inline |
Gets the position of the matrix.
- Returns
- pv The position of the matrix as a vec3.
◆ operator+=()
Mat4* Maths::Mat4::operator+= |
( |
Mat4 |
mIn | ) |
|
|
inline |
Overloads the += operator.
- Parameters
-
- Returns
- The new matrix.
◆ operator-=()
Mat4* Maths::Mat4::operator-= |
( |
Mat4 |
mIn | ) |
|
|
inline |
Overloads the -= operator.
- Parameters
-
- Returns
- The new matrix.
◆ rotateAlongX()
void Maths::Mat4::rotateAlongX |
( |
Mat4 & |
matrix, |
|
|
float |
angle |
|
) |
| |
Rotate the matrix using the angle of rotation along the x axis.
- Parameters
-
matrix | A pointer to the matrix to rotate. |
angle | The angle to rotate the matrix by. |
format | The type of angle, must be a Radian |
◆ rotateAlongY()
void Maths::Mat4::rotateAlongY |
( |
Mat4 & |
matrix, |
|
|
float |
angle |
|
) |
| |
Rotate the matrix using the angle of rotation along the y axis.
- Parameters
-
matrix | A pointer to the matrix to rotate. |
angle | The angle to rotate the matrix by. |
format | The type of angle, must be a Radian |
◆ rotateAlongZ()
void Maths::Mat4::rotateAlongZ |
( |
Mat4 & |
matrix, |
|
|
float |
angle |
|
) |
| |
Rotate the matrix using the angle of rotation along the z axis.
- Parameters
-
matrix | A pointer to the matrix to rotate. |
angle | The angle to rotate the matrix by. |
format | The type of angle, must be a Radian |
◆ rotatePointAroundXAxis()
void Maths::Mat4::rotatePointAroundXAxis |
( |
Mat4 & |
matrix, |
|
|
Maths::Vec3 |
axisPoint, |
|
|
float |
angle |
|
) |
| |
◆ rotatePointAroundYAxis()
void Maths::Mat4::rotatePointAroundYAxis |
( |
Mat4 & |
matrix, |
|
|
Maths::Vec3 |
axisPoint, |
|
|
float |
angle |
|
) |
| |
◆ rotatePointAroundZAxis()
void Maths::Mat4::rotatePointAroundZAxis |
( |
Mat4 & |
matrix, |
|
|
Maths::Vec3 |
axisPoint, |
|
|
float |
angle |
|
) |
| |
◆ scale()
void Maths::Mat4::scale |
( |
Mat4 & |
matrix, |
|
|
float |
sv |
|
) |
| |
Scales the matrix using the input vector.
- Parameters
-
angle | The angle to rotate the matrix by. |
sV | The scale vector vec3 to scale the matrix by. |
◆ setAsIdentityMatrix()
void Maths::Mat4::setAsIdentityMatrix |
( |
| ) |
|
|
inline |
Sets the values of the matrix to that of a identity matrix.
◆ setAsPerspectiveMatrix()
void Maths::Mat4::setAsPerspectiveMatrix |
( |
float |
fovy, |
|
|
float |
aspect, |
|
|
float |
n, |
|
|
float |
f |
|
) |
| |
|
inline |
Sets the values of the matrix to that of a Perspective matrix.
- Parameters
-
fovy | The field of view on the y axis. |
a | The aspect. |
f | The z plane which is far from the camera. |
n | The z plane closer to the camera. |
◆ setPos() [1/2]
void Maths::Mat4::setPos |
( |
Vec3 |
pv | ) |
|
|
inline |
Sets the position of the matrix using the input vector.
- Parameters
-
pv | The position vector vec3 to set the matrix position. |
◆ setPos() [2/2]
void Maths::Mat4::setPos |
( |
Mat4 & |
matrix, |
|
|
Vec3 |
pos |
|
) |
| |
◆ translate()
void Maths::Mat4::translate |
( |
Mat4 & |
matrix, |
|
|
Vec3 |
tv |
|
) |
| |
Translates the matrix using the input vector.
- Parameters
-
matrix | A pointer to the matrix to rotate. |
tv | The translation vector vec3 to set the matrix position. |
matrix variables [00]x [01]y [02]z [03]w [04]x [05]y [06]z [07]w [08]x [09]y [10]z [11]w [12]x [13]y [14]z [15]w
The documentation for this struct was generated from the following files: