Brenta Engine 1.2
Loading...
Searching...
No Matches
translation.hpp
1// SPDX-License-Identifier: MIT
2// Author: Giovanni Santini
3// Mail: giovanni.santini@proton.me
4// Github: @San7o
5
6#pragma once
7
8#include <brenta/shader.hpp>
9#include <glm/glm.hpp>
10#include <glm/gtc/matrix_transform.hpp>
11#include <glm/gtc/type_ptr.hpp>
12
13namespace brenta
14{
15
16namespace types
17{
18
27{
28public:
32 glm::mat4 view;
36 glm::mat4 projection;
40 glm::mat4 model;
41
58 translation(glm::mat4 view, glm::mat4 projection, glm::mat4 model);
59
64 void set_view(glm::mat4 view);
69 void set_projection(glm::mat4 projection);
74 void set_projection(int window_width, int window_height,
75 float fov, float near, float far);
80 void set_model(glm::mat4 model);
85 void translate(glm::vec3 translation);
90 void rotate(glm::vec3 rotation);
95 void scale(float scale);
100 bool set_shader(types::shader_name_t shader_name);
101};
102
103} // namespace types
104
105} // namespace brenta
Model class.
Definition model.hpp:26
Translation util class.
void set_projection(glm::mat4 projection)
Set the projection matrix.
glm::mat4 projection
Camera projection matrix.
glm::mat4 model
Object position matrix.
void set_model(glm::mat4 model)
Set the model matrix.
void set_view(glm::mat4 view)
Set the view matrix.
glm::mat4 view
Camera view matrix.
bool set_shader(types::shader_name_t shader_name)
Set the shader.
void translate(glm::vec3 translation)
Translate the object.
void scale(float scale)
Scale the object.
translation()
Translation constructor.
void rotate(glm::vec3 rotation)
Rotate the object.