|
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 |
Base input class for querying input states. More...
#include <Input.h>
Public Member Functions | |
| Input (const Input &)=delete | |
| Input & | operator= (const Input &)=delete |
Static Public Member Functions | |
| static bool | IsKeyPressed (int keycode) |
| Checks if the specified key is currently pressed. | |
| static bool | IsMouseButtonPressed (int button) |
| Checks if the specified mouse button is currently pressed. | |
| static float | GetMouseX () |
| Gets the current X position of the mouse cursor. | |
| static float | GetMouseY () |
| Gets the current Y position of the mouse cursor. | |
| static glm::vec2 | GetMousePosition () |
| Gets the current position of the mouse cursor as a 2D vector. | |
Protected Member Functions | |
| Input ()=default | |
Base input class for querying input states.
|
protecteddefault |
|
delete |
|
static |
Gets the current position of the mouse cursor as a 2D vector.
References Vesper::Application::Get(), Vesper::Window::GetNativeWindow(), and Vesper::Application::GetWindow().
|
static |
Gets the current X position of the mouse cursor.
|
static |
Gets the current Y position of the mouse cursor.
|
static |
Checks if the specified key is currently pressed.
| keycode | The keycode of the key to check. |
References Vesper::Application::Get(), Vesper::Window::GetNativeWindow(), and Vesper::Application::GetWindow().
Referenced by Vesper::EditorLayer::OnImGuiRender(), Vesper::EditorLayer::OnKeyPressed(), Vesper::EditorCamera::OnUpdate(), and Vesper::OrthographicCameraController::OnUpdate().
|
static |
Checks if the specified mouse button is currently pressed.
| button | The mouse button to check. |
References Vesper::Application::Get(), Vesper::Window::GetNativeWindow(), and Vesper::Application::GetWindow().
Referenced by Vesper::EditorCamera::OnUpdate(), and Vesper::EditorLayer::OnUpdate().