Polyphase Game Engine
Loading...
Searching...
No Matches
Input.cpp File Reference
#include "Input/Input.h"
#include "Input/InputMap.h"
#include "Engine.h"
#include "Log.h"
#include "Assertion.h"

Functions

void INP_SetKey (int32_t key)
 
void INP_ClearKey (int32_t key)
 
void INP_ClearAllKeys ()
 
bool INP_IsKeyDown (int32_t key)
 
bool INP_IsKeyJustDownRepeat (int32_t key)
 
bool INP_IsKeyJustDown (int32_t key)
 
bool INP_IsKeyJustUp (int32_t key)
 
char INP_ConvertKeyCodeToChar (int32_t key)
 
void INP_SetMouseButton (int32_t button)
 
void INP_ClearMouseButton (int32_t button)
 
void INP_SetScrollWheelDelta (int32_t delta)
 
bool INP_IsMouseButtonDown (int32_t button)
 
bool INP_IsMouseButtonJustDown (int32_t button)
 
bool INP_IsMouseButtonJustUp (int32_t button)
 
int32_t INP_GetScrollWheelDelta ()
 
void INP_ClearAllMouseButtons ()
 
void INP_SetTouch (int32_t touch)
 
void INP_ClearTouch (int32_t touch)
 
bool INP_IsTouchDown (int32_t touch)
 
bool INP_IsPointerDown (int32_t pointer)
 
bool INP_IsPointerJustUp (int32_t pointer)
 
bool INP_IsPointerJustDown (int32_t pointer)
 
void INP_SetMousePosition (int32_t mouseX, int32_t mouseY)
 
void INP_SetTouchPosition (int32_t touchX, int32_t touchY, int32_t touch)
 
void INP_GetMousePosition (int32_t &mouseX, int32_t &mouseY)
 
void INP_GetTouchPosition (int32_t &touchX, int32_t &touchY, int32_t touch)
 
void INP_GetTouchPositionNormalized (float &touchX, float &touchY, int32_t touch)
 
void INP_GetPointerPosition (int32_t &pointerX, int32_t &pointerY, int32_t pointer)
 
void INP_GetPointerPositionNormalized (float &pointerX, float &pointerY, int32_t pointer)
 
void INP_GetMouseDelta (int32_t &deltaX, int32_t &deltaY)
 
bool INP_IsGamepadButtonDown (int32_t gamepadButton, int32_t gamepadIndex)
 
bool INP_IsGamepadButtonJustDown (int32_t gamepadButton, int32_t gamepadIndex)
 
bool INP_IsGamepadButtonJustUp (int32_t gamepadButton, int32_t gamepadIndex)
 
float INP_GetGamepadAxisValue (int32_t gamepadAxis, int32_t gamepadIndex)
 
GamepadType INP_GetGamepadType (int32_t gamepadIndex)
 
bool INP_IsGamepadConnected (int32_t gamepadIndex)
 
int32_t INP_GetGamepadIndex (int32_t inputDevice)
 
void INP_SetGamepadAxisValue (GamepadAxisCode axisCode, float axisValue, int32_t gamepadIndex)
 
void INP_SetGamepadButton (GamepadButtonCode buttonCode, int32_t gamepadIndex)
 
void INP_ClearGamepadButton (GamepadButtonCode buttonCode, int32_t gamepadIndex)
 
void INP_GetGamepadGyro (float &x, float &y, float &z, int32_t gamepadIndex)
 
void INP_GetGamepadAcceleration (float &x, float &y, float &z, int32_t gamepadIndex)
 
void INP_GetGamepadOrientation (float &pitch, float &yaw, float &roll, int32_t gamepadIndex)
 
bool INP_IsCursorLocked ()
 
bool INP_IsCursorTrapped ()
 
bool INP_IsCursorShown ()
 

Function Documentation

◆ INP_ClearAllKeys()

void INP_ClearAllKeys ( )

◆ INP_ClearAllMouseButtons()

void INP_ClearAllMouseButtons ( )

◆ INP_ClearGamepadButton()

void INP_ClearGamepadButton ( GamepadButtonCode  buttonCode,
int32_t  gamepadIndex 
)

◆ INP_ClearKey()

void INP_ClearKey ( int32_t  key)

◆ INP_ClearMouseButton()

void INP_ClearMouseButton ( int32_t  button)

◆ INP_ClearTouch()

void INP_ClearTouch ( int32_t  touch)

◆ INP_ConvertKeyCodeToChar()

char INP_ConvertKeyCodeToChar ( int32_t  key)

◆ INP_GetGamepadAcceleration()

void INP_GetGamepadAcceleration ( float &  x,
float &  y,
float &  z,
int32_t  gamepadIndex 
)

◆ INP_GetGamepadAxisValue()

