Base class for joystick feature primitives
Class for joystick features. A feature can be:
- scalar [1]
- analog stick
- accelerometer
- motor
- relative pointer [2]
- absolute pointer
- wheel
- throttle
- keyboard key
[1] All three driver primitives (buttons, hats and axes) have a state that can be represented using a single scalar value. For this reason, features that map to a single primitive are called "scalar features".
[2] Relative pointers are similar to analog sticks, but they use relative distances instead of positions.
◆ JoystickFeature() [1/2]
Class constructor.
- Parameters
-
◆ JoystickFeature() [2/2]
Class copy constructor.
- Parameters
-
[in] | other | Other class to copy on construct here |
◆ operator=()
Copy data from another JoystickFeature class to here.
- Parameters
-
[in] | other | Other class to copy here |
◆ operator==()
Compare this with another class of this type.
- Parameters
-
[in] | other | Other class to compare |
- Returns
- True if they are equal, false otherwise
◆ Name()
const std::string& Name |
( |
void |
| ) |
const |
|
inline |
Get name of feature.
- Returns
- Name of feature
◆ Type()
◆ IsValid()
Check this feature is valid.
- Returns
- True if valid (type != JOYSTICK_FEATURE_TYPE_UNKNOWN), false otherwise
◆ SetName()
void SetName |
( |
const std::string & |
name | ) |
|
|
inline |
Set name of feature.
- Parameters
-
◆ SetType()
Set type of feature.
- Parameters
-
◆ SetInvalid()
◆ Primitive()
Get primitive of feature by wanted type.
- Parameters
-
- Returns
- Primitive of asked type
◆ SetPrimitive()
Set primitive for feature by wanted type.
- Parameters
-
◆ Primitives() [1/2]
Get all primitives on this class.
- Returns
- Array list of primitives
◆ Primitives() [2/2]
Get all primitives on this class (as constant).
- Returns
- Constant a´rray list of primitives