sculpto
Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
scl::input_system Class Reference

#include <input.h>

Inheritance diagram for scl::input_system:
scl::windows_input_system

Static Public Member Functions

static int GetMousePosX ()
 
static int GetMousePosY ()
 
static int GetMousePosZ ()
 
static int GetMousePosDeltaX ()
 
static int GetMousePosDeltaY ()
 
static int GetMousePosDeltaZ ()
 
static bool GetKey (keycode Index)
 
static bool GetKeyOld (keycode Index)
 
static bool GetKeyClick (keycode Index)
 
static void Response ()
 
static shared< input_system > & Get ()
 
static unique< input_systemCreate ()
 

Protected Member Functions

virtual void SelfResponse ()
 

Protected Attributes

mouse_data Mouse
 
keyboard_data Keyboard
 

Detailed Description

Definition at line 45 of file input.h.

Member Function Documentation

◆ Create()

scl::unique< scl::input_system > scl::input_system::Create ( )
static
  • Create input system depends on platform function.
Parameters
None.\Return Created input system pointer.

!SCL_PLATFORM_WINDOWS

Definition at line 14 of file input.cpp.

15{
16#ifdef SCL_PLATFORM_WINDOWS
17 return CreateUnique<windows_input_system>();
18#else
19 SCL_CORE_ASSERT(false, "Unknown platform!");
20 return nullptr;
21#endif
22}
#define SCL_CORE_ASSERT(expr,...)
Definition: assert.h:69

◆ Get()

static shared< input_system > & scl::input_system::Get ( )
inlinestatic

Class methods.

  • Input system instance reference getter function.
Parameters
None.
Returns
input system instance reference.

Definition at line 99 of file input.h.

99{ return Instance; }

◆ GetKey()

static bool scl::input_system::GetKey ( keycode  Index)
inlinestatic

Keys state array getter function. Key state could be accessed from array by its VK_*** key code or letter char. Example: GetKeys()[keycode::SPACE] or GetKeys()['A']

Definition at line 71 of file input.h.

71{ return Instance->Keyboard.Keys[(int)Index]; };

◆ GetKeyClick()

static bool scl::input_system::GetKeyClick ( keycode  Index)
inlinestatic

Keys click state array getter function. Click state is equal to true only once when user pressed down key. Key state could be accessed from array by its VK_*** key code or letter char. Example: GetKeys()[keycode::SPACE] or GetKeys()['A']

Definition at line 82 of file input.h.

82{ return Instance->Keyboard.KeysClick[(int)Index]; };

◆ GetKeyOld()

static bool scl::input_system::GetKeyOld ( keycode  Index)
inlinestatic

Keys previously readed state array getter function. Key state could be accessed from array by its VK_*** key code or letter char. Example: GetKeys()[keycode::SPACE] or GetKeys()['A']

Definition at line 76 of file input.h.

76{ return Instance->Keyboard.KeysOld[(int)Index]; };

◆ GetMousePosDeltaX()

static int scl::input_system::GetMousePosDeltaX ( )
inlinestatic

Mouse x screen position delta (relative to previus readed) value getter function.

Definition at line 62 of file input.h.

62{ return Instance->Mouse.PosDeltaX; }

◆ GetMousePosDeltaY()

static int scl::input_system::GetMousePosDeltaY ( )
inlinestatic

Mouse y screen position delta (relative to previus readed) value getter function.

Definition at line 64 of file input.h.

64{ return Instance->Mouse.PosDeltaY; }

◆ GetMousePosDeltaZ()

static int scl::input_system::GetMousePosDeltaZ ( )
inlinestatic

Mouse wheel scroll delta (relative to previus readed) value getter function.

Definition at line 66 of file input.h.

66{ return Instance->Mouse.PosDeltaZ; }

◆ GetMousePosX()

static int scl::input_system::GetMousePosX ( )
inlinestatic

Input system data getter/setter functions.

Mouse x absolute screen position getter function.

Definition at line 56 of file input.h.

56{ return Instance->Mouse.PosX; }

◆ GetMousePosY()

static int scl::input_system::GetMousePosY ( )
inlinestatic

Mouse y absolute screen position getter function.

Definition at line 58 of file input.h.

58{ return Instance->Mouse.PosY; }

◆ GetMousePosZ()

static int scl::input_system::GetMousePosZ ( )
inlinestatic

Mouse wheel absolute scrool value getter function.

Definition at line 60 of file input.h.

60{ return Instance->Mouse.PosZ; }

◆ Response()

static void scl::input_system::Response ( )
inlinestatic
  • Read all available human devies function.
Parameters
None.
Returns
None.

Definition at line 90 of file input.h.

90{ Instance->SelfResponse(); }

◆ SelfResponse()

virtual void scl::input_system::SelfResponse ( )
inlineprotectedvirtual
  • Read all available human devies function.
Parameters
None.
Returns
None.

Reimplemented in scl::windows_input_system.

Definition at line 116 of file input.h.

116{}

Member Data Documentation

◆ Keyboard

keyboard_data scl::input_system::Keyboard
protected

Definition at line 52 of file input.h.

◆ Mouse

mouse_data scl::input_system::Mouse
protected

Definition at line 51 of file input.h.


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