Untitled Game engine no.5  1.0
Static Public Member Functions | List of all members
Engine::Input Class Reference

Static Public Member Functions

static bool IsKeyPressed (KeyCode key)
 
static bool IsMousePressed (MouseCode button)
 
static glm::vec2 GetMousePos ()
 
static float GetMouseX ()
 
static float GetMouseY ()
 
static InputGet ()
 get the static input instance
 
static void UpdateKey (KeyCode key, bool state)
 update the key at the given keycode with the new state
 
static void UpdateMouse (MouseCode button, bool state)
 update the mouse button at the given index with the new state
 
static void UpdateMousePos (float x, float y)
 
static void UpdateRelMousePos (float x, float y)
 
static glm::vec2 GetMouseDelta ()
 
static void Update (const Scene &s)
 
static void SetMouseLock (bool lock)
 
static bool IsMouseLocked ()
 

Member Function Documentation

◆ GetMouseDelta()

glm::vec2 Engine::Input::GetMouseDelta ( )
static

Capture and reset the last total mouse delta movement.

Returns
the mouse movement delta.

◆ GetMousePos()

glm::vec2 Engine::Input::GetMousePos ( )
static

Get the mouse position

Returns
the mouse position

◆ GetMouseX()

float Engine::Input::GetMouseX ( )
static

Get the mouse x position

Returns
the mouse x position

◆ GetMouseY()

float Engine::Input::GetMouseY ( )
static

Get the mouse y position

Returns
the mouse y position

◆ IsKeyPressed()

bool Engine::Input::IsKeyPressed ( KeyCode  key)
static

Query if a key is pressed

Parameters
keythe keycode of the pressed key
Returns
if the key is pressed

◆ IsMouseLocked()

bool Engine::Input::IsMouseLocked ( )
static

Retrieve the current mouse lock state.

Returns

◆ IsMousePressed()

bool Engine::Input::IsMousePressed ( MouseCode  button)
static

Query if a mouse button is pressed

Parameters
buttonthe buttoncode of the pressed button
Returns
if the button is pressed

◆ SetMouseLock()

void Engine::Input::SetMouseLock ( bool  lock)
static

Set the mouse lock state.

Parameters
lock

◆ Update()

void Engine::Input::Update ( const Scene s)
static

Update Input related scene Components.

Parameters
sscene reference

◆ UpdateMousePos()

void Engine::Input::UpdateMousePos ( float  x,
float  y 
)
static

Update the mouse's position on the screen.

Parameters
x
y

◆ UpdateRelMousePos()

void Engine::Input::UpdateRelMousePos ( float  x,
float  y 
)
static

Update the relative mouse motion on the screen.

Parameters
xdelta x
ydelta y

The documentation for this class was generated from the following files: