Basic camera class working

This commit is contained in:
k
2025-01-22 09:58:38 -05:00
parent 16d9959ace
commit 452e9bdc92
3 changed files with 71 additions and 16 deletions

25
headers/camera.hpp Normal file
View File

@@ -0,0 +1,25 @@
#ifndef CAMERA_H
#define CAMERA_H
#include <glm/glm.hpp>
class Camera {
public:
Camera(glm::vec3 pos, float yaw, float pitch, float fov, float aspect);
~Camera();
void setPos(glm::vec3 pos);
void setRotate(float yaw, float pitch);
glm::mat4 getView();
glm::mat4 getProjection();
private:
void update();
glm::mat4 projection;
glm::vec3 up;
glm::vec3 front;
glm::vec3 pos;
float yaw;
float pitch;
float fov;
float aspect;
};
#endif