Commit 2b6a5f79 authored by Patrik Huber's avatar Patrik Huber

Add getters and setters to RenderingParameters

These are required for extract_texture in Matlab.
Maybe the better strategy would be to add a constructor to RenderingParameters and not have all these setters.
parent 65b31de8
......@@ -142,6 +142,15 @@ public:
return rotation;
};
void set_rotation(glm::quat rotation_quaternion) {
rotation = rotation_quaternion;
};
void set_translation(float t_x, float t_y) {
this->t_x = t_x;
this->t_y = t_y;
};
glm::mat4x4 get_modelview() const {
glm::mat4x4 modelview = glm::mat4_cast(rotation);
modelview[3][0] = t_x;
......@@ -163,14 +172,26 @@ public:
return frustum;
};
void set_frustum(Frustum frustum) {
this->frustum = frustum;
};
int get_screen_width() const {
return screen_width;
};
void set_screen_width(int screen_width) {
this->screen_width = screen_width;
};
int get_screen_height() const {
return screen_height;
};
void set_screen_height(int screen_height) {
this->screen_height = screen_height;
};
private:
CameraType camera_type = CameraType::Orthographic;
Frustum frustum; // Can construct a glm::ortho or glm::perspective matrix from this.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment