|
| ControllableCamera () |
| Constructor.
|
|
void | pose (const glm::vec3 &position, const glm::vec3 ¢er, const glm::vec3 &up) override |
|
void | reset () |
| Reset the position of the camera.
|
|
void | update () |
| Update once-per-frame parameters.
|
|
void | physics (double frameTime) |
|
float & | speed () |
|
void | interface () |
|
| Camera () |
| Constructor.
|
|
virtual void | pose (const glm::vec3 &position, const glm::vec3 ¢er, const glm::vec3 &up) |
|
virtual void | projection (float ratio, float fov, float near, float far) |
|
void | frustum (float near, float far) |
|
void | ratio (float ratio) |
|
void | fov (float fov) |
|
void | pixelShifts (glm::vec3 &corner, glm::vec3 &dx, glm::vec3 &dy) const |
|
float | fov () const |
|
float | ratio () const |
|
const glm::mat4 & | view () const |
|
const glm::mat4 & | projection () const |
|
const glm::vec3 & | position () const |
|
const glm::vec3 & | up () const |
|
const glm::vec3 & | center () const |
|
const glm::vec3 | direction () const |
|
const glm::vec2 & | clippingPlanes () const |
|
void | apply (const Camera &camera) |
|
bool | decode (const KeyValues ¶ms) |
|
KeyValues | encode () const |
|
virtual | ~Camera ()=default |
|
| Camera (const Camera &)=default |
|
Camera & | operator= (const Camera &)=default |
|
| Camera (Camera &&)=default |
|
Camera & | operator= (Camera &&)=default |
|
|
void | updateProjection () |
| Update the projection matrix using the camera parameters.
|
|
void | updateView () |
| Update the view matrix using the camera position and orientation.
|
|
glm::mat4 | _view = glm::mat4(1.0f) |
| The view matrix.
|
|
glm::mat4 | _projection = glm::mat4(1.0f) |
| The projection matrix.
|
|
glm::vec3 | _eye = glm::vec3(0.0, 0.0, 1.0) |
| The camera position.
|
|
glm::vec3 | _center = glm::vec3(0.0, 0.0, 0.0) |
| The camera center (look-at point)
|
|
glm::vec3 | _up = glm::vec3(0.0, 1.0, 0.0) |
| The camera up vector.
|
|
glm::vec3 | _right = glm::vec3(1.0, 0.0, 0.0) |
| The camera right vector.
|
|
glm::vec2 | _clippingPlanes = glm::vec2(0.01f, 100.0f) |
| The near and far plane distances.
|
|
float | _fov = 1.3f |
| The vertical field of view, in radians.
|
|
float | _ratio = 1.0f |
| The aspect ratio.
|
|
This camera can be controlled through the inputs received from the user.
It support turntable, fps and josytick based navigation methods, and handles their synchronization.