|
VR-Engage
2.2
|
This transform scales input values by a speed factor. It's useful for adjusting the speed of movement or rotation in response to input, such as camera or character movement speeds.
#include <scaleValueTransform.h>
Public Member Functions | |
| DtScaleValueTransform () | |
| virtual | ~DtScaleValueTransform () 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 | mySpeed |
| makVre::DtScaleValueTransform::DtScaleValueTransform | ( | ) |
Default constructor.
Initializes the speed value to 1.0 (no scaling)
|
overridevirtual |
Virtual destructor.
|
overridevirtual |
Initialize the scale transform from configuration.
Reads the speed value from the configuration table. The expected configuration parameter is "Speed" which specifies the scaling factor to apply to input values.
| config | Pointer to the configuration table |
Implements makVre::DtValueTransform.
|
overridevirtual |
Apply the scaling transformation to an input value.
Multiplies the input value by the speed factor.
| value | The raw input value to transform |
Implements makVre::DtValueTransform.
|
protected |
Speed scaling factor.
Input values are multiplied by this factor to adjust movement or rotation speed