VR-Engage  2.2
Loading...
Searching...
No Matches
invertValueTransform.h
Go to the documentation of this file.
1/******************************************************************************
2** Copyright (c) 2025 MAK Technologies, Inc.
3** All rights reserved.
4******************************************************************************/
5
6//! \file
7//! \brief Value transformation that inverts input values
8
9#pragma once
10
11#include "vreInput/export.h"
13
14namespace makVre
15{
16//! \brief Value transformation that reverses the sign of input values
17//!
18//! This transform inverts input values by negating them (multiplying by -1).
19//! It's useful for reversing the direction of controls, such as inverting
20//! a joystick's Y-axis for flight controls or camera look.
22{
23public:
24 //! \brief Default constructor
26
27 //! \brief Virtual destructor
28 virtual ~DtInvertValueTransform() override;
29
30 //! \brief Initialize the inversion transform from configuration
31 //!
32 //! Configures the inversion transform based on the configuration table.
33 //! Does not require specific configuration parameters as inversion
34 //! is a simple operation that always negates the input value.
35 //!
36 //! \param config Pointer to the configuration table
37 virtual void init(DtInitTable* config) override;
38
39 //! \brief Apply the inversion transformation to an input value
40 //!
41 //! Negates the input value by multiplying it by -1.0.
42 //!
43 //! \param value The raw input value to transform
44 //! \return The transformed value (input * -1.0)
45 virtual float transform(float value) override;
46
47protected:
48 // No additional members needed for this simple transformation
49};
50
51} // namespace makVre
Table-based access to Lua state for configuration data.
Definition initializer.h:38
virtual float transform(float value) override
Apply the inversion transformation to an input value.
virtual void init(DtInitTable *config) override
Initialize the inversion transform from configuration.
DtInvertValueTransform()
Default constructor.
virtual ~DtInvertValueTransform() override
Virtual destructor.
DtValueTransform()
Default constructor.
Definition valueTransform.h:27
Defines DLL export/import macros for the vreInput library.
#define VREINPUT_DLL
DLL export/import macro for the vreInput library.
Definition export.h:25
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
Abstract base class for input value transformation operations.