![]() |
VR-Forces Developer's Guide
|
An implementation of DtWeaponInforInterface that allows for flexible registering of functions from other classes to meet the API.

Public Types | |
| typedef std::function < DtWeaponInfoInterface::TargetApplicability(const DtEntityType &)> | TargetApplicabilityFcn |
| typedef std::function < DtSimTask *(const DtRwLocationReference &)> | FireTaskFcn |
| typedef std::function< bool(const DtVector &)> | TargetRegionFcn |
Public Types inherited from DtWeaponInfoInterface | |
| enum | TargetApplicability { TargetApplicability_Unspecified = 0, TargetApplicability_NotApplicable = 1, TargetApplicability_Overkill = 2, TargetApplicability_Applicable = 3, TargetApplicability_Ideal = 4 } |
| enum | WeaponStatus { WeaponStatus_Busy = 1, WeaponStatus_Disabled = 2, WeaponStatus_OutOfAmmo = 4, WeaponStatus_Suppressed = 8, WeaponStatus_Stowed = 16 } |
Public Member Functions | |
| DtGenericWeaponInfo () | |
| virtual | ~DtGenericWeaponInfo () |
| virtual DtString | displayName () const override |
| virtual void | setDisplayName (const DtString &name) |
| virtual DtU32 | status () const override |
| virtual void | setStatus (DtU32 s) |
| virtual void | addStatus (WeaponStatus s) |
| virtual void | removeStatus (WeaponStatus s) |
| virtual std::list < DtSimTaskMessageType > | fireTaskTypes () const override |
| virtual void | addFireTaskType (DtSimTaskMessageType taskType) |
| virtual void | addFireTaskTypes (const DtRwNLengthStringVector &taskList) |
| virtual DtSimTask * | createFireTask (const DtRwLocationReference &location) const override |
| virtual void | setFireTaskFcn (FireTaskFcn fcn) |
| virtual bool | withinTargetRegion (const DtVector &localPosition) const override |
| virtual void | setTargetRegionFcn (TargetRegionFcn fcn) |
| virtual TargetApplicability | targetApplicability (const DtEntityType &type) const override |
| virtual void | setTargetApplicabilityFcn (TargetApplicabilityFcn fcn) |
| virtual const std::list < DtString > & | resourceList () const override |
| virtual void | setResourceList (const std::list< DtString > &list) |
| virtual const std::list < DtArtPartType > & | mountPartList () const override |
| virtual void | createMountPartList (const DtArtPartType partType) |
| virtual DtArtPartType | systemTurretNumber () const override |
| virtual void | setSystemTurretNumber (const DtArtPartType num) |
| virtual bool | controlExternalTurret () const override |
| virtual void | setControlExternalTurret (bool c) |
| virtual const std::set < DtString > & | requiredTokens () const override |
| virtual void | setRequiredTokens (const std::set< DtString > &tokens) |
| virtual bool | autonomousFire () const override |
| virtual void | setAutonomousFire (bool v) |
| virtual const std::list < DtEntityType > & | autonomousTargetTypes () const override |
| virtual void | setAutonomousTargetTypes (const std::list< DtEntityType > &targetTypes) |
| virtual const DtRwProperties * | weaponProperties () const override |
| virtual void | setWeaponProperties (const DtRwProperties *props) |
| virtual int | priority () const override |
| virtual void | setPriority (int p) |
Public Member Functions inherited from DtWeaponInfoInterface | |
| DtWeaponInfoInterface () | |
| virtual | ~DtWeaponInfoInterface ()=0 |
| virtual DtString | statusString () const |
| virtual bool | ready () const |
| virtual bool | hasStatus (WeaponStatus testStatus) const |
Protected Attributes | |
| DtString | myWeaponName |
| DtU32 | myStatus |
| std::list< DtSimTaskMessageType > | myFireTaskTypes |
| std::list< DtString > | myResourceList |
| std::list< DtArtPartType > | myMountPartList |
| DtArtPartType | myTurretNumber |
| bool | myControlExternalTurret |
| std::set< DtString > | myRequiredTokens |
| bool | myAutonomousFire |
| std::list< DtEntityType > | myAutonomousTargetTypes |
| const DtRwProperties * | myProperties |
| int | myPriority |
| TargetApplicabilityFcn | myTargetApplicabilityFcn |
| FireTaskFcn | myFireTaskFcn |
| TargetRegionFcn | myTargetRegionFcn |
Additional Inherited Members | |
Static Public Member Functions inherited from DtWeaponInfoInterface | |
| static std::string | targetApplicabilityString (TargetApplicability app) |
| typedef std::function<DtWeaponInfoInterface::TargetApplicability(const DtEntityType&)> DtGenericWeaponInfo::TargetApplicabilityFcn |
| typedef std::function<DtSimTask*(const DtRwLocationReference&)> DtGenericWeaponInfo::FireTaskFcn |
| typedef std::function<bool(const DtVector&)> DtGenericWeaponInfo::TargetRegionFcn |
| DtGenericWeaponInfo::DtGenericWeaponInfo | ( | ) |
|
virtual |
|
overridevirtual |
Implements DtWeaponInfoInterface.
|
virtual |
|
overridevirtual |
Weapon status bitfield. 0 indicates the weapon is in the "ready" state. For any non-0 value, the details of the status can be checked using the WeaponStatus bitfields on this return value.
Implements DtWeaponInfoInterface.
|
virtual |
Sets the entire status bitfield.
|
virtual |
Turns on a specific status bit in the status field.
|
virtual |
Turns off a specific status bit in the status field.
|
overridevirtual |
Task types that can be used to fire this weapon.
Reimplemented from DtWeaponInfoInterface.
|
virtual |
Adds a fire task to the list of fire task types.
|
virtual |
Convince function for adding multiple fire task types that are stored as strings in a DtRwNLengthStringVector.
|
overridevirtual |
Implements DtWeaponInfoInterface.
|
virtual |
|
overridevirtual |
Implements DtWeaponInfoInterface.
|
virtual |
|
overridevirtual |
Implements DtWeaponInfoInterface.
|
virtual |
|
overridevirtual |
List of the available munition resources. Only resources with non zero amounts are on this list.
Implements DtWeaponInfoInterface.
|
virtual |
|
overridevirtual |
A list of articulated parts to which this weapon is attached. That is, its parent part, that parent's part, etc. Used to determine when different weapons are dependent on the same part. The list contains articulated part type numbers.
Implements DtWeaponInfoInterface.
|
virtual |
|
overridevirtual |
The articulated part corresponding to the turret in this gun system (as opposed to an ancestor part).
Implements DtWeaponInfoInterface.
|
virtual |
|
overridevirtual |
Indicates that this weapon is controlling parent parts outside of the system to turn the gun. I.e., a tank MG is controlling the main turret in order to reach targets outside the normal slew range of the MG.
Implements DtWeaponInfoInterface.
|
virtual |
|
overridevirtual |
List of resources required to operate the weapon; these are tokens that are reserved when the weapon operates, but are not consumed. There is no token reservation system; other components just check to see if their tokens against this set to see if there is a conflict. These tokens may represent crew members, for example.
Implements DtWeaponInfoInterface.
|
virtual |
|
overridevirtual |
Indicates whether on not this weapon should be used by VR-Forces autonomous fire controllers.
Implements DtWeaponInfoInterface.
|
virtual |
|
overridevirtual |
Returns the entity types which this weapon would be used against for autonomous fire.
Implements DtWeaponInfoInterface.
|
virtual |
|
overridevirtual |
Implements DtWeaponInfoInterface.
|
virtual |
Set the properties pointer that will be returned to consumers of the weapon info. Note: This class does not assume ownership of this class.
|
overridevirtual |
Priority of this weapon. Used to compare to other weapons on this platform if there are conflicts.
Implements DtWeaponInfoInterface.
|
virtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |