VR-Engage  2.2
Loading...
Searching...
No Matches
vreHumanMovementActuatorDescriptor.h
Go to the documentation of this file.
1/*******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4*******************************************************************************/
5
6//! \file vreHumanMovementActuatorDescriptor.h
7//! \ingroup vreVrfobjparam
8//! \brief Human movement actuator descriptor for VREngage
9//!
10//! This file defines the DtVreHumanMovementActuatorDescriptor class, which configures
11//! human movement actuator components in VREngage with additional fatigue-related parameters.
12//! Fatigue affects movement speed and recovery rates based on various thresholds and conditions.
13
14#pragma once
15
17#include <vrfobjparam/humanMovementActuatorDescriptor.h>
18#include <readerWriter/rwReal.h>
19
20namespace makVre
21{
22//! \brief Type identifier string for the human movement actuator descriptor
23const char DtVreHumanMovementActuatorDescriptorType[] = "vre-human-movement-actuator-descriptor";
24
25//! \brief Human movement actuator descriptor with fatigue modeling for VREngage
26//!
27//! This class extends the base human movement actuator descriptor to add
28//! configuration for fatigue modeling. Fatigue affects entity movement speed
29//! based on activity levels, with different increase and recovery rates for
30//! different intensity levels, and thresholds that determine when fatigue
31//! starts to accumulate or how it affects movement capabilities.
32class VREVRFOBJPARAM_DLL DtVreHumanMovementActuatorDescriptor : public DtHumanMovementActuatorDescriptor
33{
34private:
35 //! \brief Default constructor (not implemented)
36 //!
37 //! Default constructor is private and not implemented to prevent
38 //! creation of instances without proper initialization.
40
41public:
42 //! \brief Constructor with component name
43 //! \param componentName The name of this component
44 //! \param parentRegistry Parent registry for reader/writer functionality (optional)
45 //!
46 //! Creates a new human movement actuator descriptor with the specified name.
47 DtVreHumanMovementActuatorDescriptor(const DtString& componentName, DtReaderWriterRegistry* parentRegistry = 0);
48
49 //! \brief Copy constructor
50 //! \param orig The source descriptor to copy from
51 //! \param parentRegistry Parent registry for reader/writer functionality (optional)
52 //!
53 //! Creates a new human movement actuator descriptor as a copy of the provided original.
55 const DtVreHumanMovementActuatorDescriptor& orig, DtReaderWriterRegistry* parentRegistry = 0);
56
57 //! \brief Virtual destructor
58 //!
59 //! Cleans up resources used by the descriptor.
61
62 //! \brief Assignment operator
63 //! \param orig The source descriptor to copy from
64 //! \return Reference to this descriptor after assignment
65 //!
66 //! Assigns the contents of the provided descriptor to this one.
68
69 //! \brief Gets the type identifier for this descriptor
70 //! \return String identifying this descriptor type
71 //!
72 //! Returns a unique type identifier string for this descriptor type.
73 //! Will return DtVreHumanMovementActuatorDescriptorType.
74 virtual DtString type() const override;
75
76 //! \brief Creates a clone of this descriptor
77 //! \param parentRegistry Parent registry for reader/writer functionality (optional)
78 //! \return Pointer to a new descriptor that is a clone of this one
79 //!
80 //! Creates a new human movement actuator descriptor as a deep copy of this one.
81 virtual DtComponentDescriptor* clone(DtReaderWriterRegistry* parentRegistry = 0) const override;
82
83 //! \brief Factory function to create a new instance of this descriptor
84 //! \return Pointer to a newly created descriptor
85 //!
86 //! Static factory function used by the descriptor creation system to instantiate
87 //! new instances of this descriptor type.
88 static DtComponentDescriptor* creator();
89
90 //! \brief Gets the fatigue increase rate for low-intensity activity
91 //! \return The fatigue increase rate in fatigue points per second
92 //!
93 //! Returns the rate at which fatigue increases during low-intensity activity.
94 //! Units are fatigue points per second, with maximum fatigue being 100 points.
95 DtReal fatigueIncreaseRateLow() const;
96
97 //! \brief Sets the fatigue increase rate for low-intensity activity
98 //! \param fatigueIncreaseRateLow The fatigue increase rate in fatigue points per second
99 //!
100 //! Sets the rate at which fatigue increases during low-intensity activity.
101 //! Units are fatigue points per second, with maximum fatigue being 100 points.
103
104 //! \brief Gets the fatigue increase rate for medium-intensity activity
105 //! \return The fatigue increase rate in fatigue points per second
106 //!
107 //! Returns the rate at which fatigue increases during medium-intensity activity.
108 //! Units are fatigue points per second, with maximum fatigue being 100 points.
110
111 //! \brief Sets the fatigue increase rate for medium-intensity activity
112 //! \param fatigueIncreaseRateMedium The fatigue increase rate in fatigue points per second
113 //!
114 //! Sets the rate at which fatigue increases during medium-intensity activity.
115 //! Units are fatigue points per second, with maximum fatigue being 100 points.
117
118 //! \brief Gets the fatigue increase rate for high-intensity activity
119 //! \return The fatigue increase rate in fatigue points per second
120 //!
121 //! Returns the rate at which fatigue increases during high-intensity activity.
122 //! Units are fatigue points per second, with maximum fatigue being 100 points.
124
125 //! \brief Sets the fatigue increase rate for high-intensity activity
126 //! \param fatigueIncreaseRateHigh The fatigue increase rate in fatigue points per second
127 //!
128 //! Sets the rate at which fatigue increases during high-intensity activity.
129 //! Units are fatigue points per second, with maximum fatigue being 100 points.
131
132 //! \brief Gets the fatigue recovery rate for low-intensity rest
133 //! \return The fatigue recovery rate in fatigue points per second
134 //!
135 //! Returns the rate at which fatigue recovers during low-intensity rest periods.
136 //! Units are fatigue points per second, with maximum fatigue being 100 points.
138
139 //! \brief Sets the fatigue recovery rate for low-intensity rest
140 //! \param fatigueRateLow The fatigue recovery rate in fatigue points per second
141 //!
142 //! Sets the rate at which fatigue recovers during low-intensity rest periods.
143 //! Units are fatigue points per second, with maximum fatigue being 100 points.
144 void setFatigueRecoveryRateLow(DtReal fatigueRateLow);
145
146 //! \brief Gets the fatigue recovery rate for medium-intensity rest
147 //! \return The fatigue recovery rate in fatigue points per second
148 //!
149 //! Returns the rate at which fatigue recovers during medium-intensity rest periods.
150 //! Units are fatigue points per second, with maximum fatigue being 100 points.
152
153 //! \brief Sets the fatigue recovery rate for medium-intensity rest
154 //! \param fatigueRateMedium The fatigue recovery rate in fatigue points per second
155 //!
156 //! Sets the rate at which fatigue recovers during medium-intensity rest periods.
157 //! Units are fatigue points per second, with maximum fatigue being 100 points.
158 void setFatigueRecoveryRateMedium(DtReal fatigueRateMedium);
159
160 //! \brief Gets the fatigue recovery rate for high-intensity rest
161 //! \return The fatigue recovery rate in fatigue points per second
162 //!
163 //! Returns the rate at which fatigue recovers during high-intensity rest periods.
164 //! Units are fatigue points per second, with maximum fatigue being 100 points.
166
167 //! \brief Sets the fatigue recovery rate for high-intensity rest
168 //! \param fatigueRateHigh The fatigue recovery rate in fatigue points per second
169 //!
170 //! Sets the rate at which fatigue recovers during high-intensity rest periods.
171 //! Units are fatigue points per second, with maximum fatigue being 100 points.
172 void setFatigueRecoveryRateHigh(DtReal fatigueRateHigh);
173
174 //! \brief Gets the maximum fatigue limit for movement capabilities
175 //! \return The maximum fatigue points that still allow movement
176 //!
177 //! Returns the maximum fatigue value that still allows movement. This prevents
178 //! movement from completely stopping at maximum fatigue (100 points).
179 DtReal fatigueMaxForMovement() const;
180
181 //! \brief Sets the maximum fatigue limit for movement capabilities
182 //! \param fatigueMaxForMovement The maximum fatigue points that still allow movement
183 //!
184 //! Sets the maximum fatigue value that still allows movement. This prevents
185 //! movement from completely stopping at maximum fatigue (100 points).
187
188 //! \brief Gets the fatigue threshold percentage
189 //! \return The fatigue threshold as a percentage of maximum speed
190 //!
191 //! Returns the speed threshold (as a percentage of the adjusted maximum speed)
192 //! above which fatigue starts to accumulate. The adjusted maximum speed takes
193 //! into account the effects of overall health and mobility health.
195
196 //! \brief Sets the fatigue threshold percentage
197 //! \param fatigueThresholdPercent The fatigue threshold as a percentage of maximum speed
198 //!
199 //! Sets the speed threshold (as a percentage of the adjusted maximum speed)
200 //! above which fatigue starts to accumulate. The adjusted maximum speed takes
201 //! into account the effects of overall health and mobility health.
203
204protected:
205 //! \brief Fatigue increase rate for low-intensity activity
206 //!
207 //! Rate at which fatigue increases during low-intensity activity.
208 //! Units are fatigue points per second, with maximum fatigue being 100 points.
210
211 //! \brief Fatigue increase rate for medium-intensity activity
212 //!
213 //! Rate at which fatigue increases during medium-intensity activity.
214 //! Units are fatigue points per second, with maximum fatigue being 100 points.
216
217 //! \brief Fatigue increase rate for high-intensity activity
218 //!
219 //! Rate at which fatigue increases during high-intensity activity.
220 //! Units are fatigue points per second, with maximum fatigue being 100 points.
222
223 //! \brief Fatigue recovery rate for low-intensity rest
224 //!
225 //! Rate at which fatigue recovers during low-intensity rest periods.
226 //! Units are fatigue points per second, with maximum fatigue being 100 points.
228
229 //! \brief Fatigue recovery rate for medium-intensity rest
230 //!
231 //! Rate at which fatigue recovers during medium-intensity rest periods.
232 //! Units are fatigue points per second, with maximum fatigue being 100 points.
234
235 //! \brief Fatigue recovery rate for high-intensity rest
236 //!
237 //! Rate at which fatigue recovers during high-intensity rest periods.
238 //! Units are fatigue points per second, with maximum fatigue being 100 points.
240
241 //! \brief Maximum fatigue limit for movement capabilities
242 //!
243 //! The maximum fatigue value that still allows movement. This prevents
244 //! movement from completely stopping at maximum fatigue (100 points).
246
247 //! \brief Fatigue threshold percentage
248 //!
249 //! The speed threshold (as a percentage of the adjusted maximum speed)
250 //! above which fatigue starts to accumulate. The adjusted maximum speed takes
251 //! into account the effects of overall health and mobility health.
253};
254} // namespace makVre
DtReal fatigueThresholdPercent() const
Gets the fatigue threshold percentage.
DtReal fatigueMaxForMovement() const
Gets the maximum fatigue limit for movement capabilities.
DtReal fatigueIncreaseRateLow() const
Gets the fatigue increase rate for low-intensity activity.
DtReal fatigueRecoveryRateHigh() const
Gets the fatigue recovery rate for high-intensity rest.
DtVreHumanMovementActuatorDescriptor(const DtString &componentName, DtReaderWriterRegistry *parentRegistry=0)
Constructor with component name.
DtRwReal myFatigueRecoveryRateLow
Fatigue recovery rate for low-intensity rest.
Definition vreHumanMovementActuatorDescriptor.h:227
virtual ~DtVreHumanMovementActuatorDescriptor() override
Virtual destructor.
DtVreHumanMovementActuatorDescriptor(const DtVreHumanMovementActuatorDescriptor &orig, DtReaderWriterRegistry *parentRegistry=0)
Copy constructor.
void setFatigueRecoveryRateMedium(DtReal fatigueRateMedium)
Sets the fatigue recovery rate for medium-intensity rest.
virtual DtComponentDescriptor * clone(DtReaderWriterRegistry *parentRegistry=0) const override
Creates a clone of this descriptor.
DtReal fatigueRecoveryRateLow() const
Gets the fatigue recovery rate for low-intensity rest.
void setFatigueRecoveryRateLow(DtReal fatigueRateLow)
Sets the fatigue recovery rate for low-intensity rest.
DtRwReal myFatigueMaxForMovement
Maximum fatigue limit for movement capabilities.
Definition vreHumanMovementActuatorDescriptor.h:245
DtReal fatigueIncreaseRateHigh() const
Gets the fatigue increase rate for high-intensity activity.
virtual DtString type() const override
Gets the type identifier for this descriptor.
DtReal fatigueRecoveryRateMedium() const
Gets the fatigue recovery rate for medium-intensity rest.
DtRwReal myFatigueThresholdPercent
Fatigue threshold percentage.
Definition vreHumanMovementActuatorDescriptor.h:252
void setFatigueIncreaseRateHigh(DtReal fatigueIncreaseRateHigh)
Sets the fatigue increase rate for high-intensity activity.
DtRwReal myFatigueRecoveryRateHigh
Fatigue recovery rate for high-intensity rest.
Definition vreHumanMovementActuatorDescriptor.h:239
DtReal fatigueIncreaseRateMedium() const
Gets the fatigue increase rate for medium-intensity activity.
DtVreHumanMovementActuatorDescriptor & operator=(const DtVreHumanMovementActuatorDescriptor &orig)
Assignment operator.
DtRwReal myFatigueRecoveryRateMedium
Fatigue recovery rate for medium-intensity rest.
Definition vreHumanMovementActuatorDescriptor.h:233
DtVreHumanMovementActuatorDescriptor()
Default constructor (not implemented)
void setFatigueRecoveryRateHigh(DtReal fatigueRateHigh)
Sets the fatigue recovery rate for high-intensity rest.
void setFatigueMaxForMovment(DtReal fatigueMaxForMovement)
Sets the maximum fatigue limit for movement capabilities.
DtRwReal myFatigueIncreaseRateMedium
Fatigue increase rate for medium-intensity activity.
Definition vreHumanMovementActuatorDescriptor.h:215
void setFatigueIncreaseRateMedium(DtReal fatigueIncreaseRateMedium)
Sets the fatigue increase rate for medium-intensity activity.
void setFatigueIncreaseRateLow(DtReal fatigueIncreaseRateLow)
Sets the fatigue increase rate for low-intensity activity.
static DtComponentDescriptor * creator()
Factory function to create a new instance of this descriptor.
DtRwReal myFatigueIncreaseRateHigh
Fatigue increase rate for high-intensity activity.
Definition vreHumanMovementActuatorDescriptor.h:221
DtRwReal myFatigueIncreaseRateLow
Fatigue increase rate for low-intensity activity.
Definition vreHumanMovementActuatorDescriptor.h:209
void setFatigueThresholdPercent(DtReal fatigueThresholdPercent)
Sets the fatigue threshold percentage.
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 DtVreHumanMovementActuatorDescriptorType[]
Type identifier string for the human movement actuator descriptor.
Definition vreHumanMovementActuatorDescriptor.h:23