mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
feat: cameras saving/loading
This commit is contained in:
parent
45c4da048c
commit
a013e7eefd
8 changed files with 66 additions and 17 deletions
|
|
@ -5,20 +5,22 @@
|
|||
|
||||
class Camera {
|
||||
void updateVectors();
|
||||
float fov;
|
||||
float fov = 1.0f;
|
||||
public:
|
||||
glm::vec3 front;
|
||||
glm::vec3 up;
|
||||
glm::vec3 right;
|
||||
glm::vec3 dir;
|
||||
glm::vec3 front {};
|
||||
glm::vec3 up {};
|
||||
glm::vec3 right {};
|
||||
glm::vec3 dir {};
|
||||
|
||||
glm::vec3 position;
|
||||
glm::vec3 position {};
|
||||
|
||||
float zoom = 1.0f;
|
||||
glm::mat4 rotation {1.0f};
|
||||
bool perspective = true;
|
||||
bool flipped = false;
|
||||
float aspect = 0.0f;
|
||||
|
||||
Camera() {}
|
||||
Camera(glm::vec3 position, float fov);
|
||||
|
||||
void rotate(float x, float y, float z);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue