|
VR-Engage
2.2
|
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>
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 |
| DtVreGunActuatorDescriptor & | operator= (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 () | |
|
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=().
| makVre::DtVreGunActuatorDescriptor::DtVreGunActuatorDescriptor | ( | const DtString & | componentName, |
| DtReaderWriterRegistry * | parentRegistry = 0 ) |
Constructor with component name.
| componentName | The name of this component |
| parentRegistry | Parent registry for reader/writer functionality (optional) |
Creates a new gun actuator descriptor with the specified name.
| makVre::DtVreGunActuatorDescriptor::DtVreGunActuatorDescriptor | ( | const DtSymbolString & | componentName, |
| DtReaderWriterRegistry * | parentRegistry = NULL ) |
Constructor with component name as symbol string.
| componentName | The name of this component as a symbol string |
| parentRegistry | Parent registry for reader/writer functionality (optional) |
Creates a new gun actuator descriptor with the specified name.
| makVre::DtVreGunActuatorDescriptor::DtVreGunActuatorDescriptor | ( | const DtVreGunActuatorDescriptor & | orig, |
| DtReaderWriterRegistry * | parentRegistry = 0 ) |
Copy constructor.
| orig | The source descriptor to copy from |
| parentRegistry | Parent registry for reader/writer functionality (optional) |
Creates a new gun actuator descriptor as a copy of the provided original.
References DtVreGunActuatorDescriptor().
|
overridevirtual |
Virtual destructor.
Cleans up resources used by the descriptor.
| DtVreGunActuatorDescriptor & makVre::DtVreGunActuatorDescriptor::operator= | ( | const DtVreGunActuatorDescriptor & | orig | ) |
Assignment operator.
| orig | The source descriptor to copy from |
Assigns the contents of the provided descriptor to this one.
References DtVreGunActuatorDescriptor().
|
overridevirtual |
Gets the type identifier for this descriptor.
Returns a unique type identifier string for this descriptor type. Will return DtVreGunActuatorDescriptorType.
|
overridevirtual |
Creates a clone of this descriptor.
| parentRegistry | Parent registry for reader/writer functionality (optional) |
Creates a new gun actuator descriptor as a deep copy of this one.
|
static |
Factory function to create a new instance of this descriptor.
Static factory function used by the descriptor creation system to instantiate new instances of this descriptor type.
|
virtual |
Gets the attached part index.
Returns the index of the articulated part to which this gun is attached.
|
virtual |
Sets the attached part index.
| part | The index of the attached part |
Sets the index of the articulated part to which this gun is attached.
|
virtual |
Gets the muzzle speed.
Returns the speed of projectiles as they exit the gun's muzzle.
Referenced by setMuzzleSpeed().
|
virtual |
Sets the muzzle speed.
| muzzleSpeed | The muzzle speed in meters per second |
Sets the speed of projectiles as they exit the gun's muzzle.
References muzzleSpeed().
|
virtual |
Gets the number of rounds per magazine.
Returns the number of rounds that can be loaded in a single magazine.
Referenced by setRoundsPerMagazine().
|
virtual |
Sets the number of rounds per magazine.
| roundsPerMagazine | The number of rounds per magazine |
Sets the number of rounds that can be loaded in a single magazine.
References roundsPerMagazine().
|
virtual |
Gets the firing rate.
Returns the maximum firing rate of the gun in rounds per minute.
Referenced by setRoundsPerMinute().
|
virtual |
Sets the firing rate.
| roundsPerMinute | The firing rate in rounds per minute |
Sets the maximum firing rate of the gun in rounds per minute.
References roundsPerMinute().
|
virtual |
Gets the muzzle offset.
Returns the offset vector from the entity's origin to the gun's muzzle.
Referenced by setMuzzleOffset().
|
virtual |
Sets the muzzle offset.
| muzzleOffset | The muzzle offset vector |
Sets the offset vector from the entity's origin to the gun's muzzle.
References muzzleOffset().
|
virtual |
Gets the loading time.
Returns the time required to load a new magazine into the gun.
Referenced by setLoadTime().
|
virtual |
Sets the loading time.
| loadTime | The loading time in seconds |
Sets the time required to load a new magazine into the gun.
References loadTime().
|
virtual |
Gets the unloading time.
Returns the time required to unload a magazine from the gun.
Referenced by setUnloadTime().
|
virtual |
Sets the unloading time.
| unloadTime | The unloading time in seconds |
Sets the time required to unload a magazine from the gun.
References unloadTime().
|
virtual |
Gets the effective range.
Returns the effective range of the gun for accurate targeting.
Referenced by setMaxRange(), and setRange().
|
virtual |
Sets the effective range.
| range | The effective range in meters |
Sets the effective range of the gun for accurate targeting.
References range().
|
virtual |
Gets the range name.
Returns a name that identifies the range configuration of this gun.
Referenced by setRangeName().
|
virtual |
Sets the range name.
| rangeName | String identifying the range configuration |
Sets a name that identifies the range configuration of this gun.
References rangeName().
|
virtual |
Gets the number of rounds per 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.
|
virtual |
Sets the number of rounds per detonation.
| rpd | The 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.
|
virtual |
Gets the list of available munitions.
Returns a list of names identifying the types of munitions this gun can use.
Referenced by setMunitionList().
|
virtual |
Sets the list of available munitions.
| munitionList | The list of munition names |
Sets the list of names identifying the types of munitions this gun can use.
References munitionList().
|
virtual |
Gets the maximum range.
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.
|
virtual |
Sets the maximum range.
| range | The 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().
|
protected |
Index of the articulated part to which this gun is attached.
|
protected |
Speed of projectiles as they exit the gun's muzzle in meters per second.
|
protected |
Number of rounds that can be loaded in a single magazine.
|
protected |
Maximum firing rate of the gun in rounds per minute.
|
protected |
Offset vector from the entity's origin to the gun's muzzle.
|
protected |
Time required to load a new magazine in seconds.
|
protected |
Time required to unload a magazine in seconds.
|
protected |
Effective range of the gun for accurate targeting in meters.
|
protected |
Name identifying the range configuration of this gun.
|
protected |
Number of rounds that must be fired before detonation occurs.
Used for special ammunition types that require multiple hits for detonation.
|
protected |
List of names identifying the types of munitions this gun can use.
|
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