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

Detailed Description

The DtVreBallisticGunDescriptor extends the base ballistic gun descriptor to add ammunition-specific load times, maximum range, and additional configuration options for VREngage weapon systems. This is particularly useful for complex weapon systems like the LAV gun, where the gunner can utilize multiple different ammunition types with different ballistic properties and loading times.

#include <vreBallisticGunDescriptor.h>

Inheritance diagram for makVre::DtVreBallisticGunDescriptor:
[legend]

Public Member Functions

 DtVreBallisticGunDescriptor (const DtString &componentName, DtReaderWriterRegistry *parentRegistry=0)
 
 DtVreBallisticGunDescriptor (const DtSymbolString &componentName, DtReaderWriterRegistry *parentRegistry=0)
 
DtVreBallisticGunDescriptoroperator= (const DtVreBallisticGunDescriptor &orig)
 
 DtVreBallisticGunDescriptor (const DtVreBallisticGunDescriptor &orig, DtReaderWriterRegistry *parentRegistry=0)
 
virtual ~DtVreBallisticGunDescriptor () override
 
virtual DtString type () const override
 
virtual DtComponentDescriptor * clone (DtReaderWriterRegistry *parentRegistry=0) const override
 
virtual void setAmmoLoadTimeList (const DtAmmoLoadTimeList &ammoLoadTimeList)
 
virtual DtAmmoLoadTimeList ammoLoadTimeList () const
 
virtual DtReal maxRange () const
 
virtual void setMaxRange (DtReal maxRange)
 
virtual DtBoolean maxRangeDetonation () const
 
virtual void setMaxRangeDetonation (DtBoolean maxRangeDetonation)
 
virtual const DtEntityType & initialMunition () const
 
virtual void setInitialMunition (const DtEntityType &munition)
 
virtual DtBoolean createFlyOutProjectile () const
 
virtual void setCreateFlyOutProjectile (DtBoolean createFlyOutProjectile)
 
virtual const DtString & joystickFunctionGroup () const
 
virtual void setJoystickFunctionGroup (const DtString &group)
 
virtual const DtString & projectileType () const
 
virtual void setProjectileType (const DtString &type)
 
virtual DtReal returnGunToCGFControlDuration () const
 
virtual void setReturnGunToCGFControlDuration (DtReal duration)
 

Static Public Member Functions

static DtComponentDescriptor * creator ()
 

Protected Attributes

DtAmmoLoadTimeList myAmmoLoadTimeList
 
DtRwReal myMaxRange
 
DtRwString myJoystickFunctionGroup
 
DtRwBoolean myMaxRangeDetonation
 
DtRwEntityType myInitialMunition
 
DtRwBoolean myCreateFlyOutProjectile
 
DtRwString myProjectileType
 
DtRwReal myReturnGunToCGFControlDuration
 

Private Member Functions

 DtVreBallisticGunDescriptor ()
 

Constructor & Destructor Documentation

◆ DtVreBallisticGunDescriptor() [1/4]

