5 #include <ThirdParty/glm/glm/glm.hpp> 26 Camera(glm::vec3 position, glm::vec3 rotation,
float fov,
float aspectRatio,
float zNear,
float zFar);
29 ~
Camera() noexcept =
default;
43 float GetAspectRatio()
const;
48 glm::vec2 GetClippingPlanes()
const;
53 glm::vec3 GetUp()
const;
58 glm::vec3 GetRight()
const;
63 glm::vec3 GetPosition()
const;
68 glm::vec3 GetRotation()
const;
73 glm::mat4x4 GetView()
const;
78 glm::mat4x4 GetProjection()
const;
83 glm::mat4x4 GetViewProjection()
const;
97 void SetProjection(
float fov,
float aspectRatio,
float zNear,
float zFar);
103 void SetView(glm::mat4x4 view);
113 void SetViewProjection(glm::mat4x4 view,
float fov,
float aspectRatio,
float zNear,
float zFar);
120 void UpdateFrustum(glm::vec3 right, glm::vec3 up);
126 void UpdateRotationOffset(glm::vec2 rotationOffset);
132 void MoveLeft(
float distanceToMove);
138 void MoveRight(
float distanceToMove);
144 void MoveForwards(
float distanceToMove);
150 void MoveBackwards(
float distanceToMove);
157 void SetPostionAndRotation(glm::vec3 position, glm::vec3 rotation);
163 void SetPosition(glm::vec3 position);
169 void SetRotation(glm::vec3 rotation);
174 float horizontalAngle;
176 glm::vec2 clippingPlanes;
180 glm::mat4x4 projection;
This class is used for the creation of a camera.
This object is used to keep track of the frustum area of the view and projection matrix. NOTE: only the Camera class is allowed to create this object.