UGDK  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
ugdk::input::Joystick Class Reference

#include <ugdk/input/joystick.h>

Public Member Functions

 ~Joystick ()
 
bool IsConnected () const
 Checks if the joystick is currently connected. More...
 
int NumAxes () const
 Get the number of general axis controls. More...
 
int NumTrackballs () const
 Get the number of trackballs. More...
 
int NumHats () const
 Get the number of POV hats. More...
 
int NumButtons () const
 Get the number of buttons. More...
 
bool IsDown (int button) const
 Checks if the given button is currently being held. More...
 
bool IsUp (int button) const
 Checks if there's currently no interaction with the given button. More...
 
math::Integer2D GetBallDelta (int ballid) const
 Get the ball axis changes since last frame. More...
 
HatStatus GetHatStatus (int hat) const
 Get the current state of a POV hat. More...
 
AxisStatus GetAxisStatus (int axis) const
 Get the current state of an axis control. More...
 
system::EventHandlerevent_handler ()
 An event handler for events that matching this joystick. More...
 

Friends

class Manager
 

Constructor & Destructor Documentation

ugdk::input::Joystick::~Joystick ( )

Member Function Documentation

system::EventHandler& ugdk::input::Joystick::event_handler ( )
inline

An event handler for events that matching this joystick.

AxisStatus ugdk::input::Joystick::GetAxisStatus ( int  axis) const

Get the current state of an axis control.

math::Integer2D ugdk::input::Joystick::GetBallDelta ( int  ballid) const

Get the ball axis changes since last frame.

HatStatus ugdk::input::Joystick::GetHatStatus ( int  hat) const

Get the current state of a POV hat.

bool ugdk::input::Joystick::IsConnected ( ) const

Checks if the joystick is currently connected.

bool ugdk::input::Joystick::IsDown ( int  button) const

Checks if the given button is currently being held.

bool ugdk::input::Joystick::IsUp ( int  button) const

Checks if there's currently no interaction with the given button.

int ugdk::input::Joystick::NumAxes ( ) const

Get the number of general axis controls.

int ugdk::input::Joystick::NumButtons ( ) const

Get the number of buttons.

int ugdk::input::Joystick::NumHats ( ) const

Get the number of POV hats.

int ugdk::input::Joystick::NumTrackballs ( ) const

Get the number of trackballs.

Trackballs have only relative motion events associated with them and their state cannot be polled.

Friends And Related Function Documentation

friend class Manager
friend

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