ArnieBoids  1.0.0
JOINT AI PROJECT
XController Class Reference

Xbox Controller class, not currently used. More...

#include <XController.hpp>

Collaboration diagram for XController:

Public Member Functions

 XController ()
 
int getPort () const
 
bool checkDown (WORD button) const
 
bool checkUp (WORD button) const
 
bool checkPressed (WORD button) const
 
bool checkReleased (WORD button) const
 
bool checkHeld (WORD button) const
 
unsigned int checkTimeHeld (WORD button) const
 
float checkLeftX () const
 
float checkLeftY () const
 
float checkRightX () const
 
float checkRightY () const
 
bool checkLeftNeutral () const
 
bool checkRightNeutral () const
 
int checkDPadX () const
 
int checkDPadY () const
 
float checkLeftTrigger () const
 
float checkRightTrigger () const
 
bool checkLeftHairTrigger () const
 
bool checkRightHairTrigger () const
 
bool setDeadzoneLX (float deadzone)
 
bool setDeadzoneLY (float deadzone)
 
bool setDeadzoneRX (float deadzone)
 
bool setDeadzoneRY (float deadzone)
 
bool setThresholdLT (float threshold)
 
bool setThresholdRT (float threshold)
 
float getDeadzoneLX () const
 
float getDeadzoneLY () const
 
float getDeadzoneRX () const
 
float getDeadzoneRY () const
 
float getThresholdLT () const
 
float getThresholdRT () const
 
bool update (int milliseconds)
 

Private Member Functions

void initButtons ()
 
bool checkConnection ()
 

Private Attributes

int controllerId_
 
const int DISCONNECTED = -1
 
XINPUT_STATE curState_
 
XINPUT_STATE prvState_
 
std::map< WORD, unsigned int > heldTimes_
 
float deadzoneLX_
 
float deadzoneLY_
 
float deadzoneRX_
 
float deadzoneRY_
 
const float DEADZONE_MAX = 1.f
 
float thresholdLT_
 
float thresholdRT_
 
const float THRESHOLD_MAX = 1.f
 
float leftX_
 
float leftY_
 
float rightX_
 
float rightY_
 
const short STICK_MAX = 32767
 
float leftTrigger_
 
float rightTrigger_
 
const BYTE TRIGGER_MAX = 255
 

Detailed Description

Xbox Controller class, not currently used.

Constructor & Destructor Documentation

XController::XController ( )

Here is the call graph for this function:

Member Function Documentation

bool XController::checkConnection ( )
private

Here is the caller graph for this function:

bool XController::checkDown ( WORD  button) const
int XController::checkDPadX ( ) const
int XController::checkDPadY ( ) const
bool XController::checkHeld ( WORD  button) const
bool XController::checkLeftHairTrigger ( ) const
bool XController::checkLeftNeutral ( ) const
float XController::checkLeftTrigger ( ) const
float XController::checkLeftX ( ) const
float XController::checkLeftY ( ) const
bool XController::checkPressed ( WORD  button) const
bool XController::checkReleased ( WORD  button) const
bool XController::checkRightHairTrigger ( ) const
bool XController::checkRightNeutral ( ) const
float XController::checkRightTrigger ( ) const
float XController::checkRightX ( ) const
float XController::checkRightY ( ) const
unsigned int XController::checkTimeHeld ( WORD  button) const
bool XController::checkUp ( WORD  button) const
float XController::getDeadzoneLX ( ) const
float XController::getDeadzoneLY ( ) const
float XController::getDeadzoneRX ( ) const
float XController::getDeadzoneRY ( ) const
int XController::getPort ( ) const
float XController::getThresholdLT ( ) const
float XController::getThresholdRT ( ) const
void XController::initButtons ( )
private

Here is the caller graph for this function:

bool XController::setDeadzoneLX ( float  deadzone)
bool XController::setDeadzoneLY ( float  deadzone)
bool XController::setDeadzoneRX ( float  deadzone)
bool XController::setDeadzoneRY ( float  deadzone)
bool XController::setThresholdLT ( float  threshold)
bool XController::setThresholdRT ( float  threshold)
bool XController::update ( int  milliseconds)

Here is the call graph for this function:

Member Data Documentation

int XController::controllerId_
private
XINPUT_STATE XController::curState_
private
const float XController::DEADZONE_MAX = 1.f
private
float XController::deadzoneLX_
private
float XController::deadzoneLY_
private
float XController::deadzoneRX_
private
float XController::deadzoneRY_
private
const int XController::DISCONNECTED = -1
private
std::map<WORD, unsigned int> XController::heldTimes_
private
float XController::leftTrigger_
private
float XController::leftX_
private
float XController::leftY_
private
XINPUT_STATE XController::prvState_
private
float XController::rightTrigger_
private
float XController::rightX_
private
float XController::rightY_
private
const short XController::STICK_MAX = 32767
private
const float XController::THRESHOLD_MAX = 1.f
private
float XController::thresholdLT_
private
float XController::thresholdRT_
private
const BYTE XController::TRIGGER_MAX = 255
private

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