NVidia Gameworks
  • Main Page
  • Classes
  • Files
  • File List
  • File Members

NvGamepad.h

Go to the documentation of this file.
00001 // TAGRELEASE: PUBLIC
00002 
00003 #ifndef NV_GAMEPAD_H
00004 #define NV_GAMEPAD_H
00005 
00006 #include <NvFoundation.h>
00007 
00010 
00017 class NvGamepad {
00018 public:
00019     const static uint32_t BUTTON_DPAD_UP        = 0x00000001; 
00020     const static uint32_t BUTTON_DPAD_DOWN      = 0x00000002; 
00021     const static uint32_t BUTTON_DPAD_LEFT      = 0x00000004; 
00022     const static uint32_t BUTTON_DPAD_RIGHT     = 0x00000008; 
00023     const static uint32_t BUTTON_START          = 0x00000010; 
00024     const static uint32_t BUTTON_BACK           = 0x00000020; 
00025     const static uint32_t BUTTON_LEFT_THUMB     = 0x00000040; 
00026     const static uint32_t BUTTON_RIGHT_THUMB    = 0x00000080; 
00027     const static uint32_t BUTTON_LEFT_SHOULDER  = 0x00000100; 
00028     const static uint32_t BUTTON_RIGHT_SHOULDER = 0x00000200; 
00029     const static uint32_t BUTTON_A              = 0x00001000; 
00030     const static uint32_t BUTTON_B              = 0x00002000; 
00031     const static uint32_t BUTTON_X              = 0x00004000; 
00032     const static uint32_t BUTTON_Y              = 0x00008000; 
00033 
00034     const static int32_t MAX_GAMEPADS = 4; 
00035 
00038     struct State {
00039         uint32_t mTimestamp; 
00040         uint32_t mButtons; 
00041         float mLeftTrigger; 
00042         float mRightTrigger; 
00043         float mThumbLX; 
00044         float mThumbLY; 
00045         float mThumbRX; 
00046         float mThumbRY; 
00047     };
00048 
00056     virtual bool getState(int32_t padID, State& state) = 0; // 
00057 
00063     virtual void setMaxGamepadCount(int32_t max) = 0;
00064 
00067     virtual int32_t getMaxGamepadCount() = 0;
00068 
00069     virtual ~NvGamepad() { }
00070 };
00071 
00072 #endif
Generated on Sat Mar 8 14:58:35 2014 for NVIDIA GameWorks OpenGL App Framework and Libraries by Doxygen
©2014 NVIDIA Corporation.