VR-Engage  2.2
Loading...
Searching...
No Matches
rotaryWingJoyDeviceControllerDescriptor.h
Go to the documentation of this file.
1/*******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4*******************************************************************************/
5
6//! \file rotaryWingJoyDeviceControllerDescriptor.h
7//! \ingroup vreVrfobjparam
8//! \brief Rotary wing joystick controller descriptor for VREngage
9//!
10//! This file defines the DtRotaryWingJoyDeviceControllerDescriptor class, which configures
11//! joystick control for rotary wing (helicopter) entities in VREngage. It provides parameters
12//! for flight characteristics, including rise time and feedback constants for different axes.
13
14#pragma once
15
17
18#include <vrfobjparam/joyDeviceControllerDescriptor.h>
19#include <readerWriter/rwReal.h>
20
21//! \brief Type identifier string for the rotary wing joystick controller descriptor
22const char DtRotaryWingJoyDeviceControllerDescriptorType[] = "rotary-wing-joy-controller-descriptor";
23
24namespace makVre
25{
26//! \brief Rotary wing joystick controller descriptor for VREngage
27//!
28//! This class defines a descriptor for the rotary wing joystick flight controller component,
29//! which enables helicopter-like entities to be controlled via joystick input devices.
30//! It provides configuration for helicopter flight characteristics, including rise time
31//! and feedback constants for yaw, pitch, and roll axes to create realistic helicopter
32//! flight control in VREngage simulations.
33class VREVRFOBJPARAM_DLL DtRotaryWingJoyDeviceControllerDescriptor : public DtJoyDeviceControllerDescriptor
34{
35public:
36 //! \brief Constructor with component name
37 //! \param name The name of this component
38 //! \param parentRegistry Parent registry for reader/writer functionality (optional)
39 //!
40 //! Creates a new rotary wing joystick controller descriptor with the specified name.
41 DtRotaryWingJoyDeviceControllerDescriptor(const DtString& name, DtReaderWriterRegistry* parentRegistry = 0);
42
43 //! \brief Virtual destructor
44 //!
45 //! Cleans up resources used by the descriptor.
47
48 //! \brief Copy constructor
49 //! \param orig The source descriptor to copy from
50 //! \param parentRegistry Parent registry for reader/writer functionality (optional)
51 //!
52 //! Creates a new rotary wing joystick controller descriptor as a copy of the provided original.
54 const DtRotaryWingJoyDeviceControllerDescriptor& orig, DtReaderWriterRegistry* parentRegistry = 0);
55
56 //! \brief Assignment operator
57 //! \param orig The source descriptor to copy from
58 //! \return Reference to this descriptor after assignment
59 //!
60 //! Assigns the contents of the provided descriptor to this one.
62
63 //! \brief Creates a clone of this descriptor
64 //! \param parentRegistry Parent registry for reader/writer functionality (optional)
65 //! \return Pointer to a new descriptor that is a clone of this one
66 //!
67 //! Creates a new rotary wing joystick controller descriptor as a deep copy of this one.
68 virtual DtComponentDescriptor* clone(DtReaderWriterRegistry* parentRegistry = 0) const override;
69
70 //! \brief Gets the type identifier for this descriptor
71 //! \return String identifying this descriptor type
72 //!
73 //! Returns a unique type identifier string for this descriptor type.
74 //! Will return DtRotaryWingJoyDeviceControllerDescriptorType.
75 virtual DtString type() const override;
76
77 //! \brief Gets the controller rise time
78 //! \return The controller rise time in seconds
79 //!
80 //! Returns the time it takes for the controller to respond fully to input changes.
81 //! This affects how quickly the helicopter responds to joystick commands.
82 virtual DtReal riseTime() const;
83
84 //! \brief Gets the yaw control feedback constant
85 //! \return The yaw feedback constant value
86 //!
87 //! Returns the feedback constant for yaw control, which affects
88 //! the responsiveness and stability of yaw (rotation) control.
89 virtual DtReal yawConst() const;
90
91 //! \brief Gets the pitch control feedback constant
92 //! \return The pitch feedback constant value
93 //!
94 //! Returns the feedback constant for pitch control, which affects
95 //! the responsiveness and stability of forward/backward tilt.
96 virtual DtReal pitchConst() const;
97
98 //! \brief Gets the roll control feedback constant
99 //! \return The roll feedback constant value
100 //!
101 //! Returns the feedback constant for roll control, which affects
102 //! the responsiveness and stability of side-to-side tilt.
103 virtual DtReal rollConst() const;
104
105 //! \brief Factory function to create a new instance of this descriptor
106 //! \return Pointer to a newly created descriptor
107 //!
108 //! Static factory function used by the descriptor creation system to instantiate
109 //! new instances of this descriptor type.
110 static DtComponentDescriptor* creator();
111
112protected:
113 //! \brief Default constructor (protected)
114 //!
115 //! Protected default constructor used by the factory pattern.
117
118 //! \name Configuration Parameters
119 //! These parameters are available for setting in the OPD files.
120 //! @{
121
122 //! \brief Controller response rise time
123 //!
124 //! The time it takes for the controller to respond fully to input changes.
125 //! This affects how quickly the helicopter responds to joystick commands.
126 //! Higher values result in slower, smoother response, while lower values
127 //! provide quicker but potentially less stable control.
128 //!
129 //! Default value: 1.5
130 //! Units: seconds
131 DtRwReal myRiseTime;
132
133 //! \brief Yaw control feedback constant
134 //!
135 //! The feedback constant used for yaw (rotation) control of the helicopter.
136 //! This value affects how responsive and stable the helicopter is when rotating
137 //! around its vertical axis. Higher values provide tighter control but may
138 //! cause oscillation if set too high.
139 //!
140 //! Default value: 2.0
141 DtRwReal myYawConst;
142
143 //! \brief Pitch control feedback constant
144 //!
145 //! The feedback constant used for pitch (forward/backward tilt) control of the helicopter.
146 //! This value affects how responsive and stable the helicopter is when tilting
147 //! forward or backward. Higher values provide tighter control but may
148 //! cause oscillation if set too high.
149 //!
150 //! Default value: 1.0
151 DtRwReal myPitchConst;
152
153 //! \brief Roll control feedback constant
154 //!
155 //! The feedback constant used for roll (side-to-side tilt) control of the helicopter.
156 //! This value affects how responsive and stable the helicopter is when tilting
157 //! to the left or right. Higher values provide tighter control but may
158 //! cause oscillation if set too high.
159 //!
160 //! Default value: 2.2
161 DtRwReal myRollConst;
162 //! @}
163};
164} // namespace makVre
DtRwReal myPitchConst
Pitch control feedback constant.
Definition rotaryWingJoyDeviceControllerDescriptor.h:151
virtual DtComponentDescriptor * clone(DtReaderWriterRegistry *parentRegistry=0) const override
Creates a clone of this descriptor.
DtRwReal myRiseTime
Controller response rise time.
Definition rotaryWingJoyDeviceControllerDescriptor.h:131
DtRotaryWingJoyDeviceControllerDescriptor & operator=(const DtRotaryWingJoyDeviceControllerDescriptor &orig)
Assignment operator.
DtRotaryWingJoyDeviceControllerDescriptor(const DtString &name, DtReaderWriterRegistry *parentRegistry=0)
Constructor with component name.
DtRotaryWingJoyDeviceControllerDescriptor()
Default constructor (protected)
virtual DtReal yawConst() const
Gets the yaw control feedback constant.
virtual ~DtRotaryWingJoyDeviceControllerDescriptor() override
Virtual destructor.
virtual DtString type() const override
Gets the type identifier for this descriptor.
DtRwReal myYawConst
Yaw control feedback constant.
Definition rotaryWingJoyDeviceControllerDescriptor.h:141
DtRotaryWingJoyDeviceControllerDescriptor(const DtRotaryWingJoyDeviceControllerDescriptor &orig, DtReaderWriterRegistry *parentRegistry=0)
Copy constructor.
virtual DtReal riseTime() const
Gets the controller rise time.
virtual DtReal pitchConst() const
Gets the pitch control feedback constant.
virtual DtReal rollConst() const
Gets the roll control feedback constant.
DtRwReal myRollConst
Roll control feedback constant.
Definition rotaryWingJoyDeviceControllerDescriptor.h:161
static DtComponentDescriptor * creator()
Factory function to create a new instance of this descriptor.
Export macros for the VREngage Object Parameter library.
#define VREVRFOBJPARAM_DLL
Platform-specific DLL export/import declaration.
Definition export.h:27
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
const char DtRotaryWingJoyDeviceControllerDescriptorType[]
Type identifier string for the rotary wing joystick controller descriptor.
Definition rotaryWingJoyDeviceControllerDescriptor.h:22