|
VR-Engage
2.2
|
This transform applies a dead zone to input values. Values within the dead zone (close to zero) are filtered out and returned as zero. This helps eliminate noise or small unintentional movements from input devices like joysticks.
#include <deadZoneValueTransform.h>
Public Member Functions | |
| DtDeadZoneValueTransform () | |
| virtual | ~DtDeadZoneValueTransform () override |
| virtual void | init (DtInitTable *config) override |
| virtual float | transform (float value) override |
Public Member Functions inherited from makVre::DtValueTransform | |
| DtValueTransform () | |
| virtual | ~DtValueTransform () |
Protected Attributes | |
| float | myDeadZone = 0.0 |
| float | myScale = 1.0 |
| makVre::DtDeadZoneValueTransform::DtDeadZoneValueTransform | ( | ) |
Default constructor.
Initializes the dead zone value to zero
|
overridevirtual |
Virtual destructor.
|
overridevirtual |
Initialize the dead zone transform from configuration.
Reads the dead zone value from the configuration table. The expected configuration parameter is "DeadZone" which specifies the threshold below which input values will be zeroed out.
| config | Pointer to the configuration table |
Implements makVre::DtValueTransform.
|
overridevirtual |
Apply the dead zone transformation to an input value.
Values with absolute magnitude less than the dead zone threshold are set to zero. Values outside the dead zone are passed through unchanged.
| value | The raw input value to transform |
Implements makVre::DtValueTransform.
|
protected |
Dead zone threshold value.
Input values with absolute magnitude less than this value will be zeroed out
|
protected |