#include <spXBox360GamePad.hpp>
List of all members.
Detailed Description
The XBox360 game pad class was designed particular for the "XBox Gamepad" on MS/Windows.
- Since:
- Version 3.2
Constructor & Destructor Documentation
sp::io::XBox360GamePad::XBox360GamePad |
( |
s32 |
Number |
) |
|
- Parameters:
-
[in] | Number | Specifies the controller number. Must be 0, 1, 2 or 3. |
sp::io::XBox360GamePad::~XBox360GamePad |
( |
|
) |
|
Member Function Documentation
bool sp::io::XBox360GamePad::buttonDown |
( |
const EGamePadButtons |
Button |
) |
const |
Returns true if the specified gamepad button is pressed.
bool sp::io::XBox360GamePad::buttonHit |
( |
const EGamePadButtons |
Button |
) |
const |
Returns true if the specified gamepad button was hit.
bool sp::io::XBox360GamePad::buttonReleased |
( |
const EGamePadButtons |
Button |
) |
const |
Returns true if the specified gamepad button was released.
bool sp::io::XBox360GamePad::connected |
( |
|
) |
const [inline] |
dim::point2df sp::io::XBox360GamePad::getLeftJoystick |
( |
f32 |
Threshold = 0.15f |
) |
const |
Returns the left joystick coordinates. The coordinates are in the range [0.0 .. 1.0]. Positive values signify up or right.
- Parameters:
-
[in] | Threshold | Specifies the threshold factor to eliminate imprecision. Should by in the range [0.0 .. 1.0]. By default 0.1. |
dim::point2di sp::io::XBox360GamePad::getLeftJoystickNative |
( |
|
) |
const |
Returns the native left joystick values. The values are in the range [-XBOX_JOYSTICK_MIN .. XBOX_JOYSTICK_MAX].
u8 sp::io::XBox360GamePad::getLeftTrigger |
( |
|
) |
const |
Returns the left trigger value. This value is in the range [0 .. 255].
s32 sp::io::XBox360GamePad::getNumber |
( |
|
) |
const [inline] |
Returns the controller number. Must be 0, 1, 2 or 3.
dim::point2df sp::io::XBox360GamePad::getRightJoystick |
( |
f32 |
Threshold = 0.15f |
) |
const |
dim::point2di sp::io::XBox360GamePad::getRightJoystickNative |
( |
|
) |
const |
Returns the native right joystick values. The values are in the range [-XBOX_JOYSTICK_MIN .. XBOX_JOYSTICK_MAX].
u8 sp::io::XBox360GamePad::getRightTrigger |
( |
|
) |
const |
Returns the right trigger value. This value is in the range [0 .. 255].
Sets the connection callback. Use this to determine when a gamepad is connected or disconnected.
void sp::io::XBox360GamePad::setLeftVibration |
( |
u16 |
MotorSpeed, |
|
|
u64 |
Duration | |
|
) |
| | |
Sets the left vibration motor speed for the specified duration.
- Parameters:
-
[in] | MotorSpeed | Specifies the motor speed. Use MAX_GAMEPAD_VIRBATION for maximal vibration speed. |
[in] | Duration | Specifies the vibration duration (in milliseconds). Use 0 to deactivate the timer. |
void sp::io::XBox360GamePad::setLeftVibration |
( |
u16 |
MotorSpeed |
) |
|
Sets the left vibration motor speed. Use MAX_GAMEPAD_VIRBATION for maximal vibration speed.
- Note:
- The left vibration feels different, than the right! The left one is rough.
void sp::io::XBox360GamePad::setRightVibration |
( |
u16 |
MotorSpeed, |
|
|
u64 |
Duration | |
|
) |
| | |
Sets the right vibration motor speed for the specified duration.
- See also:
- setLeftVibration
void sp::io::XBox360GamePad::setRightVibration |
( |
u16 |
MotorSpeed |
) |
|
Sets the right vibration motor speed. Use MAX_GAMEPAD_VIRBATION for maximal vibration speed.
- Note:
- The right vibration feels different, than the left! The right one is fine.
void sp::io::XBox360GamePad::setVibration |
( |
u16 |
LeftMotorSpeed, |
|
|
u16 |
RightMotorSpeed | |
|
) |
| | |
Sets the left and right vibration motor speed. Use MAX_GAMEPAD_VIRBATION for maximal vibration speed.
void sp::io::XBox360GamePad::setVibration |
( |
u16 |
MotorSpeed |
) |
|
Sets the left and right vibration motor speed. Use MAX_GAMEPAD_VIRBATION for maximal vibration speed.
Friends And Related Function Documentation
friend class InputControl [friend] |
The documentation for this class was generated from the following file: