3#include "system/Codable.hpp"
36 void frustum(
float near,
float far);
54 void pixelShifts(glm::vec3 & corner, glm::vec3 & dx, glm::vec3 & dy)
const;
90 const glm::vec3 &
up()
const {
return _up; }
165 glm::vec3
_eye = glm::vec3(0.0, 0.0, 1.0);
167 glm::vec3
_up = glm::vec3(0.0, 1.0, 0.0);
168 glm::vec3
_right = glm::vec3(1.0, 0.0, 0.0);
This class represents a camera as used in real-time rendering APIs. It provides a view and projection...
Definition: Camera.hpp:11
Camera()
Constructor.
Definition: Camera.cpp:5
float fov() const
Definition: Camera.hpp:60
glm::vec3 _eye
The camera position.
Definition: Camera.hpp:165
const glm::mat4 & projection() const
Definition: Camera.hpp:78
float _ratio
The aspect ratio.
Definition: Camera.hpp:173
Camera(const Camera &)=default
Camera & operator=(const Camera &)=default
Camera(Camera &&)=default
glm::vec3 _up
The camera up vector.
Definition: Camera.hpp:167
void updateProjection()
Update the projection matrix using the camera parameters.
Definition: Camera.cpp:51
bool decode(const KeyValues ¶ms)
Definition: Camera.cpp:66
glm::vec3 _right
The camera right vector.
Definition: Camera.hpp:168
glm::mat4 _projection
The projection matrix.
Definition: Camera.hpp:162
glm::mat4 _view
The view matrix.
Definition: Camera.hpp:161
glm::vec2 _clippingPlanes
The near and far plane distances.
Definition: Camera.hpp:170
Camera & operator=(Camera &&)=default
const glm::vec2 & clippingPlanes() const
Definition: Camera.hpp:108
void pixelShifts(glm::vec3 &corner, glm::vec3 &dx, glm::vec3 &dy) const
Definition: Camera.cpp:42
float ratio() const
Definition: Camera.hpp:66
void updateView()
Update the view matrix using the camera position and orientation.
Definition: Camera.cpp:56
const glm::vec3 & up() const
Definition: Camera.hpp:90
glm::vec3 _center
The camera center (look-at point)
Definition: Camera.hpp:166
const glm::vec3 & center() const
Definition: Camera.hpp:96
const glm::vec3 & position() const
Definition: Camera.hpp:84
virtual void pose(const glm::vec3 &position, const glm::vec3 ¢er, const glm::vec3 &up)
Definition: Camera.cpp:10
virtual ~Camera()=default
void frustum(float near, float far)
Definition: Camera.cpp:27
float _fov
The vertical field of view, in radians.
Definition: Camera.hpp:172
const glm::vec3 direction() const
Definition: Camera.hpp:102
const glm::mat4 & view() const
Definition: Camera.hpp:72
KeyValues encode() const
Definition: Camera.cpp:109
void apply(const Camera &camera)
Definition: Camera.cpp:60
Represent a key-values tuple.
Definition: Config.hpp:9