NvGamepad.h
Go to the documentation of this file.00001 // TAGRELEASE: PUBLIC 00002 #ifndef NV_GAMEPAD_H 00003 #define NV_GAMEPAD_H 00004 00005 #include <NvFoundation.h> 00006 00009 00016 class NvGamepad { 00017 public: 00018 const static uint32_t BUTTON_DPAD_UP = 0x00000001; 00019 const static uint32_t BUTTON_DPAD_DOWN = 0x00000002; 00020 const static uint32_t BUTTON_DPAD_LEFT = 0x00000004; 00021 const static uint32_t BUTTON_DPAD_RIGHT = 0x00000008; 00022 const static uint32_t BUTTON_START = 0x00000010; 00023 const static uint32_t BUTTON_BACK = 0x00000020; 00024 const static uint32_t BUTTON_LEFT_THUMB = 0x00000040; 00025 const static uint32_t BUTTON_RIGHT_THUMB = 0x00000080; 00026 const static uint32_t BUTTON_LEFT_SHOULDER = 0x00000100; 00027 const static uint32_t BUTTON_RIGHT_SHOULDER = 0x00000200; 00028 const static uint32_t BUTTON_A = 0x00001000; 00029 const static uint32_t BUTTON_B = 0x00002000; 00030 const static uint32_t BUTTON_X = 0x00004000; 00031 const static uint32_t BUTTON_Y = 0x00008000; 00032 00033 const static int32_t MAX_GAMEPADS = 4; 00034 00037 struct State { 00038 uint32_t mTimestamp; 00039 uint32_t mButtons; 00040 float mLeftTrigger; 00041 float mRightTrigger; 00042 float mThumbLX; 00043 float mThumbLY; 00044 float mThumbRX; 00045 float mThumbRY; 00046 }; 00047 00055 virtual bool getState(int32_t padID, State& state) = 0; // 00056 00062 virtual void setMaxGamepadCount(int32_t max) = 0; 00063 00066 virtual int32_t getMaxGamepadCount() = 0; 00067 00068 virtual ~NvGamepad() { } 00069 }; 00070 00071 #endif