VR-Engage  2.2
Loading...
Searching...
No Matches
vreHumanJoystickMovementControllerDescriptor.h
Go to the documentation of this file.
1/*******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4*******************************************************************************/
5
6//! \file vreHumanJoystickMovementControllerDescriptor.h
7//! \ingroup vreVrfobjparam
8//! \brief Human joystick movement controller descriptor for VREngage
9//!
10//! This file defines the DtVreHumanJoystickMovementControllerDescriptor class, which configures
11//! human joystick movement controller components in VREngage. It extends the base human joystick
12//! movement controller descriptor to add speed multipliers for different postures (prone, kneeling,
13//! and crouching).
14
15#pragma once
17
19
20namespace makVre
21{
22//! \brief Type identifier string for the human joystick movement controller descriptor
23const char DtVreHumanJoystickMovementControllerDescriptorType[] = "vre-human-joystick-movement-controller-descriptor";
24
25//! \brief Human joystick movement controller descriptor for VREngage
26//!
27//! This class extends the base human joystick movement controller descriptor to add
28//! configuration for posture-specific speed multipliers. It allows the movement speed
29//! of human entities to be adjusted based on their current posture (prone, kneeling,
30//! or crouching), creating more realistic movement behavior in VREngage simulations.
33{
34public:
35 //! \brief Constructor with component name
36 //! \param name The name of this component
37 //! \param parentRegistry Parent registry for reader/writer functionality (optional)
38 //!
39 //! Creates a new human joystick movement controller descriptor with the specified name.
40 DtVreHumanJoystickMovementControllerDescriptor(const DtString& name, DtReaderWriterRegistry* parentRegistry = NULL);
41
42 //! \brief Constructor with component name as symbol string
43 //! \param name The name of this component as a symbol string
44 //! \param parentRegistry Parent registry for reader/writer functionality (optional)
45 //!
46 //! Creates a new human joystick movement controller descriptor with the specified name.
48 const DtSymbolString& name, DtReaderWriterRegistry* parentRegistry = NULL);
49
50 //! \brief Virtual destructor
51 //!
52 //! Cleans up resources used by the descriptor.
54
55 //! \brief Copy constructor
56 //! \param orig The source descriptor to copy from
57 //! \param parentRegistry Parent registry for reader/writer functionality (optional)
58 //!
59 //! Creates a new human joystick movement controller descriptor as a copy of the provided original.
61 const DtVreHumanJoystickMovementControllerDescriptor& orig, DtReaderWriterRegistry* parentRegistry = NULL);
62
63 //! \brief Assignment operator
64 //! \param orig The source descriptor to copy from
65 //! \return Reference to this descriptor after assignment
66 //!
67 //! Assigns the contents of the provided descriptor to this one.
70
71 //! \brief Gets the type identifier for this descriptor
72 //! \return String identifying this descriptor type
73 //!
74 //! Returns a unique type identifier string for this descriptor type.
75 //! Will return DtVreHumanJoystickMovementControllerDescriptorType.
76 virtual DtString type() const override;
77
78 //! \brief Creates a clone of this descriptor
79 //! \param parentRegistry Parent registry for reader/writer functionality (optional)
80 //! \return Pointer to a new descriptor that is a clone of this one
81 //!
82 //! Creates a new human joystick movement controller descriptor as a deep copy of this one.
83 virtual DtComponentDescriptor* clone(DtReaderWriterRegistry* parentRegistry = NULL) const override;
84
85 //! \brief Factory function to create a new instance of this descriptor
86 //! \return Pointer to a newly created descriptor
87 //!
88 //! Static factory function used by the descriptor creation system to instantiate
89 //! new instances of this descriptor type.
90 static DtComponentDescriptor* creator();
91
92 //! \brief Gets the prone speed multiplier
93 //! \return The speed multiplier for prone posture
94 //!
95 //! Returns the multiplier applied to movement speed when the entity is in prone posture.
96 //! A value of 1.0 represents normal speed, values less than 1.0 reduce speed, and
97 //! values greater than 1.0 increase speed.
98 virtual double proneSpeedMultiplier() const;
99
100 //! \brief Sets the prone speed multiplier
101 //! \param val The speed multiplier for prone posture
102 //!
103 //! Sets the multiplier applied to movement speed when the entity is in prone posture.
104 //! A value of 1.0 represents normal speed, values less than 1.0 reduce speed, and
105 //! values greater than 1.0 increase speed.
106 virtual void setProneSpeedMultiplier(double val);
107
108 //! \brief Gets the kneeling speed multiplier
109 //! \return The speed multiplier for kneeling posture
110 //!
111 //! Returns the multiplier applied to movement speed when the entity is in kneeling posture.
112 //! A value of 1.0 represents normal speed, values less than 1.0 reduce speed, and
113 //! values greater than 1.0 increase speed.
114 virtual double kneelingSpeedMultiplier() const;
115
116 //! \brief Sets the kneeling speed multiplier
117 //! \param val The speed multiplier for kneeling posture
118 //!
119 //! Sets the multiplier applied to movement speed when the entity is in kneeling posture.
120 //! A value of 1.0 represents normal speed, values less than 1.0 reduce speed, and
121 //! values greater than 1.0 increase speed.
122 virtual void setKneelingSpeedMultiplier(double val);
123
124 //! \brief Gets the crouching speed multiplier
125 //! \return The speed multiplier for crouching posture
126 //!
127 //! Returns the multiplier applied to movement speed when the entity is in crouching posture.
128 //! A value of 1.0 represents normal speed, values less than 1.0 reduce speed, and
129 //! values greater than 1.0 increase speed.
130 virtual double crouchingSpeedMultiplier() const;
131
132 //! \brief Sets the crouching speed multiplier
133 //! \param val The speed multiplier for crouching posture
134 //!
135 //! Sets the multiplier applied to movement speed when the entity is in crouching posture.
136 //! A value of 1.0 represents normal speed, values less than 1.0 reduce speed, and
137 //! values greater than 1.0 increase speed.
138 virtual void setCrouchingSpeedMultipler(double val);
139
140
141protected:
142 //! \brief Default constructor (not implemented)
143 //!
144 //! Default constructor is protected and not implemented to prevent
145 //! creation of instances without proper initialization.
147
148 //! \brief Speed multiplier for prone posture
149 //!
150 //! Multiplier applied to movement speed when the entity is in prone posture.
151 //! A value of 1.0 represents normal speed, values less than 1.0 reduce speed,
152 //! and values greater than 1.0 increase speed.
154
155 //! \brief Speed multiplier for kneeling posture
156 //!
157 //! Multiplier applied to movement speed when the entity is in kneeling posture.
158 //! A value of 1.0 represents normal speed, values less than 1.0 reduce speed,
159 //! and values greater than 1.0 increase speed.
161
162 //! \brief Speed multiplier for crouching posture
163 //!
164 //! Multiplier applied to movement speed when the entity is in crouching posture.
165 //! A value of 1.0 represents normal speed, values less than 1.0 reduce speed,
166 //! and values greater than 1.0 increase speed.
168};
169
170} // namespace makVre
DtHumanJoystickMovementControllerDescriptor(const DtString &name, DtReaderWriterRegistry *parentRegistry=NULL)
Constructor with component name.
virtual double kneelingSpeedMultiplier() const
Gets the kneeling speed multiplier.
DtVreHumanJoystickMovementControllerDescriptor(const DtSymbolString &name, DtReaderWriterRegistry *parentRegistry=NULL)
Constructor with component name as symbol string.
virtual void setKneelingSpeedMultiplier(double val)
Sets the kneeling speed multiplier.
DtVreHumanJoystickMovementControllerDescriptor(const DtVreHumanJoystickMovementControllerDescriptor &orig, DtReaderWriterRegistry *parentRegistry=NULL)
Copy constructor.
DtRwReal myKneelingSpeedMultiplier
Speed multiplier for kneeling posture.
Definition vreHumanJoystickMovementControllerDescriptor.h:160
virtual DtComponentDescriptor * clone(DtReaderWriterRegistry *parentRegistry=NULL) const override
Creates a clone of this descriptor.
DtVreHumanJoystickMovementControllerDescriptor & operator=(const DtVreHumanJoystickMovementControllerDescriptor &orig)
Assignment operator.
virtual void setProneSpeedMultiplier(double val)
Sets the prone speed multiplier.
DtRwReal myCrouchingSpeedMultiplier
Speed multiplier for crouching posture.
Definition vreHumanJoystickMovementControllerDescriptor.h:167
virtual double proneSpeedMultiplier() const
Gets the prone speed multiplier.
virtual ~DtVreHumanJoystickMovementControllerDescriptor() override
Virtual destructor.
DtRwReal myProneSpeedMultiplier
Speed multiplier for prone posture.
Definition vreHumanJoystickMovementControllerDescriptor.h:153
DtVreHumanJoystickMovementControllerDescriptor()
Default constructor (not implemented)
virtual DtString type() const override
Gets the type identifier for this descriptor.
virtual void setCrouchingSpeedMultipler(double val)
Sets the crouching speed multiplier.
static DtComponentDescriptor * creator()
Factory function to create a new instance of this descriptor.
DtVreHumanJoystickMovementControllerDescriptor(const DtString &name, DtReaderWriterRegistry *parentRegistry=NULL)
Constructor with component name.
virtual double crouchingSpeedMultiplier() const
Gets the crouching speed multiplier.
Human joystick movement controller descriptor for VREngage.
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 DtVreHumanJoystickMovementControllerDescriptorType[]
Type identifier string for the human joystick movement controller descriptor.
Definition vreHumanJoystickMovementControllerDescriptor.h:23