Blender V2.61 - r43446
Public Member Functions | Static Public Member Functions

SCA_Joystick Class Reference

#include <SCA_Joystick.h>

List of all members.

Public Member Functions

void ReleaseInstance ()
bool aAxisPairIsPositive (int axis)
bool aAxisPairDirectionIsPositive (int axis, int dir)
bool aAxisIsPositive (int axis_single)
bool aAnyButtonPressIsPositive (void)
bool aButtonPressIsPositive (int button)
bool aButtonReleaseIsPositive (int button)
bool aHatIsPositive (int hatnum, int dir)
void cSetPrecision (int val)
int GetAxisPosition (int index)
int GetHat (int index)
int GetThreshold (void)
bool IsTrigAxis (void)
bool IsTrigButton (void)
bool IsTrigHat (void)
int GetNumberOfAxes (void)
int GetNumberOfButtons (void)
int GetNumberOfHats (void)
int Connected (void)

Static Public Member Functions

static SCA_JoystickGetInstance (short int joyindex)
static void HandleEvents (void)

Detailed Description

Basic Joystick class I will make this class a singleton because there should be only one joystick even if there are more than one scene using it and count how many scene are using it. The underlying joystick should only be removed when the last scene is removed

Definition at line 47 of file SCA_Joystick.h.


Member Function Documentation

bool SCA_Joystick::aAnyButtonPressIsPositive ( void  )

Definition at line 177 of file SCA_Joystick.cpp.

References i.

Referenced by SCA_JoystickSensor::Evaluate().

bool SCA_Joystick::aAxisIsPositive ( int  axis_single)

Definition at line 172 of file SCA_Joystick.cpp.

References abs().

Referenced by SCA_JoystickSensor::Evaluate().

bool SCA_Joystick::aAxisPairDirectionIsPositive ( int  axis,
int  dir 
)

Definition at line 156 of file SCA_Joystick.cpp.

References JOYAXIS_DOWN, JOYAXIS_RIGHT, and JOYAXIS_UP.

Referenced by SCA_JoystickSensor::Evaluate().

bool SCA_Joystick::aAxisPairIsPositive ( int  axis)

Definition at line 151 of file SCA_Joystick.cpp.

Referenced by SCA_JoystickSensor::Evaluate().

bool SCA_Joystick::aButtonPressIsPositive ( int  button)

Definition at line 189 of file SCA_Joystick.cpp.

Referenced by SCA_JoystickSensor::Evaluate().

bool SCA_Joystick::aButtonReleaseIsPositive ( int  button)

Definition at line 201 of file SCA_Joystick.cpp.

bool SCA_Joystick::aHatIsPositive ( int  hatnum,
int  dir 
)

Definition at line 213 of file SCA_Joystick.cpp.

References GetHat().

Referenced by SCA_JoystickSensor::Evaluate().

int SCA_Joystick::Connected ( void  )

Test if the joystick is connected

Definition at line 290 of file SCA_Joystick.cpp.

void SCA_Joystick::cSetPrecision ( int  val)

precision is default '3200' which is overridden by input

Definition at line 145 of file SCA_Joystick.cpp.

References simple_enum_gen::val.

Referenced by SCA_JoystickSensor::Evaluate().

int SCA_Joystick::GetAxisPosition ( int  index) [inline]

Definition at line 159 of file SCA_Joystick.h.

int SCA_Joystick::GetHat ( int  index) [inline]

Definition at line 163 of file SCA_Joystick.h.

Referenced by aHatIsPositive(), and SCA_JoystickSensor::Evaluate().

SCA_Joystick * SCA_Joystick::GetInstance ( short int  joyindex) [static]

Definition at line 78 of file SCA_Joystick.cpp.

References echo, i, JOYINDEX_MAX, and NULL.

Referenced by SCA_JoystickManager::SCA_JoystickManager().

int SCA_Joystick::GetNumberOfAxes ( void  )

returns the # of...

Definition at line 218 of file SCA_Joystick.cpp.

int SCA_Joystick::GetNumberOfButtons ( void  )

Definition at line 224 of file SCA_Joystick.cpp.

int SCA_Joystick::GetNumberOfHats ( void  )

Definition at line 230 of file SCA_Joystick.cpp.

int SCA_Joystick::GetThreshold ( void  ) [inline]

Definition at line 167 of file SCA_Joystick.h.

static void SCA_Joystick::HandleEvents ( void  ) [static]
bool SCA_Joystick::IsTrigAxis ( void  ) [inline]

Definition at line 171 of file SCA_Joystick.h.

Referenced by SCA_JoystickSensor::Evaluate().

bool SCA_Joystick::IsTrigButton ( void  ) [inline]

Definition at line 175 of file SCA_Joystick.h.

Referenced by SCA_JoystickSensor::Evaluate().

bool SCA_Joystick::IsTrigHat ( void  ) [inline]

Definition at line 179 of file SCA_Joystick.h.

Referenced by SCA_JoystickSensor::Evaluate().

void SCA_Joystick::ReleaseInstance ( )

Definition at line 119 of file SCA_Joystick.cpp.

References i, JOYINDEX_MAX, and NULL.

Referenced by SCA_JoystickManager::~SCA_JoystickManager().


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