TerraForge3D  2.3.1
3D Terrain And Landscape Generator
Camera.h
1#pragma once
2
3#include <glm/glm.hpp>
4
5#include "json/json.hpp"
6
7
8class Camera
9{
10public:
11 glm::mat4 view;
12 glm::mat4 pers;
13 glm::mat4 pv;
14 glm::vec3 mposition;
15 glm::vec3 mrotation;
16 glm::vec3 cameraFront = glm::vec3(0.0f, 0.0f, -1.0f);
17 glm::vec3 cameraUp = glm::vec3(0.0f, 1.0f, 0.0f);
18
19 float pitch;
20 float yaw;
21 float roll;
22
23 float fov;
24 float cFar;
25 float cNear;
26 float aspect;
27
28 int camID; // May be removed in future
29
30 float position[3];
31 float rotation[3];
32
33 bool perspective;
34
35 Camera(bool perspective = true);
36
37 nlohmann::json Save();
38
39 void Load(nlohmann::json data);
40
41 void ShowSettings(bool renderWindow = false, bool *pOpen = nullptr);
42
43 void UpdateCamera(float xmax = 800.0f, float ymax=600.0f);
44};
Definition: Camera.h:9
a class to store JSON values
Definition: json.hpp:17860