![]() |
Fling Engine
0.00.1
Fling Engine is a game engine written in Vulkan
|
A simple first person camera. More...
#include <FirstPersonCamera.h>
Inherits Fling::Camera.
Public Member Functions | |
| FirstPersonCamera (float aspectRatio, float t_MoveSpeed=10.0f, float t_RotSpeed=40.f) | |
| FirstPersonCamera (glm::vec3 position, glm::vec3 rotation, float speed, float aspectRatio) | |
| FirstPersonCamera (glm::vec3 front, glm::vec3 up, glm::vec3 position, glm::vec3 rotation, float speed, float nearPlane, float farPlane, float fov, float aspectRatio) | |
| void | Update (float dt) override |
| float | GetRotationSpeed () const |
| void | SetRotationSpeed (float t_NewSpeed) |
| bool | IsRotating () const |
Public Member Functions inherited from Fling::Camera | |
| Camera () | |
| virtual | ~Camera ()=default |
| const float | GetNearPlane () const |
| Gets the near plane of the view frustrum. More... | |
| void | SetNearPlane (const float &nearPlane) |
| const float | GetFarPlane () const |
| Gets the far plane of the view frustrum. More... | |
| void | SetFarPlane (const float &farPlane) |
| const float | GetFieldOfView () const |
| Gets the field of view angle from the view frustrum. More... | |
| void | SetFieldOfView (const float &fieldOfView) |
| const glm::vec3 & | GetPosition () const |
| const glm::vec3 & | GetRotation () const |
| const float | GetSpeed () const |
| const float | GetAspectRatio () const |
| const glm::mat4 & | GetViewMatrix () const |
| Gets the view matrix created by the current camera position and rotation. More... | |
| const glm::mat4 & | GetProjectionMatrix () const |
| Gets the projection matrix used by camera. More... | |
| float | GetGamma () const |
| void | SetGamma (float t_Gam) |
| float | GetExposure () const |
| void | SetExposure (float t_Val) |
Private Member Functions | |
| void | UpdateViewMatrix () |
| void | UpdateProjectionMatrix () |
| void | UpdateCameraVectors () |
Private Attributes | |
| glm::vec3 | m_front |
| glm::vec3 | m_up |
| glm::vec3 | m_right |
| glm::vec3 | m_worldUp |
| glm::vec3 | m_worldFront = { 0.f, 0.f, -1.0 } |
| float | m_RotationSpeed = 20.0f |
| bool | m_IsRotating = false |
| const float | MAX_PITCH = (glm::pi<float>() / 2.0f) - .017f |
| MousePos | m_PrevMousePos |
Additional Inherited Members | |
Protected Attributes inherited from Fling::Camera | |
| glm::mat4 | m_viewMatrix |
| glm::mat4 | m_projectionMatrix |
| glm::vec3 | m_position |
| float | m_speed |
| glm::vec3 | m_rotation |
| float | m_aspectRatio |
| float | m_nearPlane |
| float | m_farPlane |
| float | m_fieldOfView |
| float | m_Gamma = 2.2f |
| float | m_Exposure = 4.5f |
A simple first person camera.
Moves with WASD and rotates with right click + drag
| Fling::FirstPersonCamera::FirstPersonCamera | ( | float | aspectRatio, |
| float | t_MoveSpeed = 10.0f, |
||
| float | t_RotSpeed = 40.f |
||
| ) |
| Fling::FirstPersonCamera::FirstPersonCamera | ( | glm::vec3 | position, |
| glm::vec3 | rotation, | ||
| float | speed, | ||
| float | aspectRatio | ||
| ) |
| Fling::FirstPersonCamera::FirstPersonCamera | ( | glm::vec3 | front, |
| glm::vec3 | up, | ||
| glm::vec3 | position, | ||
| glm::vec3 | rotation, | ||
| float | speed, | ||
| float | nearPlane, | ||
| float | farPlane, | ||
| float | fov, | ||
| float | aspectRatio | ||
| ) |
|
inline |
|
inline |
|
inline |
|
overridevirtual |
Implements Fling::Camera.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
1.8.13