TTElib
Twitchy Thumbs Entertainment library
Enumerations | Functions
TTE::Input::Controller Namespace Reference

Enumerations

enum  button_e {
  BUTTON_L_UP, BUTTON_L_LEFT, BUTTON_L_RIGHT, BUTTON_L_DOWN,
  BUTTON_R_UP, BUTTON_R_LEFT, BUTTON_R_RIGHT, BUTTON_R_DOWN,
  BUTTON_SELECT, BUTTON_START, BUTTON_L1, BUTTON_R1,
  BUTTON_L2, BUTTON_R2, BUTTON_L3, BUTTON_R3,
  NUM_BUTTONS
}
 
enum  analogStickAxis_e {
  ANALOG_STICK_AXIS_LX, ANALOG_STICK_AXIS_LY, ANALOG_STICK_AXIS_RX, ANALOG_STICK_AXIS_RY,
  NUM_ANALOG_STICK_AXES
}
 

Functions

bool IsConnected (unsigned int controllerNum)
 
bool GetButtonPressed (button_e button, unsigned int controllerNum=0)
 
bool GetButtonTriggerPressed (button_e button, unsigned int controllerNum=0)
 
bool GetButtonTriggerReleased (button_e button, unsigned int controllerNum=0)
 
float GetButtonAnalog (button_e button, unsigned int controllerNum=0)
 
float GetAnalogStickAxis (analogStickAxis_e axis, unsigned int controllerNum=0)
 
void GetAccelerometer (float *vec, unsigned int controllerNum=0)
 
void SetVibrate (float left, float right, unsigned int controllerNum=0)
 
void SetLightColor (float red, float green, float blue, unsigned int controllerNum=0)
 
void ResetLightColor (unsigned int controllerNum=0)
 

Enumeration Type Documentation

Enumerator
ANALOG_STICK_AXIS_LX 
ANALOG_STICK_AXIS_LY 
ANALOG_STICK_AXIS_RX 
ANALOG_STICK_AXIS_RY 
NUM_ANALOG_STICK_AXES 
Enumerator
BUTTON_L_UP 
BUTTON_L_LEFT 
BUTTON_L_RIGHT 
BUTTON_L_DOWN 
BUTTON_R_UP 
BUTTON_R_LEFT 
BUTTON_R_RIGHT 
BUTTON_R_DOWN 
BUTTON_SELECT 
BUTTON_START 
BUTTON_L1 
BUTTON_R1 
BUTTON_L2 
BUTTON_R2 
BUTTON_L3 
BUTTON_R3 
NUM_BUTTONS 

Function Documentation

void TTE::Input::Controller::GetAccelerometer ( float *  vec,
unsigned int  controllerNum = 0 
)
float TTE::Input::Controller::GetAnalogStickAxis ( analogStickAxis_e  axis,
unsigned int  controllerNum = 0 
)
float TTE::Input::Controller::GetButtonAnalog ( button_e  button,
unsigned int  controllerNum = 0 
)
bool TTE::Input::Controller::GetButtonPressed ( button_e  button,
unsigned int  controllerNum = 0 
)
bool TTE::Input::Controller::GetButtonTriggerPressed ( button_e  button,
unsigned int  controllerNum = 0 
)
bool TTE::Input::Controller::GetButtonTriggerReleased ( button_e  button,
unsigned int  controllerNum = 0 
)
bool TTE::Input::Controller::IsConnected ( unsigned int  controllerNum)
void TTE::Input::Controller::ResetLightColor ( unsigned int  controllerNum = 0)
void TTE::Input::Controller::SetLightColor ( float  red,
float  green,
float  blue,
unsigned int  controllerNum = 0 
)
void TTE::Input::Controller::SetVibrate ( float  left,
float  right,
unsigned int  controllerNum = 0 
)