float INP_GetGamepadAxisValue ( int32_t  gamepadAxis,
int32_t  gamepadIndex 
)

◆ INP_GetGamepadGyro()

void INP_GetGamepadGyro ( float &  x,
float &  y,
float &  z,
int32_t  gamepadIndex 
)

◆ INP_GetGamepadIndex()

int32_t INP_GetGamepadIndex ( int32_t  inputDevice)

◆ INP_GetGamepadOrientation()

void INP_GetGamepadOrientation ( float &  pitch,
float &  yaw,
float &  roll,
int32_t  gamepadIndex 
)

◆ INP_GetGamepadType()

GamepadType INP_GetGamepadType ( int32_t  gamepadIndex)

◆ INP_GetMouseDelta()

void INP_GetMouseDelta ( int32_t &  deltaX,
int32_t &  deltaY 
)

◆ INP_GetMousePosition()

void INP_GetMousePosition ( int32_t &  mouseX,
int32_t &  mouseY 
)

◆ INP_GetPointerPosition()

void INP_GetPointerPosition ( int32_t &  pointerX,
int32_t &  pointerY,
int32_t  pointer 
)

◆ INP_GetPointerPositionNormalized()

void INP_GetPointerPositionNormalized ( float &  pointerX,
float &  pointerY,
int32_t  pointer 
)

◆ INP_GetScrollWheelDelta()

int32_t INP_GetScrollWheelDelta ( )

◆ INP_GetTouchPosition()

void INP_GetTouchPosition ( int32_t &  touchX,
int32_t &  touchY,
int32_t  touch 
)

◆ INP_GetTouchPositionNormalized()

void INP_GetTouchPositionNormalized ( float &  touchX,
float &  touchY,
int32_t  touch 
)

◆ INP_IsCursorLocked()

bool INP_IsCursorLocked ( )

◆ INP_IsCursorShown()

bool INP_IsCursorShown ( )

◆ INP_IsCursorTrapped()

bool INP_IsCursorTrapped ( )

◆ INP_IsGamepadButtonDown()

bool INP_IsGamepadButtonDown ( int32_t  gamepadButton,
int32_t  gamepadIndex 
)

◆ INP_IsGamepadButtonJustDown()

bool INP_IsGamepadButtonJustDown ( int32_t  gamepadButton,
int32_t  gamepadIndex 
)

◆ INP_IsGamepadButtonJustUp()

bool INP_IsGamepadButtonJustUp ( int32_t  gamepadButton,
int32_t  gamepadIndex 
)

◆ INP_IsGamepadConnected()

bool INP_IsGamepadConnected ( int32_t  gamepadIndex)

◆ INP_IsKeyDown()

bool INP_IsKeyDown ( int32_t  key)

◆ INP_IsKeyJustDown()

bool INP_IsKeyJustDown ( int32_t  key)

◆ INP_IsKeyJustDownRepeat()

bool INP_IsKeyJustDownRepeat ( int32_t  key)

◆ INP_IsKeyJustUp()

bool INP_IsKeyJustUp ( int32_t  key)

◆ INP_IsMouseButtonDown()

bool INP_IsMouseButtonDown ( int32_t  button)

◆ INP_IsMouseButtonJustDown()

bool INP_IsMouseButtonJustDown ( int32_t  button)

◆ INP_IsMouseButtonJustUp()

bool INP_IsMouseButtonJustUp ( int32_t  button)

◆ INP_IsPointerDown()

bool INP_IsPointerDown ( int32_t  pointer)

◆ INP_IsPointerJustDown()

bool INP_IsPointerJustDown ( int32_t  pointer)

◆ INP_IsPointerJustUp()

bool INP_IsPointerJustUp ( int32_t  pointer)

◆ INP_IsTouchDown()

bool INP_IsTouchDown ( int32_t  touch)

◆ INP_SetGamepadAxisValue()

void INP_SetGamepadAxisValue ( GamepadAxisCode  axisCode,
float  axisValue,
int32_t  gamepadIndex 
)

◆ INP_SetGamepadButton()

void INP_SetGamepadButton ( GamepadButtonCode  buttonCode,
int32_t  gamepadIndex 
)

◆ INP_SetKey()

void INP_SetKey ( int32_t  key)

◆ INP_SetMouseButton()

void INP_SetMouseButton ( int32_t  button)

◆ INP_SetMousePosition()

void INP_SetMousePosition ( int32_t  mouseX,
int32_t  mouseY 
)

◆ INP_SetScrollWheelDelta()

void INP_SetScrollWheelDelta ( int32_t  delta)

◆ INP_SetTouch()

void INP_SetTouch ( int32_t  touch)

◆ INP_SetTouchPosition()

void INP_SetTouchPosition ( int32_t  touchX,
int32_t  touchY,
int32_t  touch 
)