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

Detailed Description

This class defines a descriptor for gun actuator components in VREngage. It provides configuration for ammunition, firing rates, ranges, muzzle parameters, and other properties necessary for realistic gun behavior in simulations.

#include <vreGunActuatorDescriptor.h>

Inheritance diagram for makVre::DtVreGunActuatorDescriptor:
[legend]

Public Member Functions

 DtVreGunActuatorDescriptor (const DtString &componentName, DtReaderWriterRegistry *parentRegistry=0)
 
 DtVreGunActuatorDescriptor (const DtSymbolString &componentName, DtReaderWriterRegistry *parentRegistry=NULL)
 
 DtVreGunActuatorDescriptor (const DtVreGunActuatorDescriptor &orig, DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtVreGunActuatorDescriptor () override
 
DtVreGunActuatorDescriptoroperator= (const DtVreGunActuatorDescriptor &orig)
 
virtual DtString type () const override
 
virtual DtComponentDescriptor * clone (DtReaderWriterRegistry *parentRegistry=0) const override
 
virtual int attachedPart () const
 
virtual void setAttachedPart (int part)
 
virtual DtReal muzzleSpeed () const
 
virtual void setMuzzleSpeed (DtReal muzzleSpeed)
 
virtual int roundsPerMagazine () const
 
virtual void setRoundsPerMagazine (int roundsPerMagazine)
 
virtual int roundsPerMinute () const
 
virtual void setRoundsPerMinute (const int roundsPerMinute)
 
virtual const DtVector & muzzleOffset () const
 
virtual void setMuzzleOffset (const DtVector &muzzleOffset)
 
virtual DtReal loadTime () const
 
virtual void setLoadTime (DtReal loadTime)
 
virtual DtReal unloadTime () const
 
virtual void setUnloadTime (DtReal unloadTime)
 
virtual DtReal range () const
 
virtual void setRange (DtReal range)
 
virtual const DtString & rangeName () const
 
virtual void setRangeName (const DtString &rangeName)
 
virtual int roundsPerDetonation () const
 
virtual void setRoundsPerDetonation (const int rpd)
 
virtual const DtRwStringList & munitionList () const
 
virtual void setMunitionList (DtRwStringList &munitionList)
 
virtual DtReal maxRange () const
 
virtual void setMaxRange (DtReal range)
 

Static Public Member Functions

static DtComponentDescriptor * creator ()
 

Protected Attributes

DtRwInt myAttachedPart
 
DtRwReal myMuzzleSpeed
 
DtRwInt myRoundsPerMagazine
 
DtRwReal myRoundsPerMinute
 
DtRwOffsetVector myMuzzleOffset
 
DtRwReal myLoadTime
 
DtRwReal myUnloadTime
 
DtRwReal myRange
 
DtRwString myRangeName
 
DtRwInt myRoundsPerDetonation
 
DtRwStringList myMunitionList
 
DtRwReal myMaxRange
 

Private Member Functions

 DtVreGunActuatorDescriptor ()
 

Constructor & Destructor Documentation

◆ DtVreGunActuatorDescriptor() [1/4]

makVre::DtVreGunActuatorDescriptor::DtVreGunActuatorDescriptor ( )
private

Default constructor (not implemented)

Default constructor is private and not implemented to prevent creation of instances without proper initialization.

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

◆ DtVreGunActuatorDescriptor() [2/4]

makVre::DtVreGunActuatorDescriptor::DtVreGunActuatorDescriptor ( const DtString & componentName,
DtReaderWriterRegistry * parentRegistry = 0 )

Constructor with component name.

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

Creates a new gun actuator descriptor with the specified name.

◆ DtVreGunActuatorDescriptor() [3/4]

makVre::DtVreGunActuatorDescriptor::DtVreGunActuatorDescriptor ( const DtSymbolString & componentName,
DtReaderWriterRegistry * parentRegistry = NULL )

Constructor with component name as symbol string.

Parameters
componentNameThe name of this component as a symbol string
parentRegistryParent registry for reader/writer functionality (optional)

Creates a new gun actuator descriptor with the specified name.

◆ DtVreGunActuatorDescriptor() [4/4]

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

Copy constructor.

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

Creates a new gun actuator descriptor as a copy of the provided original.

References DtVreGunActuatorDescriptor().

◆ ~DtVreGunActuatorDescriptor()

virtual makVre::DtVreGunActuatorDescriptor::~DtVreGunActuatorDescriptor ( )
overridevirtual

Virtual destructor.

Cleans up resources used by the descriptor.

Member Function Documentation

◆ operator=()

DtVreGunActuatorDescriptor & makVre::DtVreGunActuatorDescriptor::operator= ( const DtVreGunActuatorDescriptor & 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 DtVreGunActuatorDescriptor().

◆ type()

virtual DtString makVre::DtVreGunActuatorDescriptor::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 DtVreGunActuatorDescriptorType.

◆ clone()

virtual DtComponentDescriptor * makVre::DtVreGunActuatorDescriptor::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 gun actuator descriptor as a deep copy of this one.

◆ creator()

static DtComponentDescriptor * makVre::DtVreGunActuatorDescriptor::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.

◆ attachedPart()

virtual int makVre::DtVreGunActuatorDescriptor::attachedPart ( ) const
virtual

Gets the attached part index.

Returns
The index of the attached part

Returns the index of the articulated part to which this gun is attached.

◆ setAttachedPart()

virtual void makVre::DtVreGunActuatorDescriptor::setAttachedPart ( int part)
virtual

Sets the attached part index.

Parameters
partThe index of the attached part

Sets the index of the articulated part to which this gun is attached.

◆ muzzleSpeed()

virtual DtReal makVre::DtVreGunActuatorDescriptor::muzzleSpeed ( ) const
virtual

Gets the muzzle speed.

Returns
The muzzle speed in meters per second

Returns the speed of projectiles as they exit the gun's muzzle.

Referenced by setMuzzleSpeed().

◆ setMuzzleSpeed()

virtual void makVre::DtVreGunActuatorDescriptor::setMuzzleSpeed ( DtReal muzzleSpeed)
virtual

Sets the muzzle speed.

Parameters
muzzleSpeedThe muzzle speed in meters per second

Sets the speed of projectiles as they exit the gun's muzzle.

References muzzleSpeed().

◆ roundsPerMagazine()

virtual int makVre::DtVreGunActuatorDescriptor::roundsPerMagazine ( ) const
virtual

Gets the number of rounds per magazine.

Returns
The number of rounds per magazine

Returns the number of rounds that can be loaded in a single magazine.

Referenced by setRoundsPerMagazine().

◆ setRoundsPerMagazine()

virtual void makVre::DtVreGunActuatorDescriptor::setRoundsPerMagazine ( int roundsPerMagazine)
virtual

Sets the number of rounds per magazine.

Parameters
roundsPerMagazineThe number of rounds per magazine

Sets the number of rounds that can be loaded in a single magazine.

References roundsPerMagazine().

◆ roundsPerMinute()

virtual int makVre::DtVreGunActuatorDescriptor::roundsPerMinute ( ) const
virtual

Gets the firing rate.

Returns
The firing rate in rounds per minute

Returns the maximum firing rate of the gun in rounds per minute.

Referenced by setRoundsPerMinute().

◆ setRoundsPerMinute()

virtual void makVre::DtVreGunActuatorDescriptor::setRoundsPerMinute ( const int roundsPerMinute)
virtual

Sets the firing rate.

Parameters
roundsPerMinuteThe firing rate in rounds per minute

Sets the maximum firing rate of the gun in rounds per minute.

References roundsPerMinute().

◆ muzzleOffset()

virtual const DtVector & makVre::DtVreGunActuatorDescriptor::muzzleOffset ( ) const
virtual

Gets the muzzle offset.

Returns
Reference to the muzzle offset vector

Returns the offset vector from the entity's origin to the gun's muzzle.

Referenced by setMuzzleOffset().

◆ setMuzzleOffset()

virtual void makVre::DtVreGunActuatorDescriptor::setMuzzleOffset ( const DtVector & muzzleOffset)
virtual

Sets the muzzle offset.

Parameters
muzzleOffsetThe muzzle offset vector

Sets the offset vector from the entity's origin to the gun's muzzle.

References muzzleOffset().

◆ loadTime()

virtual DtReal makVre::DtVreGunActuatorDescriptor::loadTime ( ) const
virtual

Gets the loading time.

Returns
The loading time in seconds

Returns the time required to load a new magazine into the gun.

Referenced by setLoadTime().

◆ setLoadTime()

virtual void makVre::DtVreGunActuatorDescriptor::setLoadTime ( DtReal loadTime)
virtual

Sets the loading time.

Parameters
loadTimeThe loading time in seconds

Sets the time required to load a new magazine into the gun.

References loadTime().

◆ unloadTime()

virtual DtReal makVre::DtVreGunActuatorDescriptor::unloadTime ( ) const
virtual

Gets the unloading time.

Returns
The unloading time in seconds

Returns the time required to unload a magazine from the gun.

Referenced by setUnloadTime().

◆ setUnloadTime()

virtual void makVre::DtVreGunActuatorDescriptor::setUnloadTime ( DtReal unloadTime)
virtual

Sets the unloading time.

Parameters
unloadTimeThe unloading time in seconds

Sets the time required to unload a magazine from the gun.

References unloadTime().

◆ range()

virtual DtReal makVre::DtVreGunActuatorDescriptor::range ( ) const
virtual

Gets the effective range.

Returns
The effective range in meters

Returns the effective range of the gun for accurate targeting.

Referenced by setMaxRange(), and setRange().

◆ setRange()

virtual void makVre::DtVreGunActuatorDescriptor::setRange ( DtReal range)
virtual

Sets the effective range.

Parameters
rangeThe effective range in meters

Sets the effective range of the gun for accurate targeting.

References range().

◆ rangeName()

virtual const DtString & makVre::DtVreGunActuatorDescriptor::rangeName ( ) const
virtual

Gets the range name.

Returns
String identifying the range configuration

Returns a name that identifies the range configuration of this gun.

Referenced by setRangeName().

◆ setRangeName()

virtual void makVre::DtVreGunActuatorDescriptor::setRangeName ( const DtString & rangeName)
virtual

Sets the range name.

Parameters
rangeNameString identifying the range configuration

Sets a name that identifies the range configuration of this gun.

References rangeName().

◆ roundsPerDetonation()

virtual int makVre::DtVreGunActuatorDescriptor::roundsPerDetonation ( ) const
virtual

Gets the number of rounds per detonation.

Returns
The number of rounds required for detonation

Returns the number of rounds that must be fired before detonation occurs. This is typically used for special ammunition types that require multiple hits.

◆ setRoundsPerDetonation()

virtual void makVre::DtVreGunActuatorDescriptor::setRoundsPerDetonation ( const int rpd)
virtual

Sets the number of rounds per detonation.

Parameters
rpdThe number of rounds required for detonation

Sets the number of rounds that must be fired before detonation occurs. This is typically used for special ammunition types that require multiple hits.

◆ munitionList()

virtual const DtRwStringList & makVre::DtVreGunActuatorDescriptor::munitionList ( ) const
virtual

Gets the list of available munitions.

Returns
Reference to the list of munition names

Returns a list of names identifying the types of munitions this gun can use.

Referenced by setMunitionList().

◆ setMunitionList()

virtual void makVre::DtVreGunActuatorDescriptor::setMunitionList ( DtRwStringList & munitionList)
virtual

Sets the list of available munitions.

Parameters
munitionListThe list of munition names

Sets the list of names identifying the types of munitions this gun can use.

References munitionList().

◆ maxRange()

virtual DtReal makVre::DtVreGunActuatorDescriptor::maxRange ( ) const
virtual

Gets the maximum range.

Returns
The maximum range in meters

Returns the maximum possible range of the gun, beyond which projectiles cannot travel. This limits the length of the chord used in intersection tests for determining targets.

◆ setMaxRange()

virtual void makVre::DtVreGunActuatorDescriptor::setMaxRange ( DtReal range)
virtual

Sets the maximum range.

Parameters
rangeThe maximum range in meters

Sets the maximum possible range of the gun, beyond which projectiles cannot travel. This limits the length of the chord used in intersection tests for determining targets.

References range().

Member Data Documentation

◆ myAttachedPart

DtRwInt makVre::DtVreGunActuatorDescriptor::myAttachedPart
protected

Index of the articulated part to which this gun is attached.

◆ myMuzzleSpeed

DtRwReal makVre::DtVreGunActuatorDescriptor::myMuzzleSpeed
protected

Speed of projectiles as they exit the gun's muzzle in meters per second.

◆ myRoundsPerMagazine

DtRwInt makVre::DtVreGunActuatorDescriptor::myRoundsPerMagazine
protected

Number of rounds that can be loaded in a single magazine.

◆ myRoundsPerMinute

DtRwReal makVre::DtVreGunActuatorDescriptor::myRoundsPerMinute
protected

Maximum firing rate of the gun in rounds per minute.

◆ myMuzzleOffset

DtRwOffsetVector makVre::DtVreGunActuatorDescriptor::myMuzzleOffset
protected

Offset vector from the entity's origin to the gun's muzzle.

◆ myLoadTime

DtRwReal makVre::DtVreGunActuatorDescriptor::myLoadTime
protected

Time required to load a new magazine in seconds.

◆ myUnloadTime

DtRwReal makVre::DtVreGunActuatorDescriptor::myUnloadTime
protected

Time required to unload a magazine in seconds.

◆ myRange

DtRwReal makVre::DtVreGunActuatorDescriptor::myRange
protected

Effective range of the gun for accurate targeting in meters.

◆ myRangeName

DtRwString makVre::DtVreGunActuatorDescriptor::myRangeName
protected

Name identifying the range configuration of this gun.

◆ myRoundsPerDetonation

DtRwInt makVre::DtVreGunActuatorDescriptor::myRoundsPerDetonation
protected

Number of rounds that must be fired before detonation occurs.

Used for special ammunition types that require multiple hits for detonation.

◆ myMunitionList

DtRwStringList makVre::DtVreGunActuatorDescriptor::myMunitionList
protected

List of names identifying the types of munitions this gun can use.

◆ myMaxRange

DtRwReal makVre::DtVreGunActuatorDescriptor::myMaxRange
protected

Maximum possible range of the gun in meters.

The maximum range beyond which projectiles cannot travel. This limits the length of the chord used in intersection tests for determining targets. Parameter name: "max-range" Default value: 2000 meters


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