|
VR-Engage
2.2
|
This transform applies a gain (amplification factor) to input values. It's useful for increasing or decreasing the sensitivity of input devices like joysticks, mice, or other analog inputs.
#include <gainValueTransform.h>
Public Member Functions | |
| DtGainValueTransform () | |
| virtual | ~DtGainValueTransform () 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 | myGain |
| makVre::DtGainValueTransform::DtGainValueTransform | ( | ) |
Default constructor.
Initializes the gain value to 1.0 (no change)
|
overridevirtual |
Virtual destructor.
|
overridevirtual |
Initialize the gain transform from configuration.
Reads the gain value from the configuration table. The expected configuration parameter is "Gain" which specifies the multiplication factor to apply to input values.
| config | Pointer to the configuration table |
Implements makVre::DtValueTransform.
|
overridevirtual |
Apply the gain transformation to an input value.
Multiplies the input value by the gain factor.
| value | The raw input value to transform |
Implements makVre::DtValueTransform.
|
protected |
Gain multiplication factor.
Input values are multiplied by this factor to increase or decrease sensitivity