Brenta Engine 1.1
|
Translation util class. More...
#include <translation.hpp>
Public Member Functions | |
translation () | |
Translation constructor. | |
translation (glm::mat4 view, glm::mat4 projection, glm::mat4 model) | |
Translation constructor. | |
void | set_view (glm::mat4 view) |
Set the view matrix. | |
void | set_projection (glm::mat4 projection) |
Set the projection matrix. | |
void | set_projection (float fov, float near, float far) |
Set the model matrix. | |
void | set_model (glm::mat4 model) |
Set the model matrix. | |
void | translate (glm::vec3 translation) |
Translate the object. | |
void | rotate (glm::vec3 rotation) |
Rotate the object. | |
void | scale (float scale) |
Scale the object. | |
void | set_shader (types::shader_name_t shader_name) |
Set the shader. | |
Data Fields | |
glm::mat4 | view |
Camera view matrix. | |
glm::mat4 | projection |
Camera projection matrix. | |
glm::mat4 | model |
Object position matrix. | |
Translation util class.
This class is used to store the view, projection, and model matrices of an object. The matrices can be set using the setView, setProjection, and setModel methods.
Definition at line 48 of file translation.hpp.
translation::translation | ( | ) |
Translation constructor.
This constructor initializes the view, projection, and model matrices to the identity matrix.
Definition at line 31 of file translation.cpp.
translation::translation | ( | glm::mat4 | view, |
glm::mat4 | projection, | ||
glm::mat4 | model ) |
Translation constructor.
This constructor initializes the view, projection, and model matrices to the given matrices.
view | The view matrix |
projection | The projection matrix |
model | The model matrix |
Definition at line 38 of file translation.cpp.
void translation::rotate | ( | glm::vec3 | rotation | ) |
Rotate the object.
rotation | The rotation vector |
Definition at line 73 of file translation.cpp.
void translation::scale | ( | float | scale | ) |
void translation::set_model | ( | glm::mat4 | model | ) |
Set the model matrix.
model | The model matrix |
Definition at line 62 of file translation.cpp.
void translation::set_projection | ( | float | fov, |
float | near, | ||
float | far ) |
Set the model matrix.
model | The model matrix |
Definition at line 50 of file translation.cpp.
void translation::set_projection | ( | glm::mat4 | projection | ) |
Set the projection matrix.
projection | The projection matrix |
Definition at line 57 of file translation.cpp.
void translation::set_shader | ( | types::shader_name_t | shader_name | ) |
Set the shader.
shader_name | The shader name |
Definition at line 88 of file translation.cpp.
void translation::set_view | ( | glm::mat4 | view | ) |
void translation::translate | ( | glm::vec3 | translation | ) |
Translate the object.
translation | The translation vector |
Definition at line 67 of file translation.cpp.
glm::mat4 brenta::types::translation::model |
Object position matrix.
Definition at line 62 of file translation.hpp.
glm::mat4 brenta::types::translation::projection |
Camera projection matrix.
Definition at line 58 of file translation.hpp.
glm::mat4 brenta::types::translation::view |
Camera view matrix.
Definition at line 54 of file translation.hpp.