VR-Engage  2.2
Loading...
Searching...
No Matches
weaponsStatusControllerDescriptor.h
Go to the documentation of this file.
1/*******************************************************************************
2** Copyright (c) 2025 MAK Technologies
3** All rights reserved.
4*******************************************************************************/
5
6//! \file weaponsStatusControllerDescriptor.h
7//! \ingroup vreVrfobjparam
8//! \brief Weapons status controller descriptor for VREngage
9//!
10//! This file defines the DtWeaponsStatusControllerDescriptor class, which configures
11//! weapon management and cycling behavior in VREngage simulations. It provides parameters
12//! for defining weapon cycling order and range ring update behavior.
13
14#pragma once
15
17
18#include <vrfobjparam/joyDeviceControllerDescriptor.h>
19
20namespace makVre
21{
22//! \brief Type identifier string for the weapons status controller descriptor
23const char DtWeaponsStatusControllerDescriptorType[] = "weapons-status-controller-descriptor";
24
25//! \brief Weapons status controller descriptor for VREngage
26//!
27//! This class defines a descriptor for the weapons status controller component,
28//! which manages weapon selection and cycling behavior in VREngage. It extends
29//! the joystick device controller descriptor to add configuration for weapon cycling
30//! order and range ring update behavior.
31class VREVRFOBJPARAM_DLL DtWeaponsStatusControllerDescriptor : public DtJoyDeviceControllerDescriptor
32{
33public:
34 //! \brief Constructor with component name
35 //! \param name The name of this component
36 //! \param parentRegistry Parent registry for reader/writer functionality (optional)
37 //!
38 //! Creates a new weapons status controller descriptor with the specified name.
39 DtWeaponsStatusControllerDescriptor(const DtString& name, DtReaderWriterRegistry* parentRegistry = 0);
40
41 //! \brief Copy constructor
42 //! \param orig The source descriptor to copy from
43 //! \param parentRegistry Parent registry for reader/writer functionality (optional)
44 //!
45 //! Creates a new weapons status controller descriptor as a copy of the provided original.
47 const DtWeaponsStatusControllerDescriptor& orig, DtReaderWriterRegistry* parentRegistry = 0);
48
49 //! \brief Assignment operator
50 //! \param orig The source descriptor to copy from
51 //! \return Reference to this descriptor after assignment
52 //!
53 //! Assigns the contents of the provided descriptor to this one.
55
56 //! \brief Creates a clone of this descriptor
57 //! \param parentRegistry Parent registry for reader/writer functionality (optional)
58 //! \return Pointer to a new descriptor that is a clone of this one
59 //!
60 //! Creates a new weapons status controller descriptor as a deep copy of this one.
61 virtual DtComponentDescriptor* clone(DtReaderWriterRegistry* parentRegistry = 0) const override;
62
63 //! \brief Virtual destructor
64 //!
65 //! Cleans up resources used by the descriptor.
67
68 //! \brief Gets the type identifier for this descriptor
69 //! \return String identifying this descriptor type
70 //!
71 //! Returns a unique type identifier string for this descriptor type.
72 //! Will return DtWeaponsStatusControllerDescriptorType.
73 virtual DtString type() const override;
74
75 //! \brief Gets the weapon cycle order
76 //! \return Vector of weapon category names in cycling order
77 //!
78 //! Returns the ordered list of weapon categories that defines the sequence
79 //! in which weapons will be cycled through when using the weapon selection controls.
80 virtual std::vector<std::string> weaponCycleOrder() const;
81
82 //! \brief Checks if range rings should be updated
83 //! \return True if range rings should be updated when weapons change, false otherwise
84 //!
85 //! Returns whether the controller should modify the entity's range rings
86 //! based on which weapon is currently selected.
87 virtual bool updateRangeRings() const;
88
89 //! \brief Factory function to create a new instance of this descriptor
90 //! \return Pointer to a newly created descriptor
91 //!
92 //! Static factory function used by the descriptor creation system to instantiate
93 //! new instances of this descriptor type.
94 static DtComponentDescriptor* creator();
95
96protected:
97 //! \brief Weapon categories in cycling order
98 //!
99 //! Semicolon-separated string of weapon categories, defining the order in which
100 //! weapons will be cycled through when using the weapon selection controls.
101 //! This allows the weapon cycle order to be specifically configured.
103
104 //! \brief Flag for updating range rings
105 //!
106 //! When true, this controller will modify the entity's range rings based on which
107 //! weapon is currently selected, providing visual feedback of the selected weapon's range.
109};
110} // namespace makVre
virtual std::vector< std::string > weaponCycleOrder() const
Gets the weapon cycle order.
DtWeaponsStatusControllerDescriptor(const DtString &name, DtReaderWriterRegistry *parentRegistry=0)
Constructor with component name.
DtWeaponsStatusControllerDescriptor & operator=(const DtWeaponsStatusControllerDescriptor &orig)
Assignment operator.
DtWeaponsStatusControllerDescriptor(const DtWeaponsStatusControllerDescriptor &orig, DtReaderWriterRegistry *parentRegistry=0)
Copy constructor.
DtRwBoolean myUpdateRangeRings
Flag for updating range rings.
Definition weaponsStatusControllerDescriptor.h:108
virtual bool updateRangeRings() const
Checks if range rings should be updated.
DtRwString myWeaponCycleOrder
Weapon categories in cycling order.
Definition weaponsStatusControllerDescriptor.h:102
virtual DtComponentDescriptor * clone(DtReaderWriterRegistry *parentRegistry=0) const override
Creates a clone of this descriptor.
static DtComponentDescriptor * creator()
Factory function to create a new instance of this descriptor.
virtual ~DtWeaponsStatusControllerDescriptor() override
Virtual destructor.
virtual DtString type() const override
Gets the type identifier for 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 DtWeaponsStatusControllerDescriptorType[]
Type identifier string for the weapons status controller descriptor.
Definition weaponsStatusControllerDescriptor.h:23