Rebel Fork Framework
|
Helper class to transform axis value. More...
#include <Urho3D/Input/AxisAdapter.h>
Public Member Functions | |
void | SetDeadZone (float deadZone) |
Set dead zone half-width to mitigate axis drift. | |
float | GetDeadZone () const |
Get dead zone half-width. | |
void | SetSensitivity (float value) |
Set both sensitivity values. 0.0 represent linear input mapping. | |
void | SetPositiveSensitivity (float value) |
Set positive sensitivity value. 0.0 represent linear input mapping. | |
void | SetNegativeSensitivity (float value) |
Set negative sensitivity value. 0.0 represent linear input mapping. | |
float | GetPositiveSensitivity () const |
Get positive sensitivity value. | |
float | GetNegativeSensitivity () const |
Get negative sensitivity value. | |
void | SetNeutralValue (float value) |
Set neutral value. Neutral value is transformed into 0.0f. | |
float | GetNeutralValue () const |
Get neutral value. Neutral value is transformed into 0.0f. | |
void | SetInverted (bool inverted) |
Set inverted flag. | |
bool | IsInverted () const |
Is axis inverted. | |
void | SerializeInBlock (Archive &archive) |
Serialize content from/to archive. May throw ArchiveException. | |
float | Transform (float value) const |
Transform axis value. The output is normalized around neutral position into range -1..1. | |
Static Public Attributes | |
static constexpr float | DefaultDeadZone = 0.1f |
static constexpr float | Epsilon = 1.0f/32767.f |
Private Member Functions | |
float | GetExponent (float sensitivity) const |
Convert sensitivity to exponent. | |
Private Attributes | |
float | deadZone_ {DefaultDeadZone} |
Joystick dead zone half-width. | |
float | posSensitivity_ {0.0f} |
Positive sensitivity value. | |
float | negSensitivity_ {0.0f} |
Negative sensitivity value. | |
float | neutral_ {0.0f} |
Neutral value. | |
bool | inverted_ {false} |
Is axis inverted. | |
Helper class to transform axis value.