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
"
12
#include "
vreInput/valueTransform.h
"
13
14
namespace
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.
21
class
VREINPUT_DLL
DtInvertValueTransform
:
public
DtValueTransform
22
{
23
public
:
24
//! \brief Default constructor
25
DtInvertValueTransform
();
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
47
protected
:
48
// No additional members needed for this simple transformation
49
};
50
51
}
// namespace makVre
makVre::DtInitTable
Table-based access to Lua state for configuration data.
Definition
initializer.h:38
makVre::DtInvertValueTransform::transform
virtual float transform(float value) override
Apply the inversion transformation to an input value.
makVre::DtInvertValueTransform::init
virtual void init(DtInitTable *config) override
Initialize the inversion transform from configuration.
makVre::DtInvertValueTransform::DtInvertValueTransform
DtInvertValueTransform()
Default constructor.
makVre::DtInvertValueTransform::~DtInvertValueTransform
virtual ~DtInvertValueTransform() override
Virtual destructor.
makVre::DtValueTransform::DtValueTransform
DtValueTransform()
Default constructor.
Definition
valueTransform.h:27
export.h
Defines DLL export/import macros for the vreInput library.
VREINPUT_DLL
#define VREINPUT_DLL
DLL export/import macro for the vreInput library.
Definition
export.h:25
makVre
Include export definitions for this library.
Definition
glsVreMessageUtil.h:49
valueTransform.h
Abstract base class for input value transformation operations.
Generated on 2026-01-13 from SVN revision 282860 - Copyright © 2005-2026 MAK Technologies. All Rights Reserved.