makVre::DtVreBallisticGunDescriptor::DtVreBallisticGunDescriptor ( 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 ballistic gun descriptor with the specified name.

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

◆ DtVreBallisticGunDescriptor() [2/4]

makVre::DtVreBallisticGunDescriptor::DtVreBallisticGunDescriptor ( const DtSymbolString & componentName,
DtReaderWriterRegistry * parentRegistry = 0 )

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 ballistic gun descriptor with the specified name.

◆ DtVreBallisticGunDescriptor() [3/4]

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

Copy constructor.

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

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

References DtVreBallisticGunDescriptor().

◆ ~DtVreBallisticGunDescriptor()

virtual makVre::DtVreBallisticGunDescriptor::~DtVreBallisticGunDescriptor ( )
overridevirtual

Virtual destructor.

Cleans up resources used by the descriptor.

◆ DtVreBallisticGunDescriptor() [4/4]

makVre::DtVreBallisticGunDescriptor::DtVreBallisticGunDescriptor ( )
private

Default constructor (not implemented)

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

Member Function Documentation

◆ operator=()

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

◆ type()

virtual DtString makVre::DtVreBallisticGunDescriptor::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 DtVreBallisticGunDescriptorType.

Referenced by setProjectileType().

◆ clone()

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

◆ setAmmoLoadTimeList()

virtual void makVre::DtVreBallisticGunDescriptor::setAmmoLoadTimeList ( const DtAmmoLoadTimeList & ammoLoadTimeList)
virtual

Sets the ammunition load time list.

Parameters
ammoLoadTimeListThe list of ammunition load times

Sets the list of ammunition types and their associated load times. This defines the loading time for each type of ammunition this gun can use.

References ammoLoadTimeList().

◆ ammoLoadTimeList()

virtual DtAmmoLoadTimeList makVre::DtVreBallisticGunDescriptor::ammoLoadTimeList ( ) const
virtual

Gets the ammunition load time list.

Returns
The list of ammunition load times

Returns the list of ammunition types and their associated load times.

Referenced by setAmmoLoadTimeList().

◆ maxRange()

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

Gets the maximum range of the weapon.

Returns
The maximum range in meters

Returns the maximum effective range of this weapon.

Referenced by setMaxRange().

◆ setMaxRange()

virtual void makVre::DtVreBallisticGunDescriptor::setMaxRange ( DtReal maxRange)
virtual

Sets the maximum range of the weapon.

Parameters
maxRangeThe maximum range in meters

Sets the maximum effective range of this weapon.

References maxRange().

◆ maxRangeDetonation()

virtual DtBoolean makVre::DtVreBallisticGunDescriptor::maxRangeDetonation ( ) const
virtual

Checks if projectiles detonate at maximum range.

Returns
True if projectiles detonate at maximum range, false otherwise

Returns whether projectiles should detonate when they reach maximum range if there is no line-of-sight collision before that point.

Referenced by setMaxRangeDetonation().

◆ setMaxRangeDetonation()

virtual void makVre::DtVreBallisticGunDescriptor::setMaxRangeDetonation ( DtBoolean maxRangeDetonation)
virtual

Sets whether projectiles detonate at maximum range.

Parameters
maxRangeDetonationTrue to enable detonation at maximum range, false otherwise

Sets whether projectiles should detonate when they reach maximum range if there is no line-of-sight collision before that point.

References maxRangeDetonation().

◆ initialMunition()

virtual const DtEntityType & makVre::DtVreBallisticGunDescriptor::initialMunition ( ) const
virtual

Gets the initial munition type.

Returns
Reference to the initial munition entity type

Returns the entity type of the munition that should be set as the initial current munition for this weapon.

◆ setInitialMunition()

virtual void makVre::DtVreBallisticGunDescriptor::setInitialMunition ( const DtEntityType & munition)
virtual

Sets the initial munition type.

Parameters
munitionThe initial munition entity type

Sets the entity type of the munition that should be used as the initial current munition for this weapon.

◆ createFlyOutProjectile()

virtual DtBoolean makVre::DtVreBallisticGunDescriptor::createFlyOutProjectile ( ) const
virtual

Checks if flyout projectiles are created.

Returns
True if flyout projectiles are created, false otherwise

Returns whether this weapon creates visible projectile entities when fired, rather than just simulating ballistic trajectories.

Referenced by setCreateFlyOutProjectile().

◆ setCreateFlyOutProjectile()

virtual void makVre::DtVreBallisticGunDescriptor::setCreateFlyOutProjectile ( DtBoolean createFlyOutProjectile)
virtual

Sets whether flyout projectiles are created.

Parameters
createFlyOutProjectileTrue to create flyout projectiles, false otherwise

Sets whether this weapon creates visible projectile entities when fired, rather than just simulating ballistic trajectories.

References createFlyOutProjectile().

◆ joystickFunctionGroup()

virtual const DtString & makVre::DtVreBallisticGunDescriptor::joystickFunctionGroup ( ) const
virtual

Gets the joystick function group.

Returns
String identifying the joystick function group

Returns the joystick function group identifier, which is used to distinguish fire input meant for this weapon from other weapons.

◆ setJoystickFunctionGroup()

virtual void makVre::DtVreBallisticGunDescriptor::setJoystickFunctionGroup ( const DtString & group)
virtual

Sets the joystick function group.

Parameters
groupString identifying the joystick function group

Sets the joystick function group identifier, which is used to distinguish fire input meant for this weapon from other weapons.

◆ projectileType()

virtual const DtString & makVre::DtVreBallisticGunDescriptor::projectileType ( ) const
virtual

Gets the projectile type.

Returns
String identifying the projectile type

Returns the type of projectile entity to create when the weapon is fired. This is used when createFlyOutProjectile is set to true.

◆ setProjectileType()

virtual void makVre::DtVreBallisticGunDescriptor::setProjectileType ( const DtString & type)
virtual

Sets the projectile type.

Parameters
typeString identifying the projectile type

Sets the type of projectile entity to create when the weapon is fired. This is used when createFlyOutProjectile is set to true.

References type().

◆ returnGunToCGFControlDuration()

virtual DtReal makVre::DtVreBallisticGunDescriptor::returnGunToCGFControlDuration ( ) const
virtual

Gets the duration before returning gun control to CGF.

Returns
The duration in seconds

Returns the time in seconds to wait after player disengages before allowing CGF to control gun aiming. This prevents unwanted elevation resets during role swaps.

See also
setReturnGunToCGFControlDuration()
myReturnGunToCGFControlDuration

◆ setReturnGunToCGFControlDuration()

virtual void makVre::DtVreBallisticGunDescriptor::setReturnGunToCGFControlDuration ( DtReal duration)
virtual

Sets the duration before returning gun control to CGF.

Parameters
durationThe duration in seconds (must be >= 0)

Sets the time in seconds to wait after player disengages before allowing CGF to control gun aiming. This prevents unwanted elevation resets during role swaps.

See also
returnGunToCGFControlDuration()
myReturnGunToCGFControlDuration

◆ creator()

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

◆ myAmmoLoadTimeList

DtAmmoLoadTimeList makVre::DtVreBallisticGunDescriptor::myAmmoLoadTimeList
protected

List of ammunition load times.

Stores the list of ammunition types and their associated load times. This defines the loading time for each type of ammunition this gun can use.

◆ myMaxRange

DtRwReal makVre::DtVreBallisticGunDescriptor::myMaxRange
protected

Maximum range of the weapon.

The maximum effective range of this weapon in meters. Parameter name: "max-range" Default value: 2000.0 meters

◆ myJoystickFunctionGroup

DtRwString makVre::DtVreBallisticGunDescriptor::myJoystickFunctionGroup
protected

Joystick function group identifier.

String used to distinguish fire input meant for this weapon from other weapons. This allows multiple weapons to be controlled by different joystick bindings.

◆ myMaxRangeDetonation

DtRwBoolean makVre::DtVreBallisticGunDescriptor::myMaxRangeDetonation
protected

Flag for maximum range detonation.

When true, projectiles will detonate when they reach maximum range if there is no line-of-sight collision before that point. Parameter name: "max-range-detonation" Default value: False

◆ myInitialMunition

DtRwEntityType makVre::DtVreBallisticGunDescriptor::myInitialMunition
protected

Initial munition entity type.

The entity type of the munition that should be set as the initial current munition for this weapon. Parameter name: "initial-munition"

◆ myCreateFlyOutProjectile

DtRwBoolean makVre::DtVreBallisticGunDescriptor::myCreateFlyOutProjectile
protected

Flag for creating flyout projectiles.

When true, this weapon creates visible projectile entities when fired, rather than just simulating ballistic trajectories. Parameter name: "create-flyout-projectile" Default value: False

◆ myProjectileType

DtRwString makVre::DtVreBallisticGunDescriptor::myProjectileType
protected

Type of projectile to create.

The type of projectile entity to create when the weapon is fired. This is used when createFlyOutProjectile is set to true. Parameter name: "projectile-type" Default value: "DtProjectile"

◆ myReturnGunToCGFControlDuration

DtRwReal makVre::DtVreBallisticGunDescriptor::myReturnGunToCGFControlDuration
protected

Duration before returning gun control to CGF.

Time in seconds to wait after player disengages before allowing CGF to control gun aiming. This prevents unwanted elevation resets during role swaps.

Sysdef parameter: return-gun-to-cgf-control-duration

Note
Default value is 2.0 seconds
See also
returnGunToCGFControlDuration()
setReturnGunToCGFControlDuration()

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