|
VR-Engage
2.2
|
The DtVreAmmunitionParamsEntry contains fields loaded from ammunitionParams.mtl via DtVreAmmunitionManager. It stores physical and ballistic properties of ammunition, including cross-section, drag coefficient, mass, and load time.
#include <vreAmmunitionParamsEntry.h>
Public Types | |
| using | DtVreAmmunitionParamsEntryList = DtRwTemplatedListPtr<DtVreAmmunitionParamsEntry*, true> |
Public Member Functions | |
| DtVreAmmunitionParamsEntry (const DtString &name, DtReaderWriterRegistry *parentRegistry=NULL) | |
| DtVreAmmunitionParamsEntry (const DtSymbolString &name, DtReaderWriterRegistry *parentRegistry=NULL) | |
| virtual | ~DtVreAmmunitionParamsEntry () override |
| DtVreAmmunitionParamsEntry (const DtString &name, const DtVreAmmunitionParamsEntry &orig, DtReaderWriterRegistry *parentRegistry=NULL) | |
| DtVreAmmunitionParamsEntry (const DtSymbolString &name, const DtVreAmmunitionParamsEntry &orig, DtReaderWriterRegistry *parentRegistry=NULL) | |
| DtVreAmmunitionParamsEntry & | operator= (const DtVreAmmunitionParamsEntry &orig) |
| virtual DtVreAmmunitionParamsEntry * | clone (DtReaderWriterRegistry *parent=0) const override |
| bool | operator== (const DtVreAmmunitionParamsEntry &other) const |
| bool | operator!= (const DtVreAmmunitionParamsEntry &rhs) |
Ammunition Properties | |
| double | crossSection () const |
| virtual void | setCrossSection (double crossSection) |
| double | dragCoefficient () const |
| virtual void | setDragCoefficient (double dragCoefficient) |
| double | projectileMass () const |
| virtual void | setProjectileMass (double projectileMass) |
| double | loadTime () const |
| virtual void | setLoadTime (double loadTime) |
Protected Attributes | |
| DtRwReal | myCrossSection |
| DtRwReal | myDragCoefficient |
| DtRwReal | myProjectileMass |
| DtRwReal | myLoadTime |
| using makVre::DtVreAmmunitionParamsEntry::DtVreAmmunitionParamsEntryList = DtRwTemplatedListPtr<DtVreAmmunitionParamsEntry*, true> |
Templated list type for ammunition parameter entries.
This type defines a reader/writer templated list of ammunition parameter entries with automatic memory management (pointer ownership).
| makVre::DtVreAmmunitionParamsEntry::DtVreAmmunitionParamsEntry | ( | const DtString & | name, |
| DtReaderWriterRegistry * | parentRegistry = NULL ) |
Constructor with entry name.
| name | The name of this ammunition entry |
| parentRegistry | Parent registry for reader/writer functionality (optional) |
Creates a new ammunition parameter entry with the specified name.
Referenced by clone(), DtVreAmmunitionParamsEntry(), DtVreAmmunitionParamsEntry(), operator!=(), operator=(), and operator==().
| makVre::DtVreAmmunitionParamsEntry::DtVreAmmunitionParamsEntry | ( | const DtSymbolString & | name, |
| DtReaderWriterRegistry * | parentRegistry = NULL ) |
Constructor with entry name as symbol string.
| name | The name of this ammunition entry as a symbol string |
| parentRegistry | Parent registry for reader/writer functionality (optional) |
Creates a new ammunition parameter entry with the specified name.
|
overridevirtual |
Virtual destructor.
Cleans up resources used by the ammunition parameter entry.
| makVre::DtVreAmmunitionParamsEntry::DtVreAmmunitionParamsEntry | ( | const DtString & | name, |
| const DtVreAmmunitionParamsEntry & | orig, | ||
| DtReaderWriterRegistry * | parentRegistry = NULL ) |
Copy constructor with name.
| name | The name for the new entry |
| orig | The source entry to copy from |
| parentRegistry | Parent registry for reader/writer functionality (optional) |
Creates a new ammunition parameter entry as a copy of the provided original.
References DtVreAmmunitionParamsEntry().
| makVre::DtVreAmmunitionParamsEntry::DtVreAmmunitionParamsEntry | ( | const DtSymbolString & | name, |
| const DtVreAmmunitionParamsEntry & | orig, | ||
| DtReaderWriterRegistry * | parentRegistry = NULL ) |
Copy constructor with name as symbol string.
| name | The name for the new entry as a symbol string |
| orig | The source entry to copy from |
| parentRegistry | Parent registry for reader/writer functionality (optional) |
Creates a new ammunition parameter entry as a copy of the provided original.
References DtVreAmmunitionParamsEntry().
| DtVreAmmunitionParamsEntry & makVre::DtVreAmmunitionParamsEntry::operator= | ( | const DtVreAmmunitionParamsEntry & | orig | ) |
Assignment operator.
| orig | The source entry to copy from |
Assigns the contents of the provided entry to this one.
References DtVreAmmunitionParamsEntry().
|
overridevirtual |
Creates a clone of this entry.
| parent | Parent registry for reader/writer functionality (optional) |
Creates a new ammunition parameter entry as a deep copy of this one.
References DtVreAmmunitionParamsEntry().
| bool makVre::DtVreAmmunitionParamsEntry::operator== | ( | const DtVreAmmunitionParamsEntry & | other | ) | const |
Equality operator.
| other | The entry to compare with |
Compares this entry with another to determine if they are equal.
References DtVreAmmunitionParamsEntry().
|
inline |
Inequality operator.
| rhs | The entry to compare with |
Compares this entry with another to determine if they are not equal.
References DtVreAmmunitionParamsEntry().
|
inline |
Gets the cross-section of the projectile.
Returns the cross-sectional diameter of the projectile, which affects its ballistic trajectory and impact characteristics.
References myCrossSection.
Referenced by setCrossSection().
|
inlinevirtual |
Sets the cross-section of the projectile.
| crossSection | The cross-section (diameter) of the projectile |
Sets the cross-sectional diameter of the projectile, which affects its ballistic trajectory and impact characteristics.
References crossSection(), and myCrossSection.
|
inline |
Gets the drag coefficient of the projectile.
Returns the drag coefficient of the projectile, which determines how much air resistance affects its flight path.
References myDragCoefficient.
Referenced by setDragCoefficient().
|
inlinevirtual |
Sets the drag coefficient of the projectile.
| dragCoefficient | The drag coefficient value |
Sets the drag coefficient of the projectile, which determines how much air resistance affects its flight path.
References dragCoefficient(), and myDragCoefficient.
|
inline |
Gets the mass of the projectile.
Returns the mass of the projectile in kilograms, which affects its ballistic trajectory, range, and impact force.
References myProjectileMass.
Referenced by setProjectileMass().
|
inlinevirtual |
Sets the mass of the projectile.
| projectileMass | The mass of the projectile in kilograms |
Sets the mass of the projectile in kilograms, which affects its ballistic trajectory, range, and impact force.
References myProjectileMass, and projectileMass().
|
inline |
Gets the loading time for this ammunition.
Returns the time required to load this ammunition type into a weapon, which affects weapon rate of fire and tactical considerations.
References myLoadTime.
Referenced by setLoadTime().
|
inlinevirtual |
Sets the loading time for this ammunition.
| loadTime | The loading time in seconds |
Sets the time required to load this ammunition type into a weapon, which affects weapon rate of fire and tactical considerations.
References loadTime(), and myLoadTime.
|
protected |
The cross-section (diameter) of the projectile.
Affects the projectile's ballistic trajectory and impact characteristics.
Referenced by crossSection(), and setCrossSection().
|
protected |
The drag coefficient of the projectile.
Determines how much air resistance affects the projectile's flight path.
Referenced by dragCoefficient(), and setDragCoefficient().
|
protected |
The mass of the projectile in kilograms.
Affects the projectile's ballistic trajectory, range, and impact force.
Referenced by projectileMass(), and setProjectileMass().
|
protected |
The time required to load this ammunition in seconds.
Determines how quickly this ammunition type can be loaded into a weapon.
Referenced by loadTime(), and setLoadTime().