VR-Engage  2.2
Loading...
Searching...
No Matches
makVre::DtWeaponsStatusControllerDescriptor Class Reference

Detailed Description

This class defines a descriptor for the weapons status controller component, which manages weapon selection and cycling behavior in VREngage. It extends the joystick device controller descriptor to add configuration for weapon cycling order and range ring update behavior.

#include <weaponsStatusControllerDescriptor.h>

Inheritance diagram for makVre::DtWeaponsStatusControllerDescriptor:
[legend]

Public Member Functions

 DtWeaponsStatusControllerDescriptor (const DtString &name, DtReaderWriterRegistry *parentRegistry=0)
 
 DtWeaponsStatusControllerDescriptor (const DtWeaponsStatusControllerDescriptor &orig, DtReaderWriterRegistry *parentRegistry=0)
 
DtWeaponsStatusControllerDescriptoroperator= (const DtWeaponsStatusControllerDescriptor &orig)
 
virtual DtComponentDescriptor * clone (DtReaderWriterRegistry *parentRegistry=0) const override
 
virtual ~DtWeaponsStatusControllerDescriptor () override
 
virtual DtString type () const override
 
virtual std::vector< std::string > weaponCycleOrder () const
 
virtual bool updateRangeRings () const
 

Static Public Member Functions

static DtComponentDescriptor * creator ()
 

Protected Attributes

DtRwString myWeaponCycleOrder
 
DtRwBoolean myUpdateRangeRings
 

Constructor & Destructor Documentation

◆ DtWeaponsStatusControllerDescriptor() [1/2]

makVre::DtWeaponsStatusControllerDescriptor::DtWeaponsStatusControllerDescriptor ( const DtString & name,
DtReaderWriterRegistry * parentRegistry = 0 )

Constructor with component name.

Parameters
nameThe name of this component
parentRegistryParent registry for reader/writer functionality (optional)

Creates a new weapons status controller descriptor with the specified name.

Referenced by DtWeaponsStatusControllerDescriptor(), and operator=().

◆ DtWeaponsStatusControllerDescriptor() [2/2]

makVre::DtWeaponsStatusControllerDescriptor::DtWeaponsStatusControllerDescriptor ( const DtWeaponsStatusControllerDescriptor & orig,
DtReaderWriterRegistry * parentRegistry = 0 )

Copy constructor.

Parameters
origThe source descriptor to copy from
parentRegistryParent registry for reader/writer functionality (optional)

Creates a new weapons status controller descriptor as a copy of the provided original.

References DtWeaponsStatusControllerDescriptor().

◆ ~DtWeaponsStatusControllerDescriptor()

virtual makVre::DtWeaponsStatusControllerDescriptor::~DtWeaponsStatusControllerDescriptor ( )
overridevirtual

Virtual destructor.

Cleans up resources used by the descriptor.

Member Function Documentation

◆ operator=()

DtWeaponsStatusControllerDescriptor & makVre::DtWeaponsStatusControllerDescriptor::operator= ( const DtWeaponsStatusControllerDescriptor & orig)

Assignment operator.

Parameters
origThe source descriptor to copy from
Returns
Reference to this descriptor after assignment

Assigns the contents of the provided descriptor to this one.

References DtWeaponsStatusControllerDescriptor().

◆ clone()

virtual DtComponentDescriptor * makVre::DtWeaponsStatusControllerDescriptor::clone ( DtReaderWriterRegistry * parentRegistry = 0) const
overridevirtual

Creates a clone of this descriptor.

Parameters
parentRegistryParent registry for reader/writer functionality (optional)
Returns
Pointer to a new descriptor that is a clone of this one

Creates a new weapons status controller descriptor as a deep copy of this one.

◆ type()

virtual DtString makVre::DtWeaponsStatusControllerDescriptor::type ( ) const
overridevirtual

Gets the type identifier for this descriptor.

Returns
String identifying this descriptor type

Returns a unique type identifier string for this descriptor type. Will return DtWeaponsStatusControllerDescriptorType.

◆ weaponCycleOrder()

virtual std::vector< std::string > makVre::DtWeaponsStatusControllerDescriptor::weaponCycleOrder ( ) const
virtual

Gets the weapon cycle order.

Returns
Vector of weapon category names in cycling order

Returns the ordered list of weapon categories that defines the sequence in which weapons will be cycled through when using the weapon selection controls.

◆ updateRangeRings()

virtual bool makVre::DtWeaponsStatusControllerDescriptor::updateRangeRings ( ) const
virtual

Checks if range rings should be updated.

Returns
True if range rings should be updated when weapons change, false otherwise

Returns whether the controller should modify the entity's range rings based on which weapon is currently selected.

◆ creator()

static DtComponentDescriptor * makVre::DtWeaponsStatusControllerDescriptor::creator ( )
static

Factory function to create a new instance of this descriptor.

Returns
Pointer to a newly created descriptor

Static factory function used by the descriptor creation system to instantiate new instances of this descriptor type.

Member Data Documentation

◆ myWeaponCycleOrder

DtRwString makVre::DtWeaponsStatusControllerDescriptor::myWeaponCycleOrder
protected

Weapon categories in cycling order.

Semicolon-separated string of weapon categories, defining the order in which weapons will be cycled through when using the weapon selection controls. This allows the weapon cycle order to be specifically configured.

◆ myUpdateRangeRings

DtRwBoolean makVre::DtWeaponsStatusControllerDescriptor::myUpdateRangeRings
protected

Flag for updating range rings.

When true, this controller will modify the entity's range rings based on which weapon is currently selected, providing visual feedback of the selected weapon's range.


The documentation for this class was generated from the following file: