le3d - LightEngine 3D
A straightforward C++ 3D software engine for real-time graphics
|
Handle gamepads through OS native interface. More...
#include <gamepad.h>
Public Member Functions | |
LeGamePad (int pad) | |
~LeGamePad () | |
void | init () |
Initialize gamepad state (default state) More... | |
void | update () |
Update gamepad state (call the driver) More... | |
void | feedback (float left, float right) |
Send a force feedback order. More... | |
Static Public Member Functions | |
static void | setup () |
static void | release () |
Public Attributes | |
float | stickLeftX |
float | stickLeftY |
float | stickRightX |
float | stickRightY |
int | buttons |
int | toggled |
int | pressed |
int | released |
bool | detected |
Handle gamepads through OS native interface.
LeGamePad::LeGamePad | ( | int | pad | ) |
LeGamePad::~LeGamePad | ( | ) |
void LeGamePad::feedback | ( | float | left, |
float | right | ||
) |
Send a force feedback order.
[in] | left | motor order (0.0 - 1.0) |
[in] | right | motor order (0.0 - 1.0) |
void LeGamePad::init | ( | ) |
Initialize gamepad state (default state)
|
static |
XInput driver deinit
|
static |
XInput driver init
void LeGamePad::update | ( | ) |
Update gamepad state (call the driver)
int LeGamePad::buttons |
buttons pressed
bool LeGamePad::detected |
gamepad is detected (state can change)
int LeGamePad::pressed |
buttons pressed (since last update)
int LeGamePad::released |
buttons released (since last update)
float LeGamePad::stickLeftX |
x coordinate of left stick
float LeGamePad::stickLeftY |
y coordinate of left stick
float LeGamePad::stickRightX |
x coordinate of right stick
float LeGamePad::stickRightY |
y coordinate of right stick
int LeGamePad::toggled |
buttons toggled (since last update)