VR-Engage  2.2
Loading...
Searching...
No Matches
makVre::DtGainValueTransform Class Reference

Detailed Description

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>

Inheritance diagram for makVre::DtGainValueTransform:
[legend]

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
 

Constructor & Destructor Documentation

◆ DtGainValueTransform()

makVre::DtGainValueTransform::DtGainValueTransform ( )

Default constructor.

Initializes the gain value to 1.0 (no change)

◆ ~DtGainValueTransform()

virtual makVre::DtGainValueTransform::~DtGainValueTransform ( )
overridevirtual

Virtual destructor.

Member Function Documentation

◆ init()

virtual void makVre::DtGainValueTransform::init ( DtInitTable * config)
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.

Parameters
configPointer to the configuration table

Implements makVre::DtValueTransform.

◆ transform()

virtual float makVre::DtGainValueTransform::transform ( float value)
overridevirtual

Apply the gain transformation to an input value.

Multiplies the input value by the gain factor.

Parameters
valueThe raw input value to transform
Returns
The transformed value (input * gain)

Implements makVre::DtValueTransform.

Member Data Documentation

◆ myGain

float makVre::DtGainValueTransform::myGain
protected

Gain multiplication factor.

Input values are multiplied by this factor to increase or decrease sensitivity


The documentation for this class was generated from the following file: