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

Detailed Description

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>

Inheritance diagram for makVre::DtVreAmmunitionParamsEntry:
[legend]

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)
 
DtVreAmmunitionParamsEntryoperator= (const DtVreAmmunitionParamsEntry &orig)
 
virtual DtVreAmmunitionParamsEntryclone (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
 

Member Typedef Documentation

◆ DtVreAmmunitionParamsEntryList

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).

Constructor & Destructor Documentation

◆ DtVreAmmunitionParamsEntry() [1/4]

makVre::DtVreAmmunitionParamsEntry::DtVreAmmunitionParamsEntry ( const DtString & name,
DtReaderWriterRegistry * parentRegistry = NULL )

Constructor with entry name.

Parameters
nameThe name of this ammunition entry
parentRegistryParent 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==().

◆ DtVreAmmunitionParamsEntry() [2/4]

makVre::DtVreAmmunitionParamsEntry::DtVreAmmunitionParamsEntry ( const DtSymbolString & name,
DtReaderWriterRegistry * parentRegistry = NULL )

Constructor with entry name as symbol string.

Parameters
nameThe name of this ammunition entry as a symbol string
parentRegistryParent registry for reader/writer functionality (optional)

Creates a new ammunition parameter entry with the specified name.

◆ ~DtVreAmmunitionParamsEntry()

virtual makVre::DtVreAmmunitionParamsEntry::~DtVreAmmunitionParamsEntry ( )
overridevirtual

Virtual destructor.

Cleans up resources used by the ammunition parameter entry.

◆ DtVreAmmunitionParamsEntry() [3/4]

makVre::DtVreAmmunitionParamsEntry::DtVreAmmunitionParamsEntry ( const DtString & name,
const DtVreAmmunitionParamsEntry & orig,
DtReaderWriterRegistry * parentRegistry = NULL )

Copy constructor with name.

Parameters
nameThe name for the new entry
origThe source entry to copy from
parentRegistryParent registry for reader/writer functionality (optional)

Creates a new ammunition parameter entry as a copy of the provided original.

References DtVreAmmunitionParamsEntry().

◆ DtVreAmmunitionParamsEntry() [4/4]

makVre::DtVreAmmunitionParamsEntry::DtVreAmmunitionParamsEntry ( const DtSymbolString & name,
const DtVreAmmunitionParamsEntry & orig,
DtReaderWriterRegistry * parentRegistry = NULL )

Copy constructor with name as symbol string.

Parameters
nameThe name for the new entry as a symbol string
origThe source entry to copy from
parentRegistryParent registry for reader/writer functionality (optional)

Creates a new ammunition parameter entry as a copy of the provided original.

References DtVreAmmunitionParamsEntry().

Member Function Documentation

◆ operator=()

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

Assignment operator.

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

Assigns the contents of the provided entry to this one.

References DtVreAmmunitionParamsEntry().

◆ clone()

virtual DtVreAmmunitionParamsEntry * makVre::DtVreAmmunitionParamsEntry::clone ( DtReaderWriterRegistry * parent = 0) const
overridevirtual

Creates a clone of this entry.

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

Creates a new ammunition parameter entry as a deep copy of this one.

References DtVreAmmunitionParamsEntry().

◆ operator==()

bool makVre::DtVreAmmunitionParamsEntry::operator== ( const DtVreAmmunitionParamsEntry & other) const

Equality operator.

Parameters
otherThe entry to compare with
Returns
True if the entries are equal, false otherwise

Compares this entry with another to determine if they are equal.

References DtVreAmmunitionParamsEntry().

◆ operator!=()

bool makVre::DtVreAmmunitionParamsEntry::operator!= ( const DtVreAmmunitionParamsEntry & rhs)
inline

Inequality operator.

Parameters
rhsThe entry to compare with
Returns
True if the entries are not equal, false otherwise

Compares this entry with another to determine if they are not equal.

References DtVreAmmunitionParamsEntry().

◆ crossSection()

double makVre::DtVreAmmunitionParamsEntry::crossSection ( ) const
inline

Gets the cross-section of the projectile.

Returns
The cross-section (diameter) of the projectile

Returns the cross-sectional diameter of the projectile, which affects its ballistic trajectory and impact characteristics.

References myCrossSection.

Referenced by setCrossSection().

◆ setCrossSection()

virtual void makVre::DtVreAmmunitionParamsEntry::setCrossSection ( double crossSection)
inlinevirtual

Sets the cross-section of the projectile.

Parameters
crossSectionThe 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.

◆ dragCoefficient()

double makVre::DtVreAmmunitionParamsEntry::dragCoefficient ( ) const
inline

Gets the drag coefficient of the projectile.

Returns
The drag coefficient value

Returns the drag coefficient of the projectile, which determines how much air resistance affects its flight path.

References myDragCoefficient.

Referenced by setDragCoefficient().

◆ setDragCoefficient()

virtual void makVre::DtVreAmmunitionParamsEntry::setDragCoefficient ( double dragCoefficient)
inlinevirtual

Sets the drag coefficient of the projectile.

Parameters
dragCoefficientThe drag coefficient value

Sets the drag coefficient of the projectile, which determines how much air resistance affects its flight path.

References dragCoefficient(), and myDragCoefficient.

◆ projectileMass()

double makVre::DtVreAmmunitionParamsEntry::projectileMass ( ) const
inline

Gets the mass of the projectile.

Returns
The mass of the projectile in kilograms

Returns the mass of the projectile in kilograms, which affects its ballistic trajectory, range, and impact force.

References myProjectileMass.

Referenced by setProjectileMass().

◆ setProjectileMass()

virtual void makVre::DtVreAmmunitionParamsEntry::setProjectileMass ( double projectileMass)
inlinevirtual

Sets the mass of the projectile.

Parameters
projectileMassThe 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().

◆ loadTime()

double makVre::DtVreAmmunitionParamsEntry::loadTime ( ) const
inline

Gets the loading time for this ammunition.

Returns
The loading time in seconds

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().

◆ setLoadTime()

virtual void makVre::DtVreAmmunitionParamsEntry::setLoadTime ( double loadTime)
inlinevirtual

Sets the loading time for this ammunition.

Parameters
loadTimeThe 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.

Member Data Documentation

◆ myCrossSection

DtRwReal makVre::DtVreAmmunitionParamsEntry::myCrossSection
protected

The cross-section (diameter) of the projectile.

Affects the projectile's ballistic trajectory and impact characteristics.

Referenced by crossSection(), and setCrossSection().

◆ myDragCoefficient

DtRwReal makVre::DtVreAmmunitionParamsEntry::myDragCoefficient
protected

The drag coefficient of the projectile.

Determines how much air resistance affects the projectile's flight path.

Referenced by dragCoefficient(), and setDragCoefficient().

◆ myProjectileMass

DtRwReal makVre::DtVreAmmunitionParamsEntry::myProjectileMass
protected

The mass of the projectile in kilograms.

Affects the projectile's ballistic trajectory, range, and impact force.

Referenced by projectileMass(), and setProjectileMass().

◆ myLoadTime

DtRwReal makVre::DtVreAmmunitionParamsEntry::myLoadTime
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().


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