|
VR-Engage
2.2
|
This class defines a descriptor for human gun actuator components in VREngage. It extends the base human gun actuator descriptor to add configuration for realistic human weapon handling, including maximum range, burst fire behavior, and recoil effects. These parameters affect how human entities interact with and operate weapons in VREngage simulations.
#include <vreHumanGunActuatorDescriptor.h>
Public Member Functions | |
| DtVreHumanGunActuatorDescriptor (const DtString &name, DtReaderWriterRegistry *parentRegistry=NULL) | |
| DtVreHumanGunActuatorDescriptor (const DtSymbolString &name, DtReaderWriterRegistry *parentRegistry=NULL) | |
| DtVreHumanGunActuatorDescriptor (const DtVreHumanGunActuatorDescriptor &orig, DtReaderWriterRegistry *parentRegistry=NULL) | |
| DtVreHumanGunActuatorDescriptor & | operator= (const DtVreHumanGunActuatorDescriptor &orig) |
| virtual | ~DtVreHumanGunActuatorDescriptor () override |
| virtual DtString | type () const override |
| virtual DtComponentDescriptor * | clone (DtReaderWriterRegistry *parentRegistry=NULL) const override |
| virtual DtReal | maxRange () const |
| virtual void | setMaxRange (DtReal maxRange) |
| virtual DtInt16 | burstPerTrigger () const |
| virtual void | setBurstPerTrigger (DtInt16 rounds) |
| virtual const DtVector & | recoilOffset () const |
| virtual void | setRecoilOffset (const DtVector &muzzleOffset) |
| virtual bool | isRecoilOffsetSpecified () const |
Static Public Member Functions | |
| static DtComponentDescriptor * | creator () |
Protected Member Functions | |
| DtVreHumanGunActuatorDescriptor () | |
Protected Attributes | |
| DtRwReal | myMaxRange |
| DtRwInt | myBurstPerTrigger |
| DtRwOffsetVector | myRecoilOffset |
| makVre::DtVreHumanGunActuatorDescriptor::DtVreHumanGunActuatorDescriptor | ( | const DtString & | name, |
| DtReaderWriterRegistry * | parentRegistry = NULL ) |
Constructor with component name.
| name | The name of this component |
| parentRegistry | Parent registry for reader/writer functionality (optional) |
Creates a new human gun actuator descriptor with the specified name.
Referenced by DtVreHumanGunActuatorDescriptor(), and operator=().
| makVre::DtVreHumanGunActuatorDescriptor::DtVreHumanGunActuatorDescriptor | ( | const DtSymbolString & | name, |
| DtReaderWriterRegistry * | parentRegistry = NULL ) |
Constructor with component name as symbol string.
| name | The name of this component as a symbol string |
| parentRegistry | Parent registry for reader/writer functionality (optional) |
Creates a new human gun actuator descriptor with the specified name.
| makVre::DtVreHumanGunActuatorDescriptor::DtVreHumanGunActuatorDescriptor | ( | const DtVreHumanGunActuatorDescriptor & | orig, |
| DtReaderWriterRegistry * | parentRegistry = NULL ) |
Copy constructor.
| orig | The source descriptor to copy from |
| parentRegistry | Parent registry for reader/writer functionality (optional) |
Creates a new human gun actuator descriptor as a copy of the provided original.
References DtVreHumanGunActuatorDescriptor().
|
overridevirtual |
Virtual destructor.
Cleans up resources used by the descriptor.
|
protected |
Default constructor (not implemented)
Default constructor is protected and not implemented to prevent creation of instances without proper initialization.
| DtVreHumanGunActuatorDescriptor & makVre::DtVreHumanGunActuatorDescriptor::operator= | ( | const DtVreHumanGunActuatorDescriptor & | orig | ) |
Assignment operator.
| orig | The source descriptor to copy from |
Assigns the contents of the provided descriptor to this one.
References DtVreHumanGunActuatorDescriptor().
|
overridevirtual |
Gets the type identifier for this descriptor.
Returns a unique type identifier string for this descriptor type. Will return DtVreHumanGunActuatorDescriptorType.
|
overridevirtual |
Creates a clone of this descriptor.
| parentRegistry | Parent registry for reader/writer functionality (optional) |
Creates a new human gun actuator descriptor as a deep copy of this one.
|
virtual |
Gets the maximum range of the weapon.
Returns the maximum possible range of the weapon, beyond which projectiles cannot travel. This limits the length of the chord used in intersection tests for determining targets.
Referenced by setMaxRange().
|
virtual |
Sets the maximum range of the weapon.
| maxRange | The maximum range in meters |
Sets the maximum possible range of the weapon, beyond which projectiles cannot travel. This limits the length of the chord used in intersection tests for determining targets.
References maxRange().
|
virtual |
Gets the number of rounds per trigger pull.
Returns the number of bullets fired per trigger pull for burst fire mode.
|
virtual |
Sets the number of rounds per trigger pull.
| rounds | The number of bullets fired per trigger pull |
Sets the number of bullets fired per trigger pull for burst fire mode.
|
virtual |
Gets the recoil offset vector.
Returns the offset vector that controls weapon orientation changes during rapid fire (burst) mode, simulating recoil effects.
|
virtual |
Sets the recoil offset vector.
| muzzleOffset | The recoil offset vector |
Sets the offset vector that controls weapon orientation changes during rapid fire (burst) mode, simulating recoil effects.
|
virtual |
Checks if recoil offset is specified.
Returns whether a custom recoil offset has been specified for this weapon.
|
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 |
Maximum range of the weapon in meters.
The maximum possible range of the weapon, 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: 500.0 meters
|
protected |
Number of bullets fired per trigger pull.
Defines the number of bullets fired in sequence when the trigger is pulled once. Used for burst fire mode configuration. Parameter name: "rounds-per-trigger" Default value: 1 (single shot) Units: Bullets
|
protected |
Recoil offset vector for weapon orientation during rapid fire.
This vector defines how the weapon orientation changes during rapid fire (burst) mode, simulating recoil effects. In a body coordinate system, the axes are specified as follows:
Parameter name: "recoil-offset" Default value: 0.0 Units: Degrees