mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-10 13:31:49 +00:00
minor refactor
This commit is contained in:
parent
75e56ebd83
commit
7f8a86b740
35 changed files with 76 additions and 83 deletions
|
|
@ -1,34 +0,0 @@
|
|||
#ifndef WINDOW_CAMERA_H_
|
||||
#define WINDOW_CAMERA_H_
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
class Camera {
|
||||
void updateVectors();
|
||||
float fov;
|
||||
public:
|
||||
glm::vec3 front;
|
||||
glm::vec3 up;
|
||||
glm::vec3 right;
|
||||
glm::vec3 dir;
|
||||
|
||||
glm::vec3 position;
|
||||
|
||||
float zoom = 1.0f;
|
||||
glm::mat4 rotation {1.0f};
|
||||
bool perspective = true;
|
||||
bool flipped = false;
|
||||
float aspect = 0.0f;
|
||||
Camera(glm::vec3 position, float fov);
|
||||
|
||||
void rotate(float x, float y, float z);
|
||||
|
||||
glm::mat4 getProjection();
|
||||
glm::mat4 getView(bool position=true);
|
||||
glm::mat4 getProjView(bool position=true);
|
||||
|
||||
void setFov(float fov);
|
||||
float getFov() const;
|
||||
};
|
||||
|
||||
#endif /* WINDOW_CAMERA_H_ */
|
||||
Loading…
Add table
Add a link
Reference in a new issue