![]() |
My Project
|
A joystick axis. More...
#include <AnnEvents.hpp>
Public Member Functions | |
AnnControllerAxis () | |
This constructor will produce an invalid stick axis object. More... | |
ControllerAxisID | getAxisId () const |
Get the ID if this axis. More... | |
float | getRelValue () const |
Compute a float number between -1 and 1. if relative value isn't supported by the input, will return INVALID (42) More... | |
float | getAbsValue () const |
Compute a float number between -1 and 1. More... | |
Private Member Functions | |
void | setAxis (ControllerAxisID ax) |
Set the ID of the axis. More... | |
void | setRelValue (int rel) |
Set a relative value. More... | |
void | setAbsValue (int abs) |
Set an absolute value. More... | |
AnnControllerAxis (ControllerAxisID ax, int rel, int abs) | |
Real constructor. More... | |
Private Attributes | |
int | a |
Raw values. More... | |
int | r |
ControllerAxisID | id |
bool | noRel |
True if the there's no "relative" value. More... | |
Friends | |
class | AnnEventManager |
class | AnnControllerEvent |
A joystick axis.
Definition at line 163 of file AnnEvents.hpp.
AnnControllerAxis::AnnControllerAxis | ( | ) |
This constructor will produce an invalid stick axis object.
Definition at line 152 of file AnnEvents.cpp.
|
private |
Real constructor.
Definition at line 165 of file AnnEvents.cpp.
float AnnControllerAxis::getAbsValue | ( | ) | const |
Compute a float number between -1 and 1.
Definition at line 194 of file AnnEvents.cpp.
ControllerAxisID AnnControllerAxis::getAxisId | ( | ) | const |
Get the ID if this axis.
Definition at line 160 of file AnnEvents.cpp.
float AnnControllerAxis::getRelValue | ( | ) | const |
Compute a float number between -1 and 1. if relative value isn't supported by the input, will return INVALID (42)
Definition at line 188 of file AnnEvents.cpp.
|
private |
Set an absolute value.
Definition at line 178 of file AnnEvents.cpp.
|
private |
Set the ID of the axis.
Definition at line 183 of file AnnEvents.cpp.
|
private |
Set a relative value.
Definition at line 172 of file AnnEvents.cpp.
|
friend |
Definition at line 177 of file AnnEvents.hpp.
|
friend |
Definition at line 176 of file AnnEvents.hpp.
|
private |
Raw values.
Definition at line 180 of file AnnEvents.hpp.
|
private |
Definition at line 181 of file AnnEvents.hpp.
|
private |
True if the there's no "relative" value.
Definition at line 191 of file AnnEvents.hpp.
|
private |
Definition at line 180 of file AnnEvents.hpp.