|
Blender
V2.59
|
#include <SCA_Joystick.h>
Classes | |
| class | PrivateData |
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_Joystick * | GetInstance (short int joyindex) |
| static void | HandleEvents (void) |
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.
| bool SCA_Joystick::aAnyButtonPressIsPositive | ( | void | ) |
Definition at line 164 of file SCA_Joystick.cpp.
References i, and SCA_Joystick::PrivateData::m_joystick.
Referenced by SCA_JoystickSensor::Evaluate().
| bool SCA_Joystick::aAxisIsPositive | ( | int | axis_single | ) |
Definition at line 159 of file SCA_Joystick.cpp.
References TNT::abs().
Referenced by SCA_JoystickSensor::Evaluate().
| bool SCA_Joystick::aAxisPairDirectionIsPositive | ( | int | axis, |
| int | dir | ||
| ) |
Definition at line 143 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 138 of file SCA_Joystick.cpp.
Referenced by SCA_JoystickSensor::Evaluate().
| bool SCA_Joystick::aButtonPressIsPositive | ( | int | button | ) |
Definition at line 176 of file SCA_Joystick.cpp.
References SCA_Joystick::PrivateData::m_joystick.
Referenced by SCA_JoystickSensor::Evaluate().
| bool SCA_Joystick::aButtonReleaseIsPositive | ( | int | button | ) |
Definition at line 188 of file SCA_Joystick.cpp.
References SCA_Joystick::PrivateData::m_joystick.
| bool SCA_Joystick::aHatIsPositive | ( | int | hatnum, |
| int | dir | ||
| ) |
Definition at line 200 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 277 of file SCA_Joystick.cpp.
| void SCA_Joystick::cSetPrecision | ( | int | val | ) |
precision is default '3200' which is overridden by input
Definition at line 132 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 205 of file SCA_Joystick.cpp.
| int SCA_Joystick::GetNumberOfButtons | ( | void | ) |
Definition at line 211 of file SCA_Joystick.cpp.
| int SCA_Joystick::GetNumberOfHats | ( | void | ) |
Definition at line 217 of file SCA_Joystick.cpp.
| int SCA_Joystick::GetThreshold | ( | void | ) | [inline] |
Definition at line 167 of file SCA_Joystick.h.
| void SCA_Joystick::HandleEvents | ( | void | ) | [static] |
Definition at line 82 of file SCA_JoystickEvents.cpp.
References i.
Referenced by SCA_JoystickManager::NextFrame().
| 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 113 of file SCA_Joystick.cpp.
References i, JOYINDEX_MAX, and NULL.
Referenced by SCA_JoystickManager::~SCA_JoystickManager().