![]() |
VR-Forces Developer's Guide
|
Abstract interface class for Weapon Information. This is used by DtWeaponInterfaceList. All code that is accessing information about weapons will have access to this base class only, and only be able to read the data. Weapon controllers will have derived versions that implement key functions for their specific weapon.

Public Types | |
| enum | WeaponStatus { WeaponStatus_Busy = 1, WeaponStatus_Disabled = 2, WeaponStatus_OutOfAmmo = 4, WeaponStatus_Suppressed = 8, WeaponStatus_Stowed = 16 } |
| using | TargetApplicability = DtTargetApplicability |
Public Member Functions | |
| DtWeaponInfoInterface () | |
| virtual | ~DtWeaponInfoInterface ()=0 |
| virtual DtString | displayName () const =0 |
| virtual DtU32 | status () const =0 |
| virtual DtString | statusString () const |
| virtual bool | ready () const |
| virtual bool | hasStatus (WeaponStatus testStatus) const |
| virtual std::list < DtSimTaskMessageType > | fireTaskTypes () const |
| virtual DtSimTask * | createFireTask (const DtRwLocationReference &location, const DtU8 hitZoneFunction) const =0 |
| virtual DtSimTask * | createFireTask (const DtRwLocationReference &location, const DtU8 hitZoneFunction, const DtEntityType &) const |
| virtual bool | withinTargetRegion (const DtVector &localPosition) const =0 |
| virtual double | maximumRange () const =0 |
| virtual double | minimumRange () const =0 |
| virtual TargetApplicability | targetApplicability (const DtEntityType &type) const =0 |
| virtual const std::list < DtEntityType > & | desiredAmmunition () const =0 |
| virtual const std::list < DtArtPartType > & | mountPartList () const =0 |
| virtual DtArtPartType | systemTurretNumber () const =0 |
| virtual bool | controlExternalTurret () const =0 |
| virtual const std::set < DtString > & | requiredTokens () const =0 |
| virtual bool | autonomousFire () const =0 |
| virtual const std::list < DtEntityType > & | autonomousTargetTypes () const =0 |
| virtual const DtRwProperties * | weaponProperties () const =0 |
Static Public Member Functions | |
| static std::string | targetApplicabilityString (TargetApplicability app) |
Static Public Attributes | |
| static constexpr TargetApplicability | TargetApplicability_Unspecified = DtTargetApplicability_Unspecified |
| static constexpr TargetApplicability | TargetApplicability_NotApplicable = DtTargetApplicability_NotApplicable |
| static constexpr TargetApplicability | TargetApplicability_Overkill = DtTargetApplicability_Overkill |
| static constexpr TargetApplicability | TargetApplicability_Applicable = DtTargetApplicability_Applicable |
| static constexpr TargetApplicability | TargetApplicability_Ideal = DtTargetApplicability_Ideal |
Applicability tier of this weapon against a given target type. Kept as nested type-aliases of the standalone DtTargetApplicability enum for backward compatibility with existing call sites.
| DtWeaponInfoInterface::DtWeaponInfoInterface | ( | ) |
|
pure virtual |
|
static |
|
pure virtual |
Implemented in DtGenericWeaponInfo.
|
pure virtual |
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.
Implemented in DtGenericWeaponInfo.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Task types that can be used to fire this weapon.
Reimplemented in DtGenericWeaponInfo.
|
pure virtual |
Implemented in DtGenericWeaponInfo.
|
inlinevirtual |
Overload that accepts a caller-specified preferred munition type (typically the result of a prior bestMunitionForTarget() query). Weapon controllers whose task type carries an ammo field (e.g. ballistic gun) honour this hint; others ignore it. Default implementation forwards to the 2-arg overload so subclasses that do not care about munition selection get correct behaviour for free.
Reimplemented in DtGenericWeaponInfo.
|
pure virtual |
Implemented in DtGenericWeaponInfo.
|
pure virtual |
Implemented in DtGenericWeaponInfo.
|
pure virtual |
Implemented in DtGenericWeaponInfo.
|
pure virtual |
Implemented in DtGenericWeaponInfo.
|
pure virtual |
List of the ammunition that is desired to be used by this weapon.
Implemented in DtGenericWeaponInfo.
|
pure virtual |
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.
Implemented in DtGenericWeaponInfo.
|
pure virtual |
The articulated part corresponding to the turret in this gun system (as opposed to an ancestor part).
Implemented in DtGenericWeaponInfo.
|
pure virtual |
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.
Implemented in DtGenericWeaponInfo.
|
pure virtual |
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.
Implemented in DtGenericWeaponInfo.
|
pure virtual |
Indicates whether on not this weapon should be used by VR-Forces autonomous fire controllers.
Implemented in DtGenericWeaponInfo.
|
pure virtual |
Returns the entity types which this weapon would be used against for autonomous fire.
Implemented in DtGenericWeaponInfo.
|
pure virtual |
Implemented in DtGenericWeaponInfo.
|
static |
|
static |
|
static |
|
static |
|
static |