|
VR-Engage
2.2
|
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>
Public Member Functions | |
| DtVreBallisticGunDescriptor (const DtString &componentName, DtReaderWriterRegistry *parentRegistry=0) | |
| DtVreBallisticGunDescriptor (const DtSymbolString &componentName, DtReaderWriterRegistry *parentRegistry=0) | |
| DtVreBallisticGunDescriptor & | operator= (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 () | |
| makVre::DtVreBallisticGunDescriptor::DtVreBallisticGunDescriptor | ( | 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 ballistic gun descriptor with the specified name.
Referenced by DtVreBallisticGunDescriptor(), and operator=().
| makVre::DtVreBallisticGunDescriptor::DtVreBallisticGunDescriptor | ( | const DtSymbolString & | componentName, |
| DtReaderWriterRegistry * | parentRegistry = 0 ) |
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 ballistic gun descriptor with the specified name.
| makVre::DtVreBallisticGunDescriptor::DtVreBallisticGunDescriptor | ( | const DtVreBallisticGunDescriptor & | orig, |
| DtReaderWriterRegistry * | parentRegistry = 0 ) |
Copy constructor.
| orig | The source descriptor to copy from |
| parentRegistry | Parent registry for reader/writer functionality (optional) |
Creates a new ballistic gun descriptor as a copy of the provided original.
References DtVreBallisticGunDescriptor().
|
overridevirtual |
Virtual destructor.
Cleans up resources used by the descriptor.
|
private |
Default constructor (not implemented)
Default constructor is private and not implemented to prevent creation of instances without proper initialization.
| DtVreBallisticGunDescriptor & makVre::DtVreBallisticGunDescriptor::operator= | ( | const DtVreBallisticGunDescriptor & | orig | ) |
Assignment operator.
| orig | The source descriptor to copy from |
Assigns the contents of the provided descriptor to this one.
References DtVreBallisticGunDescriptor().
|
overridevirtual |
Gets the type identifier for this descriptor.
Returns a unique type identifier string for this descriptor type. Will return DtVreBallisticGunDescriptorType.
Referenced by setProjectileType().
|
overridevirtual |
Creates a clone of this descriptor.
| parentRegistry | Parent registry for reader/writer functionality (optional) |
Creates a new ballistic gun descriptor as a deep copy of this one.
|
virtual |
Sets the ammunition load time list.
| ammoLoadTimeList | The 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().
|
virtual |
Gets the ammunition load time list.
Returns the list of ammunition types and their associated load times.
Referenced by setAmmoLoadTimeList().
|
virtual |
Gets the maximum range of the weapon.
Returns the maximum effective range of this weapon.
Referenced by setMaxRange().
|
virtual |
Sets the maximum range of the weapon.
| maxRange | The maximum range in meters |
Sets the maximum effective range of this weapon.
References maxRange().
|
virtual |
Checks if projectiles detonate at maximum range.
Returns whether projectiles should detonate when they reach maximum range if there is no line-of-sight collision before that point.
Referenced by setMaxRangeDetonation().
|
virtual |
Sets whether projectiles detonate at maximum range.
| maxRangeDetonation | True 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().
|
virtual |
Gets the initial munition type.
Returns the entity type of the munition that should be set as the initial current munition for this weapon.
|
virtual |
Sets the initial munition type.
| munition | The initial munition entity type |
Sets the entity type of the munition that should be used as the initial current munition for this weapon.
|
virtual |
Checks if flyout projectiles are created.
Returns whether this weapon creates visible projectile entities when fired, rather than just simulating ballistic trajectories.
Referenced by setCreateFlyOutProjectile().
|
virtual |
Sets whether flyout projectiles are created.
| createFlyOutProjectile | True to create flyout projectiles, false otherwise |
Sets whether this weapon creates visible projectile entities when fired, rather than just simulating ballistic trajectories.
References createFlyOutProjectile().
|
virtual |
Gets the joystick function group.
Returns the joystick function group identifier, which is used to distinguish fire input meant for this weapon from other weapons.
|
virtual |
Sets the joystick function group.
| group | String 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.
|
virtual |
Gets 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.
|
virtual |
Sets the projectile type.
| type | String 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().
|
virtual |
Gets the duration before returning gun control to CGF.
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.
|
virtual |
Sets the duration before returning gun control to CGF.
| duration | The 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.
|
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.
|
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.
|
protected |
Maximum range of the weapon.
The maximum effective range of this weapon in meters. Parameter name: "max-range" Default value: 2000.0 meters
|
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.
|
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
|
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"
|
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
|
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"
|
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