|
Brenta Engine 1.2
|
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 (int window_width, int window_height, 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. | |
| bool | set_shader (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 set_view(), set_projection(), and set_model() methods.
Definition at line 26 of file translation.hpp.
| translation::translation | ( | ) |
Translation constructor.
This constructor initializes the view, projection, and model matrices to the identity matrix.
Definition at line 10 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 17 of file translation.cpp.
| void translation::rotate | ( | glm::vec3 | rotation | ) |
Rotate the object.
| rotation | The rotation vector |
Definition at line 53 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 42 of file translation.cpp.
| void translation::set_projection | ( | glm::mat4 | projection | ) |
Set the projection matrix.
| projection | The projection matrix |
Definition at line 37 of file translation.cpp.
| void translation::set_projection | ( | int | window_width, |
| int | window_height, | ||
| float | fov, | ||
| float | near, | ||
| float | far | ||
| ) |
Set the model matrix.
| model | The model matrix |
Definition at line 29 of file translation.cpp.
| bool translation::set_shader | ( | shader::name_t | shader_name | ) |
Set the shader.
| shader_name | The shader name |
Definition at line 68 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 47 of file translation.cpp.
| glm::mat4 brenta::types::translation::model |
Object position matrix.
Definition at line 40 of file translation.hpp.
| glm::mat4 brenta::types::translation::projection |
Camera projection matrix.
Definition at line 36 of file translation.hpp.
| glm::mat4 brenta::types::translation::view |
Camera view matrix.
Definition at line 32 of file translation.hpp.