|
Vesper 0.5.1
Vesper is short form for the Latin word for "Bat", as Vesper is designed to be small, lightweight, and easily handle things like particles and flocking behaviors in accordance with the nature of bats. \n It is meant to be a particle simulation, VFX editor, and CAN be used secondarily as a small game engine. GitHub | Vesper Updates | Creator |
#include <OrthographicCameraController.h>
Public Member Functions | |
| OrthographicCameraController (float aspectRatio, bool rotation=false) | |
| void | OnUpdate (Timestep ts) |
| void | OnEvent (Event &e) |
| void | OnResize (float width, float height) |
| OrthographicCamera & | GetCamera () |
| const OrthographicCamera & | GetCamera () const |
| OrthographicCameraBounds | GetBounds () const |
| glm::vec3 | GetPosition () const |
| void | SetPosition (float x, float y) |
| void | SetMoveSpeed (float speed) |
| float | GetMoveSpeed () const |
| void | SetRotation (float rotation) |
| float | GetRotation () const |
| void | SetRotationSpeed (float speed) |
| float | GetRotationSpeed () const |
| float | GetAspectRatio () const |
| void | SetAspectRatio (float aspectRatio) |
| bool | CanRotate () const |
| void | SetCanRotate (bool canRotate) |
| void | SetZoomLevel (float level) |
| float | GetZoomLevel () const |
| void | OnImGuiRender () |
| TODO: move to an editor component that can be attached to any system (EditorAbstractionComp). | |
Private Member Functions | |
| bool | OnMouseScrolled (MouseScrolledEvent &e) |
| bool | OnWindowResized (WindowResizeEvent &e) |
| void | UpdateCameraBounds () |
| void | OnUpdateBounds () |
| void | CalculateView () |
Private Attributes | |
| float | m_AspectRatio |
| float | m_ZoomLevel = 1.0f |
| OrthographicCamera | camera |
| OrthographicCameraBounds | m_Bounds |
| bool | m_Rotation = true |
| glm::vec3 | m_CameraPosition = { 0.0f, 0.0f, 0.0f } |
| float | m_CameraRotation = 0.0f |
| float | m_CameraMoveSpeed = 5.0f |
| float | m_CameraRotationSpeed = 180.0f |
| Vesper::OrthographicCameraController::OrthographicCameraController | ( | float | aspectRatio, |
| bool | rotation = false ) |
References m_AspectRatio, m_Bounds, m_Rotation, m_ZoomLevel, and OrthographicCameraController().
Referenced by OrthographicCameraController().
|
private |
References UpdateCameraBounds().
Referenced by OnMouseScrolled(), OnResize(), SetAspectRatio(), and SetZoomLevel().
|
inline |
| float Vesper::OrthographicCameraController::GetAspectRatio | ( | ) | const |
References m_AspectRatio.
|
inline |
|
inline |
|
inline |
|
inline |
References m_CameraMoveSpeed.
Referenced by OnImGuiRender().
|
inline |
|
inline |
References m_CameraRotation.
Referenced by OnImGuiRender().
|
inline |
References m_CameraRotationSpeed.
Referenced by OnImGuiRender().
|
inline |
References m_ZoomLevel.
| void Vesper::OrthographicCameraController::OnEvent | ( | Event & | e | ) |
References Vesper::EventDispatcher::EventDispatcher(), OnMouseScrolled(), and OnWindowResized().
| void Vesper::OrthographicCameraController::OnImGuiRender | ( | ) |
TODO: move to an editor component that can be attached to any system (EditorAbstractionComp).
References CanRotate(), GetMoveSpeed(), GetRotation(), GetRotationSpeed(), SetCanRotate(), SetMoveSpeed(), SetPosition(), SetRotation(), and SetRotationSpeed().
|
private |
References CalculateView(), Vesper::MouseScrolledEvent::GetYOffset(), and m_ZoomLevel.
Referenced by OnEvent().
| void Vesper::OrthographicCameraController::OnResize | ( | float | width, |
| float | height ) |
References CalculateView(), and m_AspectRatio.
Referenced by OnWindowResized().
| void Vesper::OrthographicCameraController::OnUpdate | ( | Timestep | ts | ) |
References Vesper::Key::E, Vesper::Input::IsKeyPressed(), m_CameraRotation, m_CameraRotationSpeed, m_Rotation, and Vesper::Key::Q.
|
private |
Referenced by UpdateCameraBounds().
|
private |
References Vesper::WindowResizeEvent::GetHeight(), Vesper::WindowResizeEvent::GetWidth(), and OnResize().
Referenced by OnEvent().
| void Vesper::OrthographicCameraController::SetAspectRatio | ( | float | aspectRatio | ) |
References CalculateView(), and m_AspectRatio.
|
inline |
| void Vesper::OrthographicCameraController::SetMoveSpeed | ( | float | speed | ) |
References m_CameraMoveSpeed.
Referenced by OnImGuiRender().
| void Vesper::OrthographicCameraController::SetPosition | ( | float | x, |
| float | y ) |
Referenced by OnImGuiRender().
| void Vesper::OrthographicCameraController::SetRotation | ( | float | rotation | ) |
References m_CameraRotation.
Referenced by OnImGuiRender().
| void Vesper::OrthographicCameraController::SetRotationSpeed | ( | float | speed | ) |
References m_CameraRotationSpeed.
Referenced by OnImGuiRender().
|
inline |
References CalculateView(), and m_ZoomLevel.
|
private |
References Vesper::OrthographicCameraBounds::Bottom, Vesper::OrthographicCameraBounds::Left, m_AspectRatio, m_Bounds, m_ZoomLevel, OnUpdateBounds(), Vesper::OrthographicCameraBounds::Right, and Vesper::OrthographicCameraBounds::Top.
Referenced by CalculateView().
|
private |
|
private |
Referenced by GetAspectRatio(), OnResize(), OrthographicCameraController(), SetAspectRatio(), and UpdateCameraBounds().
|
private |
Referenced by GetBounds(), OrthographicCameraController(), and UpdateCameraBounds().
|
private |
Referenced by GetMoveSpeed(), and SetMoveSpeed().
|
private |
|
private |
Referenced by GetRotation(), OnUpdate(), and SetRotation().
|
private |
Referenced by GetRotationSpeed(), OnUpdate(), and SetRotationSpeed().
|
private |
Referenced by CanRotate(), OnUpdate(), OrthographicCameraController(), and SetCanRotate().
|
private |
Referenced by GetZoomLevel(), OnMouseScrolled(), OrthographicCameraController(), SetZoomLevel(), and UpdateCameraBounds().