VR-Engage  2.2
Loading...
Searching...
No Matches
vreGunJoyActuator.h
Go to the documentation of this file.
1/*******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4*******************************************************************************/
5
6//! \file vreGunJoyActuator.h
7//! \ingroup vreVrfmodel
8//! \brief Actuator that models firing a turret mounted gun with joystick controls
9//!
10//! This file defines the DtVreGunJoyActuator class which provides a model of a
11//! turret mounted gun controlled via joystick. It handles firing events, ammunition
12//! management, aiming, and weapon switching through joystick inputs.
13#pragma once
14
15#include "vreVrfmodel/export.h"
18
20
22
23#include <matrix/vlTaitBryan.h>
24#include <matrix/vlVector.h>
25
26class DtBooleanInputPort;
27class DtBooleanOutputPort;
28class DtInputPortGroup;
29class DtSimResource;
30
31namespace makVrfEvents
32{
33class DtFireEvent;
34class DtDetonationEvent;
35} // namespace makVrfEvents
36
37namespace makVre
38{
41class DtProjectile;
42
43//! \brief Type identifier for the VRE gun joystick actuator component
44const char DtVreGunJoyActuatorType[] = "vre-gun-joystick-actuator";
45
46//! \brief Actuator that models firing a turret mounted gun with joystick controls
47//!
48//! DtVreGunJoyActuator provides a model of a turret mounted gun controllable via joystick.
49//! It extends the ballistic gun actuator and adds the ability to aim the gun using joystick
50//! inputs without needing a separate aiming actuator. The component manages firing mechanics,
51//! ammunition tracking, weapon switching, and projectile creation for various turret-mounted
52//! weapons.
53//!
54//! Uses Descriptor Type: DtVreBallisticGunDescriptor
55
56class VREVRFMODEL_DLL DtVreGunJoyActuator : public DtVreSimComponent<DtBallisticGunJoy>
57{
58public:
59 //! \brief Constructor
60 //! \param name The name of this component
61 //! \param owner The local object that owns this component
62 //! \param simManager The simulation services manager
63 //! \param desc Component descriptor with configuration parameters
64 //! \param parentRegistry Optional parent registry for reader/writer functionality
65 //!
66 //! Creates a new gun joystick actuator component with the specified parameters.
67 DtVreGunJoyActuator(const DtString& name, DtLocalObject* owner, DtSimulationServices* simManager,
68 DtComponentDescriptor* desc = 0, DtReaderWriterRegistry* parentRegistry = 0);
69
70 //! \brief Virtual destructor
71 //!
72 //! Cleans up resources used by the gun joystick actuator component,
73 //! including ammunition manager and port connections.
74 virtual ~DtVreGunJoyActuator() override;
75
76 //! \brief Initializes the gun joystick actuator
77 //! \return True if initialization is successful, false otherwise
78 //!
79 //! Performs initial setup of the gun joystick actuator, including port connections,
80 //! ammunition management, and message handling. Called during component initialization.
81 virtual bool init() override;
82
83 //! \brief Gets the type identifier for this component
84 //! \return String identifying the component type (DtVreGunJoyActuatorType)
85 //!
86 //! Implements the DtSimComponent::type() method to return the
87 //! type identifier for this component.
88 virtual const char* type() const override;
89
90 //! \brief Updates the actuator state each simulation frame
91 //!
92 //! Processes input controls, manages firing state, aims the gun using joystick inputs,
93 //! and handles ammunition consumption during each simulation frame. This is the main
94 //! update method called every simulation tick.
95 virtual void tick() override;
96
97 //! \brief Performs initialization before the first simulation tick
98 //!
99 //! Sets up initial states and configurations before the simulation begins,
100 //! including loading ammunition types and initializing resources. This initialization
101 //! is performed once before the first tick of the simulation.
102 virtual void preFirstTickInit() override;
103
104 //! \brief Updates the state properties for the gun actuator.
105 //!
106 //! Synchronizes and updates simulation state properties related to the gun actuator,
107 //! such as ammunition counts, and weapon status. This method ensures
108 //! that the current state of the gun is accurately reflected in the simulation's state
109 //! properties for use by the VRE Frontend, networking, and other systems that
110 //! monitor or display weapon status.
111 //!
112 //! Typically called after firing, reloading, or changing ammunition to keep
113 //! state properties consistent with the gun's actual state.
114 virtual void updateStateProperties();
115
116public:
117 //! \brief Factory method to create a new instance of this component
118 //! \param name The name for the new component
119 //! \param owner The local object that will own this component
120 //! \param simManager The simulation services manager
121 //! \param desc Optional component descriptor
122 //! \param parentRegistry Optional parent registry for reader/writer functionality
123 //! \return Pointer to the newly created component
124 //!
125 //! Static factory method used by the component creation system to instantiate
126 //! new instances of this component type.
127 static DtSimComponent* creator(const DtString& name, DtLocalObject* owner, DtSimulationServices* simManager,
128 DtComponentDescriptor* desc = 0, DtReaderWriterRegistry* parentRegistry = 0);
129
130protected:
131 //! \brief Handles commander override message
132 //! \param msg Pointer to the message containing override parameters
133 //! \return Message processing result indicating success or failure
134 //!
135 //! Processes CommanderOverride messages, which activate or deactivate commander
136 //! override mode. When in commander override mode, direct control inputs take
137 //! precedence over AI control or other input methods.
139
140 //! \brief Gets the load time for a specific ammunition type
141 //! \param ammoType The entity type ID of the ammunition
142 //! \return The load time in seconds for the specified ammunition type
143 //!
144 //! Looks up the load time for the given ammunition type from the configured
145 //! ammunition load time list. This determines how long it takes to switch
146 //! to this ammunition type.
147 virtual double getAmmoLoadTime(const DtEntityType& ammoType);
148
149 //! \brief Controls the elevation aspect of gun aiming
150 //! \return True if elevation aiming is complete, false otherwise
151 //!
152 //! Adjusts the elevation component of the gun's aim based on input controls.
153 //! This method specifically handles the vertical movement of the gun turret.
155
156 //! \brief Creates the port groups for weapon control
157 //! \return True if port groups are successfully created, false otherwise
158 //!
159 //! Overridden to create the weapon control input port group. This method creates
160 //! the port group structure needed for handling weapon control inputs via joystick.
161 virtual bool createPortGroups() override;
162
163 //! \brief Creates the input and output ports for the actuator
164 //! \return True if ports are successfully created, false otherwise
165 //!
166 //! Overridden to create local ports for weapon control inputs (fire, next/previous
167 //! weapon) and outputs (firing state) needed for joystick control.
168 virtual bool createPorts() override;
169
170 //! \brief Aims the gun based on joystick input ports
171 //! \return True if aiming is complete, false otherwise
172 //!
173 //! Aims the gun based on joystick input ports. Uses the elevation input port
174 //! to determine the correct elevation angle and the azimuth input port
175 //! to determine the correct azimuth angle. Returns true when the gun has
176 //! reached the desired aim position.
177 virtual bool aimGun() override;
178
179 //! \brief Structure containing the results of a firing action
181 {
182 DtDetonationResult result; //!< Result of the detonation calculation
183 double rangeToTarget; //!< Range to the target in meters
184 DtSimObjectReference targetEntity; //!< Reference to the targeted entity, if any
185 };
186
187 //! \brief Calculates the result of firing the weapon
188 //! \param shooterPosition The geocentric position of the shooter
189 //! \param shooterOrienation The orientation of the shooter
190 //! \param fireResult Output parameter that will contain the fire result
191 //!
192 //! Calculates the result of firing the weapon from the given position and orientation.
193 //! This includes determining if a target was hit, the range to the target, and
194 //! the detonation result. The results are stored in the provided fireResult structure.
195 virtual void getFireResult(
196 const DtVector& shooterPosition, const DtTaitBryan shooterOrienation, DtFireResult& fireResult);
197
198 //! \brief Creates a flyout projectile from the weapon
199 //! \param shooterPosition The geocentric position of the shooter
200 //! \param shooterOrienation The orientation of the shooter
201 //! \return True if projectile was successfully created, false otherwise
202 //!
203 //! Creates a physical flyout projectile from the weapon at the specified position
204 //! and with the specified orientation. This creates a visual representation of the
205 //! projectile as it moves through the simulation.
206 virtual bool createFlyOutProjectile(const DtVector& shooterPosition, const DtTaitBryan shooterOrienation);
207
208 //! \brief Creates a detonation at the specified position
209 //! \param detonationPosition The geocentric position where detonation occurs
210 //! \param fireResult The fire result containing detonation parameters
211 //!
212 //! Creates a detonation at the given position using the fire result to determine
213 //! detonation characteristics. This handles the effects and damage processing
214 //! when a projectile reaches its target or maximum range.
215 virtual void createDetonation(const DtVector& detonationPosition, const DtFireResult& fireResult);
216
217
218 //! \brief Creates a fire event for interaction processing
219 //! \param firingPosition The geocentric position of the firing point
220 //! \param firingOrientation The orientation of the firing point
221 //! \return Pointer to the created fire event, or nullptr if creation failed
222 //!
223 //! Creates and initializes a fire event based on the specified position and orientation.
224 //! This event represents the firing of the weapon and is used in the interaction system.
225 virtual makVrfEvents::DtFireEvent* createFireInteraction(
226 const DtVector& firingPosition, const DtTaitBryan firingOrientation);
227
228 //! \brief Creates a detonation event for interaction processing
229 //! \param firingPosition The geocentric position of the firing point
230 //! \param firingOrientation The orientation of the firing point
231 //! \param fireResult The results of the firing calculation
232 //! \param detTime Output parameter that will contain the detonation time
233 //! \return Pointer to the created detonation event, or nullptr if creation failed
234 //!
235 //! Creates and initializes a detonation event based on the specified position,
236 //! orientation, and fire result. This event represents the detonation of a projectile
237 //! and is used in the interaction system. The detonation time is calculated and
238 //! returned in the detTime parameter.
239 virtual makVrfEvents::DtDetonationEvent* createDetonationInteraction(const DtVector& firingPosition,
240 const DtTaitBryan firingOrientation, const DtFireResult& fireResult, DtReal& detTime);
241
242 //! \brief Decrements the ammunition resource count
243 //!
244 //! Decrements the available ammunition count for the current munition type.
245 //! This is called after firing the weapon to reflect ammunition consumption.
246 virtual void decrementResource();
247
248 //! \brief Gets the current ammunition resource count
249 //! \return The number of available rounds for the current munition type
250 //!
251 //! Returns the number of available rounds remaining for the currently
252 //! selected munition type. Used to track ammunition availability.
253 virtual int currentResourceCount() const;
254
255protected:
256 //! \brief Default constructor (not implemented)
257 //!
258 //! Default constructor is protected and not implemented to prevent
259 //! creation of instances without proper initialization.
261
262 //! \brief Copy constructor (not implemented)
263 //!
264 //! Copy constructor is protected and not implemented to prevent
265 //! copy construction.
267
268 //! \brief Assignment operator (not implemented)
269 //! \return Reference to this object
270 //!
271 //! Assignment operator is protected and not implemented to prevent assignment.
273
274 //! \brief Sets the current munition type for the weapon
275 //! \param munition Index of the munition type to set as current
276 //!
277 //! Updates the current munition type used by the weapon, which affects
278 //! the ammunition type consumed and the firing characteristics.
279 void setCurrentMunition(int munition);
280 //! \brief Finds a specific resource by type
281 //! \param resourceType The entity type of the resource to find
282 //! \return Pointer to the resource if found, nullptr otherwise
283 //!
284 //! Searches for and returns a pointer to a resource of the specified type.
285 //! This is used to access ammunition resources for the weapon.
286 DtSimResource* findResource(DtEntityType resourceType);
287 //! \brief Finds a specific resource by type (const version)
288 //! \param resourceType The entity type of the resource to find
289 //! \return Const pointer to the resource if found, nullptr otherwise
290 //!
291 //! Const version of findResource that searches for and returns a
292 //! constant pointer to a resource of the specified type.
293 const DtSimResource* findResource(DtEntityType resourceType) const;
294
295 //! \brief Handles fire input messages from external sources
296 //! \param msg Pointer to the message containing fire input parameters
297 //! \return Message processing result indicating success or failure
298 //!
299 //! Processes FireInput messages, which provide external control over
300 //! the firing state of the weapon. This allows the weapon to be fired
301 //! through message-based commands rather than joystick inputs.
303 //! \brief Handles weapon geometry messages for positioning
304 //! \param msg Pointer to the message containing weapon geometry parameters
305 //! \return Message processing result indicating success or failure
306 //!
307 //! Processes WeaponGeometry messages, which provide information about
308 //! the position and orientation of the weapon. This is used for external
309 //! control of weapon positioning, overriding articulated part geometry.
311
312 //! \brief Initializes a resource for use with this weapon
313 //! \param resource Pointer to the resource to initialize
314 //!
315 //! Sets up a simulation resource for use with this weapon, including
316 //! configuring any necessary properties based on the weapon characteristics.
317 //! This is typically called during initialization for each available ammunition type.
318 virtual void initializeResource(const DtSimResource* resource);
319
320protected:
321 //! \brief Gets a munition object from a resource type
322 //! \param resourceType The entity type of the resource
323 //! \return Pointer to the munition object, or nullptr if not found
324 //!
325 //! Retrieves a munition object corresponding to the specified resource type.
326 //! This translates between resource types and the actual munition objects
327 //! that define the projectile characteristics.
328 virtual DtSimMunition* getMunitionFromResourceType(const DtEntityType& resourceType) const;
329 //! \brief Looks up a munition resource by entity type
330 //! \param resource The entity type of the resource to find
331 //! \return Const pointer to the resource if found, nullptr otherwise
332 //!
333 //! Looks up a munition resource by its entity type. This method searches
334 //! through available resources to find a matching munition resource.
335 virtual const DtSimResource* lookupMunitionResource(const DtEntityType& resource) const;
336
337 //! \brief Cached pointer to the ballistic gun descriptor
338 //!
339 //! Caching expected derived descriptor pointer for convenience.
340 //! Contains the configuration parameters for this gun component.
342
343 //! \brief List of ammunition load times
344 //!
345 //! Contains the load time information for different ammunition types,
346 //! used to determine how long it takes to switch between ammunitions.
348
349 //! \brief Port group for weapon control inputs
350 DtInputPortGroup* myWeaponPortGroup;
351
352 //! \brief Input port for fire command
353 DtBooleanInputPort* myFirePort;
354
355 //! \brief Input port for next weapon selection
356 DtBooleanInputPort* myNextWeaponPort;
357
358 //! \brief Input port for previous weapon selection
359 DtBooleanInputPort* myPreviousWeaponPort;
360
361 //! \brief Output port for firing state
362 DtBooleanOutputPort* myFiringPort;
363
364 // Used for each projectile that is in flight for
365 // projectiles that are being incrementally flown out from the weapon
366 // struct ProjectileInFlight
367 //{
368 // DtEntityType myMunitionType;
369
370 // bool myShouldComputeDrag; // Should drag be computed? Not computing drag can reduce computation costs.
371
372 // //
373 // // Projectile properties
374 // //
375 // double myCrossSection;
376 // double myDragCoefficient;
377 // double myProjectileMass;
378 // double myMaxRange; // This value is the squared of the max range to save having to use the sqrt operator.
379
380 // //
381 // // Projectile state
382 // //
383 // DtVector myPosition;
384 // DtVector myVelocity;
385 // double myDistanceTraveled; // This value is the squared of the distance traveled to save having to use the sqrt
386 // operator.
387 //};
388 // std::list<ProjectileInFlight> myFiredProjectiles;
389
390 //! \brief Manager for ammunition resources
391 //!
392 //! Handles tracking and management of ammunition resources for this weapon,
393 //! including finding, loading, and decrementing ammunition counts.
395
396 //! \brief Structure containing munition configuration and state
397 struct Munition
398 {
399 DtSimMunition myMunition; //!< The munition object with projectile characteristics
400 DtEntityType myResourceType; //!< The entity type of the resource for this munition
401 double myLoadtime; //!< Time required to load this munition type in seconds
402 };
403
404 //! \brief List of available munitions for this weapon
405 std::vector<Munition> myMunitions;
406
407 //! \brief Flag indicating whether the weapon is currently firing
409
410 //! \brief Index of the currently selected munition type
412
413 //! \brief Current world position for firing the weapon
415
416 //! \brief Current world orientation for firing the weapon
418 //! \brief Flag for overriding articulated part geometry
419 //!
420 //! Set to true when FireInput and WeaponGeometry messages are used for firing
421 //! the weapon, false when using joystick input. Determines how myWorldFiringPosition
422 //! and myWorldFiringOrientation values are set (either from FireInput/WeaponGeometry
423 //! messages, or from articulated parts).
425
426 //! \brief Flag for commander override mode
427 //!
428 //! When true, indicates that commander override mode is active, which gives
429 //! direct control inputs precedence over AI control or other input methods.
431
432 //! \brief Flag tracking previous engagement state
433 //!
434 //! Keeps track of engagement state so weapon can unload on disengagement.
435 //! This prevents VR-Forces from using non-optimal ammunition under CGF control,
436 //! which could occur when this component loads a munition and then CGF control
437 //! fires on a valid target that might not be the best match by level of DIS
438 //! enumeration specificity.
440
441 //! \brief Elapsed time since player disengaged from gunner role
442 //!
443 //! Accumulates time in seconds since the player disengaged from the gunner role.
444 //! Used to buffer the aimGun function to prevent CGF from immediately resetting
445 //! gun elevation to 0 when swapping roles. Reset to 0.0 when player regains control.
446 //!
447 //! \see myReturnGunToCgfControlDuration
449
450 //! \brief Duration before returning gun control to CGF
451 //!
452 //! Time in seconds to wait after player disengages before allowing CGF to
453 //! control gun aiming. This prevents unwanted elevation resets during role swaps.
454 //! The value is read from the descriptor during initialization.
455 //!
456 //! \note Default value is 2.0 seconds
457 //! \see myDisengageElapsedTime
458 //! \see DtVreBallisticGunDescriptor::returnGunToCGFControlDuration()
460};
461
462} // namespace makVre
Ammunition loading time parameter definitions for VREngage.
Extends the DtBallisticGun class with joystick control capabilities.
Class representing ballistic projectiles in simulations.
Definition projectile.h:42
Ammunition manager for VREngage weapon systems.
Definition vreAmmunitionManager.h:31
Extended ballistic gun descriptor for VREngage weapon systems.
Definition vreBallisticGunDescriptor.h:34
bool myIsFiring
Flag indicating whether the weapon is currently firing.
Definition vreGunJoyActuator.h:408
virtual const DtSimResource * lookupMunitionResource(const DtEntityType &resource) const
Looks up a munition resource by entity type.
virtual void preFirstTickInit() override
Performs initialization before the first simulation tick.
virtual makVre::DtVreMessageResult handleFireInput(makVre::DtVreMessage *msg)
Handles fire input messages from external sources.
virtual int currentResourceCount() const
Gets the current ammunition resource count.
virtual makVrfEvents::DtDetonationEvent * createDetonationInteraction(const DtVector &firingPosition, const DtTaitBryan firingOrientation, const DtFireResult &fireResult, DtReal &detTime)
Creates a detonation event for interaction processing.
bool myPreviouslyEngaged
Flag tracking previous engagement state.
Definition vreGunJoyActuator.h:439
DtVreAmmunitionManager * myAmmunitionManager
Manager for ammunition resources.
Definition vreGunJoyActuator.h:394
virtual makVre::DtVreMessageResult handleWeaponGeometry(makVre::DtVreMessage *msg)
Handles weapon geometry messages for positioning.
virtual ~DtVreGunJoyActuator() override
Virtual destructor.
int myCurrentMunition
Index of the currently selected munition type.
Definition vreGunJoyActuator.h:411
DtVreBallisticGunDescriptor * myVreBallisticGunDescriptor
Cached pointer to the ballistic gun descriptor.
Definition vreGunJoyActuator.h:341
DtVreGunJoyActuator(const DtVreGunJoyActuator &orig)
Copy constructor (not implemented)
virtual void tick() override
Updates the actuator state each simulation frame.
const DtSimResource * findResource(DtEntityType resourceType) const
Finds a specific resource by type (const version)
DtInputPortGroup * myWeaponPortGroup
Port group for weapon control inputs.
Definition vreGunJoyActuator.h:350
virtual bool init() override
Initializes the gun joystick actuator.
double myReturnGunToCgfControlDuration
Duration before returning gun control to CGF.
Definition vreGunJoyActuator.h:459
bool myCommanderOverrideActive
Flag for commander override mode.
Definition vreGunJoyActuator.h:430
static DtSimComponent * creator(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
Factory method to create a new instance of this component.
DtSimResource * findResource(DtEntityType resourceType)
Finds a specific resource by type.
const DtVreGunJoyActuator & operator=(const DtVreGunJoyActuator &orig)
Assignment operator (not implemented)
DtBooleanInputPort * myFirePort
Input port for fire command.
Definition vreGunJoyActuator.h:353
virtual bool aimGun() override
Aims the gun based on joystick input ports.
std::vector< Munition > myMunitions
List of available munitions for this weapon.
Definition vreGunJoyActuator.h:405
DtBooleanInputPort * myPreviousWeaponPort
Input port for previous weapon selection.
Definition vreGunJoyActuator.h:359
virtual DtSimMunition * getMunitionFromResourceType(const DtEntityType &resourceType) const
Gets a munition object from a resource type.
bool myOverrideArtPartGeometry
Flag for overriding articulated part geometry.
Definition vreGunJoyActuator.h:424
virtual void initializeResource(const DtSimResource *resource)
Initializes a resource for use with this weapon.
DtBooleanOutputPort * myFiringPort
Output port for firing state.
Definition vreGunJoyActuator.h:362
virtual void getFireResult(const DtVector &shooterPosition, const DtTaitBryan shooterOrienation, DtFireResult &fireResult)
Calculates the result of firing the weapon.
virtual void decrementResource()
Decrements the ammunition resource count.
virtual bool createPorts() override
Creates the input and output ports for the actuator.
DtBooleanInputPort * myNextWeaponPort
Input port for next weapon selection.
Definition vreGunJoyActuator.h:356
virtual bool createPortGroups() override
Creates the port groups for weapon control.
DtVector myWorldFiringPosition
Current world position for firing the weapon.
Definition vreGunJoyActuator.h:414
virtual DtVreMessageResult handleCommanderOverride(DtVreMessage *msg)
Handles commander override message.
virtual void updateStateProperties()
Updates the state properties for the gun actuator.
makVre::DtAmmoLoadTimeList myAmmoLoadTimeList
List of ammunition load times.
Definition vreGunJoyActuator.h:347
virtual double getAmmoLoadTime(const DtEntityType &ammoType)
Gets the load time for a specific ammunition type.
void setCurrentMunition(int munition)
Sets the current munition type for the weapon.
DtVreGunJoyActuator()
Default constructor (not implemented)
virtual const char * type() const override
Gets the type identifier for this component.
virtual bool createFlyOutProjectile(const DtVector &shooterPosition, const DtTaitBryan shooterOrienation)
Creates a flyout projectile from the weapon.
DtVreGunJoyActuator(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
Constructor.
DtTaitBryan myWorldFiringOrientation
Current world orientation for firing the weapon.
Definition vreGunJoyActuator.h:417
double myDisengageElapsedTime
Elapsed time since player disengaged from gunner role.
Definition vreGunJoyActuator.h:448
virtual void createDetonation(const DtVector &detonationPosition, const DtFireResult &fireResult)
Creates a detonation at the specified position.
virtual makVrfEvents::DtFireEvent * createFireInteraction(const DtVector &firingPosition, const DtTaitBryan firingOrientation)
Creates a fire event for interaction processing.
bool aimGunElevation()
Controls the elevation aspect of gun aiming.
Abstract base class for all VREngage messages.
Definition vreMessage.h:50
DtVreSimComponent(const DtString &name, DtLocalObject *owner, DtSimulationServices *simManager, DtComponentDescriptor *desc=0, DtReaderWriterRegistry *parentRegistry=0)
Definition vreSimComponent.h:54
Defines export macros for the vreVrfmodel library.
#define VREVRFMODEL_DLL
Definition export.h:22
Include export definitions for this library.
Definition glsVreMessageUtil.h:49
DtRwTemplatedListPtr< DtAmmoLoadTime, true > DtAmmoLoadTimeList
List of ammunition loading time parameters.
Definition ammoLoadTime.h:142
const char DtVreGunJoyActuatorType[]
Type identifier for the VRE gun joystick actuator component.
Definition vreGunJoyActuator.h:44
DtVreMessageResult
Enumeration of possible message handling results.
Definition vreMessage.h:33
Definition vrfRemoteControlConnector.h:87
Structure containing the results of a firing action.
Definition vreGunJoyActuator.h:181
double rangeToTarget
Range to the target in meters.
Definition vreGunJoyActuator.h:183
DtDetonationResult result
Result of the detonation calculation.
Definition vreGunJoyActuator.h:182
DtSimObjectReference targetEntity
Reference to the targeted entity, if any.
Definition vreGunJoyActuator.h:184
Structure containing munition configuration and state.
Definition vreGunJoyActuator.h:398
DtSimMunition myMunition
The munition object with projectile characteristics.
Definition vreGunJoyActuator.h:399
double myLoadtime
Time required to load this munition type in seconds.
Definition vreGunJoyActuator.h:401
DtEntityType myResourceType
The entity type of the resource for this munition.
Definition vreGunJoyActuator.h:400
Defines the base class for all VREngage messages.
Base template class for VR-Engage simulation components.