Basic camera class working
This commit is contained in:
25
headers/camera.hpp
Normal file
25
headers/camera.hpp
Normal 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
|
||||
Reference in New Issue
Block a user