feat: assignment 2

This commit is contained in:
2025-10-13 15:04:53 +02:00
parent 986e31dbef
commit f981cee4e0
17 changed files with 649 additions and 56 deletions

46
src/camera.h Normal file
View File

@@ -0,0 +1,46 @@
#ifndef CAMERA_H_
#define CAMERA_H_
#include "entity.h"
#include "../lib/glm/glm.hpp"
class Camera : public Entity {
public:
Camera();
const glm::mat4& getProjection() const
{
return projection_;
}
void setProjection(const glm::mat4& proj)
{
projection_ = proj;
}
const glm::ivec4& getViewport() const
{
return viewport_;
}
void setViewport(const glm::ivec4& vp)
{
viewport_ = vp;
}
const glm::vec3& getClearColor() const
{
return clearColor_;
}
void setClearColor(const glm::vec3& color)
{
clearColor_ = color;
}
void prepare();
private:
glm::mat4 projection_;
glm::ivec4 viewport_;
glm::vec3 clearColor_;
};
#endif // CAMERA_H_