Class for camera.
More...
#include <Camera.hpp>
|
| | Camera (const glm::vec3 position, const glm::vec3 rotation, const glm::vec3 direction, const float moveSpeed=CAMERA::MOVE_SPEED, const float lookSpeed=CAMERA::LOOK_SPEED, const float fov=CAMERA::FOV, const float nearPlane=CAMERA::NEAR_PLANE, const float farPlane=CAMERA::FAR_PLANE) |
| |
| | ~Camera ()=default |
| |
| | Camera (const Camera &)=delete |
| |
| Camera & | operator= (const Camera &)=delete |
| |
| | Camera (Camera &&)=delete |
| |
| Camera & | operator= (Camera &&)=delete |
| |
| void | setName (const std::string &name) |
| |
| void | setPosition (const glm::vec3 &position) |
| |
| void | setRotation (const glm::vec3 &rotation) |
| |
| void | setDirection (const glm::vec3 &direction) |
| |
| void | setMoveSpeed (const float speed) |
| |
| void | setLookSpeed (const float speed) |
| |
| void | setFov (const float fov) |
| |
| void | setNear (const float nearPlane) |
| |
| void | setFar (const float farPlane) |
| |
| const std::string & | getName () const |
| |
| const glm::vec3 & | getPosition () const |
| |
| const glm::vec3 & | getRotation () const |
| |
| const glm::vec3 & | getDirection () const |
| |
| const float & | getMoveSpeed () const |
| |
| const float & | getLookSpeed () const |
| |
| const float & | getFov () const |
| |
| const float & | getNear () const |
| |
| const float & | getFar () const |
| |
| glm::mat4 | getViewMatrix () const |
| |
| glm::mat4 | getProjectionMatrix (const float aspectRatio) const |
| |
| glm::mat4 | getViewProjection (const float aspectRatio) const |
| |
| void | move (const glm::vec3 &direction, const float deltaTime) |
| | Move the camera in a given direction.
|
| |
| void | rotate (const float yawOffset, const float pitchOffset, const float deltaTime) |
| | Rotate the camera by given yaw and pitch offsets.
|
| |
Class for camera.
Definition at line 23 of file Camera.hpp.
◆ Camera() [1/3]
◆ ~Camera()
◆ Camera() [2/3]
| cae::Camera::Camera |
( |
const Camera & | | ) |
|
|
delete |
◆ Camera() [3/3]
| cae::Camera::Camera |
( |
Camera && | | ) |
|
|
delete |
◆ getDirection()
| const glm::vec3 & cae::Camera::getDirection |
( |
| ) |
const |
|
inlinenodiscard |
◆ getFar()
| const float & cae::Camera::getFar |
( |
| ) |
const |
|
inlinenodiscard |
◆ getFov()
| const float & cae::Camera::getFov |
( |
| ) |
const |
|
inlinenodiscard |
◆ getLookSpeed()
| const float & cae::Camera::getLookSpeed |
( |
| ) |
const |
|
inlinenodiscard |
◆ getMoveSpeed()
| const float & cae::Camera::getMoveSpeed |
( |
| ) |
const |
|
inlinenodiscard |
◆ getName()
| const std::string & cae::Camera::getName |
( |
| ) |
const |
|
inlinenodiscard |
◆ getNear()
| const float & cae::Camera::getNear |
( |
| ) |
const |
|
inlinenodiscard |
◆ getPosition()
| const glm::vec3 & cae::Camera::getPosition |
( |
| ) |
const |
|
inlinenodiscard |
◆ getProjectionMatrix()
| glm::mat4 cae::Camera::getProjectionMatrix |
( |
const float | aspectRatio | ) |
const |
|
inlinenodiscard |
◆ getRotation()
| const glm::vec3 & cae::Camera::getRotation |
( |
| ) |
const |
|
inlinenodiscard |
◆ getViewMatrix()
| glm::mat4 cae::Camera::getViewMatrix |
( |
| ) |
const |
|
inlinenodiscard |
◆ getViewProjection()
| glm::mat4 cae::Camera::getViewProjection |
( |
const float | aspectRatio | ) |
const |
|
inlinenodiscard |
◆ move()
| void cae::Camera::move |
( |
const glm::vec3 & | direction, |
|
|
const float | deltaTime ) |
|
inline |
Move the camera in a given direction.
- Parameters
-
| direction | Direction to move the camera |
| deltaTime | Time delta for movement |
Definition at line 79 of file Camera.hpp.
References m_moveSpeed, and m_position.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ rotate()
| void cae::Camera::rotate |
( |
const float | yawOffset, |
|
|
const float | pitchOffset, |
|
|
const float | deltaTime ) |
|
inline |
◆ setDirection()
| void cae::Camera::setDirection |
( |
const glm::vec3 & | direction | ) |
|
|
inline |
◆ setFar()
| void cae::Camera::setFar |
( |
const float | farPlane | ) |
|
|
inline |
◆ setFov()
| void cae::Camera::setFov |
( |
const float | fov | ) |
|
|
inline |
◆ setLookSpeed()
| void cae::Camera::setLookSpeed |
( |
const float | speed | ) |
|
|
inline |
◆ setMoveSpeed()
| void cae::Camera::setMoveSpeed |
( |
const float | speed | ) |
|
|
inline |
◆ setName()
| void cae::Camera::setName |
( |
const std::string & | name | ) |
|
|
inline |
◆ setNear()
| void cae::Camera::setNear |
( |
const float | nearPlane | ) |
|
|
inline |
◆ setPosition()
| void cae::Camera::setPosition |
( |
const glm::vec3 & | position | ) |
|
|
inline |
◆ setRotation()
| void cae::Camera::setRotation |
( |
const glm::vec3 & | rotation | ) |
|
|
inline |
◆ updateDirectionFromRotation()
| void cae::Camera::updateDirectionFromRotation |
( |
| ) |
|
|
inlineprivate |
◆ m_direction
| glm::vec3 cae::Camera::m_direction = glm::vec3(0.0F, 0.0F, -1.0F) |
|
private |
◆ m_far
◆ m_fov
◆ m_lookSpeed
◆ m_moveSpeed
◆ m_name
◆ m_near
◆ m_position
| glm::vec3 cae::Camera::m_position = glm::vec3(0.0F, 0.0F, 0.0F) |
|
private |
◆ m_rotation
| glm::vec3 cae::Camera::m_rotation = glm::vec3(0.0F, 0.0F, 0.0F) |
|
private |
The documentation for this class was generated from the following file: