|
WSF
|
#include <WsfWeaponEffects.hpp>


Public Types | |
| enum | Result { cINVALID , cMISSED , cDAMAGED , cKILLED } |
| Public Types inherited from WsfObject | |
| typedef std::vector< WsfStringId > | TypeList |
| The list of types returned by GetTypeList. | |
Public Member Functions | |
| WsfWeaponEffects (WsfScenario &aScenario) | |
| ~WsfWeaponEffects () override | |
| WsfWeaponEffects * | Clone () const override=0 |
| virtual bool | PreInitialize () |
| bool | ProcessInput (UtInput &aInput) override |
| virtual bool | Initialize (double aSimTime, const WsfWeaponEngagement *aEngagementPtr) |
| UtScriptContext * | GetScriptAccessibleContext () const override |
| Result | GetTargetResult () const |
| Result | GetIncidentalResult () const |
| Result | GetTotalResult () const |
| bool | UseLaunchPk () const |
| bool | UseInterceptPk () const |
| double | GetPkDegrade () const |
| Return the current Pk degrade factor. | |
| double | GetPkConstraint () const |
| void | SetInvincibleIndex (unsigned int aPlatformID) |
| Set the ID of a platform which shall not be damaged. (Usually the launching entity.). | |
| unsigned int | GetInvincibleIndex () const |
| Get the ID of a platform which will not be damaged. | |
| void | SetDamageRadius (double aDamageRadius) |
| Set the maximum lethal damage radius for this effect. | |
| double | GetDamageRadius () const |
| Return the maximum lethal damage radius for this effect. | |
| double | GetLaunchPk () const |
| Get the Launch Pk. | |
| double | GetInterceptPk () const |
| Get the Intercept Pk. | |
| bool | DrawEndgamePk () |
| Force a pk draw for an external platform target. | |
| virtual double | GetCEP () const |
| Access the value for engagement Circular Error Probable (CEP). | |
| void | SetCEP (double aValue) |
| void | SetPkDegrade (double aPkDegrade) |
| virtual double | GetPkDrawn () const |
| Access the Pk value drawn for the (intended) target hit assessment. | |
| bool | DebugEnabled () const |
| Returns 'true' if debugging is enabled for this instance. | |
| void | SetDebugEnabled (bool aDebugEnabled) |
| Enable or disable debugging for this instance. | |
| unsigned int | KilledPlatformCount () const |
| Method returns the count of platforms killed during this engagement. | |
| bool | IsKilledPlatform (size_t aPlatformIndex) const |
| Returns 'true' if the specified WSF platform index has been killed during this engagement. | |
| WsfPk::Table * | GetPkTable () |
| WsfScenario & | GetScenario () |
| Public Member Functions inherited from WsfObject | |
| WsfObject () | |
| This is the constructor for the WsfObject class. | |
| ~WsfObject () override | |
| This is the destructor for the WsfObject class. | |
| const char * | GetScriptClassName () const override |
| const std::string & | GetType () const |
| WsfStringId | GetTypeId () const |
| Get the string ID of the 'type' of the object. | |
| void | SetType (WsfStringId aType) |
| const std::string & | GetBaseType () const |
| WsfStringId | GetBaseTypeId () const |
| const TypeList & | GetTypeList () const |
| bool | IsA_TypeOf (WsfStringId aType) const |
| WsfObject & | operator= (const WsfObject &aRhs) |
| Assignment operator. | |
| template<typename T> | |
| void | Serialize (T &aBuff) |
| For XIO (de)serialization. | |
| const std::string & | GetName () const |
| WsfStringId | GetNameId () const |
| void | SetName (WsfStringId aName) |
Static Public Member Functions | |
| static WsfStringId | GetWeaponEffectsType (WsfPlatform &aPlatform) |
| Return the weapon effects type for the associated platform. | |
| static std::string | GetResultString (WsfWeaponEffects::Result aResult) |
Static Public Attributes | |
| static const char * | cTYPE_KIND = "weapon_effect" |
| static const double | cUNHARMED = 0.0 |
| Value indicating no damage to a player, the weapon had no effect. | |
| static const double | cMORTALLY_WOUNDED = 1.0 |
Protected Member Functions | |
| WsfWeaponEffects (const WsfWeaponEffects &aSrc) | |
| Copy Constructor for Clone(). | |
| WsfWeaponEffects & | operator= (const WsfWeaponEffects &aRhs) |
| virtual void | ApplyEffectIncrement (double aSimTime, WsfPlatform *aOtherPlatformPtr, double aDamageAmount) |
| virtual void | ApplyEffectTo (double aSimTime, WsfPlatform *aOtherPlatformPtr) |
| virtual void | ApplyDamageResultToOtherPlatform (double aSimTime, WsfPlatform *aOtherPlatformPtr, double aDamage, Result aResult) |
| virtual void | CalcLaunchPk (double aSimTime) |
| virtual void | CalcPkDegradation (double aSimTime, WsfPlatform *aTargetPtr) |
| virtual void | CalcInterceptPk (double aSimTime, WsfPlatform *aTargetPtr) |
| virtual void | CalcPkParameters (WsfPlatform *aTargetPtr, double &aAzimuth, double &aElevation, double &aMissileSpeed, double &aTargetSpeed) |
| bool | IsIntendedTargetValid () |
| This protected method assures that a specified target index does exist. | |
| void | AddToKilledPlatforms (unsigned int aKilledIndex) |
| double | DrawUniformPk () |
| Draw a uniform value for Pk determination. | |
| virtual bool | IsVulnerable (WsfPlatform *aOtherPlatformPtr) |
| void | ProcessEffectCommon (double aSimTime, WsfPlatform *aRefPlatformPtr) |
| bool | Defeated () const |
| Return a flag to indicate that this effect has been annulled by outside influences. | |
| const WsfWeaponEngagement * | GetEngagement () const |
| Return the Engagement that this effect was instantiated to support. | |
| void | SetUseLaunchPk () |
| Indicate that you wish to use the Launch Pk value (in lieu of the Intercept Pk value). | |
| void | SetUseInterceptPk () |
| Indicate that you wish to use the Intercept Pk value (in lieu of the Launch Pk value). | |
| void | SetLaunchPk (double aValue) |
| void | SetInterceptPk (double aValue) |
| void | SetPkDrawn (double aValue) |
| Set the Pk value used in the intended target hit assessment. | |
| void | SetIncidentalResult (const WsfWeaponEffects::Result &aResult) |
| void | SetTargetResult (const WsfWeaponEffects::Result &aResult) |
| void | SetResult (const WsfWeaponEffects::Result &aResult, bool aIsIntended) |
| size_t | KilledPlatform (size_t aIndex) |
| Method returns an index of one of the platforms killed during this engagement. | |
| const WsfWeaponEngagement * | GetEngagementPtr () const |
| WsfSimulation * | GetSimulation () const |
| WsfScriptContext * | GetScriptContext () const |
| WsfObject (const WsfObject &aSrc) | |
| Copy constructor (for Clone()). | |
The primary function of this object.. | |
| virtual void | ProcessEffectExplicit (double aSimTime) |
| virtual void | ProcessEffectImplicit (double aSimTime) |
| virtual void | Terminate (double aSimTime) |
| void | Defeat () |
| bool | GetIncidentalDamageAllowed () const |
| void | SetIncidentalDamageAllowed (bool aIncidentalDamageAllowed) |
| bool | GetParentDamageAllowed () const |
| void | SetParentDamageAllowed (bool aParentDamageAllowed) |
A base class for all types of weapon effect determinations. Produces some effect on other platforms during a weapon engagement. Note that there are two key methods of the class: ProcessEffectExplicit() and ProcessEffectImplicit(), for explicit and implicit weapons, respectively. The base class is abstract, specialized to use a fixed Pk draw against the target, and will need overridden. Allowance is made for derived classes to (optionally) do a Launch Probability of Kill (Pk) (CalcLaunchPk()) estimation at the time of weapon launch, an Intercept Pk (CalcInterceptPk()) at time of intercept, and to set/use a Circular Error Probable (CEP) value. A virtual Pk "degrade" option, CalcPkDegradation() is also available, for events during flyout that may reduce the possibility of a successful intercept, as well as Defeat(), an externally available trigger to force no terminal target effect. The two Pk values may be input constants, or dependent variables of the engagement conditions and geometry.
Resulting effect on a platform. Note that this enumeration applies separately to both the intended target for the engagement, as well as incidentally damaged players (if permitted).
| WsfWeaponEffects::WsfWeaponEffects | ( | WsfScenario & | aScenario | ) |
References cINVALID, GetScriptContext(), mDebugEnabled, mDefeated, mDrawEndgamePk, mFlags, mIncidentalDamageAllowed, mRemoveWeaponPlatform, mUseLaunchPk, and WsfObject::WsfObject().
Referenced by WsfCarltonLethality::Clone(), WsfEngageLaunchPkTableLethality::Clone(), WsfExoAtmosphericLethality::Clone(), WsfExplicitWeaponEffects::Clone(), WsfGraduatedLethality::Clone(), WsfHEL_Lethality::Clone(), WsfMobilityAndFirepowerLethality::Clone(), WsfSphericalLethality::Clone(), WsfTabulatedLethality::Clone(), Clone(), WsfMobilityAndFirepowerLethality::operator=(), operator=(), WsfEngageLaunchPkTableLethality::WsfEngageLaunchPkTableLethality(), WsfEngageLaunchPkTableLethality::WsfEngageLaunchPkTableLethality(), WsfExplicitWeaponEffects::WsfExplicitWeaponEffects(), WsfHEL_Lethality::WsfHEL_Lethality(), WsfHEL_Lethality::WsfHEL_Lethality(), WsfWeaponEffects(), WsfCarltonLethality::~WsfCarltonLethality(), WsfEngageLaunchPkTableLethality::~WsfEngageLaunchPkTableLethality(), WsfExoAtmosphericLethality::~WsfExoAtmosphericLethality(), WsfExplicitWeaponEffects::~WsfExplicitWeaponEffects(), WsfGraduatedLethality::~WsfGraduatedLethality(), WsfHEL_Lethality::~WsfHEL_Lethality(), WsfSphericalLethality::~WsfSphericalLethality(), and WsfTabulatedLethality::~WsfTabulatedLethality().
|
override |
|
protected |
Copy Constructor for Clone().
References mFlags, WsfObject::WsfObject(), and WsfWeaponEffects().
|
protected |
Referenced by operator=().
|
protectedvirtual |
This method isolates the actual application of damage to the other platform. By default, the input damage is applied to the target platform, and if the 'aResult' parameter is "cKILLED", the platform is marked for removal if it is local to the simulation. However, if "on_target_damaged" or "on_target_destroyed" scripts are defined, the user-defined behavior will be executed instead of the standard behavior for that result. This means that damage will not be applied and platforms will not be removed, except through script calls.
| aSimTime | The current simulation time. |
| aOtherPlatformPtr | The platform on which the damage is applied. |
| aDamage | The damage result to be applied to the target platform. |
| aResult | The general result (cDAMAGED or cKILLED) to be applied to the target platform. |
References cDAMAGED, cKILLED, WsfPlatform::GetIndex(), WsfPlatform::IsExternallyControlled(), and WsfPlatform::SetDamageFactor().
Referenced by ApplyEffectIncrement(), and operator=().
|
protectedvirtual |
Virtual method to apply an incremental amount of damage to a platform. Should be called internally by ApplyEffectTo() after it has determined a specified amount of damage. Depending upon damage done to the platform, may change the internal Result value to cMISSED, cDAMAGED, or cKILLED. Will inform necessary WsfObservers of target hit or miss.
| aSimTime | Current simulated time value. |
| aOtherPlatformPtr | Platform under consideration for damage. |
| aDamageAmount | A value from cUNHARMED to cMORTALLY_WOUNDED, indicating damage level. |
Reimplemented in WsfHEL_Lethality.
References ApplyDamageResultToOtherPlatform(), cDAMAGED, cKILLED, cMISSED, cMORTALLY_WOUNDED, cUNHARMED, WsfPlatform::GetDamageFactor(), WsfPlatform::GetIndex(), GetSimulation(), WsfPlatform::IsExternallyControlled(), WsfPlatform::IsIndestructible(), SetResult(), WsfObserver::WeaponHit(), and WsfObserver::WeaponMissed().
Referenced by WsfHEL_Lethality::ApplyEffectIncrement(), WsfMobilityAndFirepowerLethality::ApplyEffectTo(), WsfSphericalLethality::ApplyEffectTo(), ApplyEffectTo(), and operator=().
|
protectedvirtual |
Virtual method to apply an amount of damage to an affected target platform. The platform should have already passed a IsVulnerable() check prior to this call. This base implementation considers whether the targeted WsfPlatform IsIndestructible() or not. If so, no Pk is drawn, but an ever decreasing amount of damage is applied to the platform, based upon the set Pk constraint. If the platform is destructible, a draw is taken against either the Launch or Intercept Pk value and any applied Pk degradation, and the damage result is boolean (zero damage, or death).
| aSimTime | Current simulated time. |
| aOtherPlatformPtr | Platform to (potentially) apply damage to. |
Reimplemented in WsfHEL_Lethality, WsfMobilityAndFirepowerLethality, and WsfSphericalLethality.
References ApplyEffectIncrement(), cMORTALLY_WOUNDED, cUNHARMED, DebugEnabled(), DrawUniformPk(), WsfPlatform::GetDamageFactor(), GetPkConstraint(), WsfPlatform::IsIndestructible(), and mDrawEndgamePk.
Referenced by WsfMobilityAndFirepowerLethality::ApplyEffectTo(), operator=(), and ProcessEffectCommon().
|
protectedvirtual |
Method to calculate the Intercept Pk, in response to engagement conditions at intercept. Will be called at the beginning of ProcessEffectExplicit().
| aSimTime | simulated time for the weapon effect. |
| aTargetPtr | Target under consideration for damage. |
Reimplemented in WsfCarltonLethality, WsfExoAtmosphericLethality, WsfExplicitWeaponEffects, WsfGraduatedLethality, WsfHEL_Lethality, WsfMobilityAndFirepowerLethality, and WsfTabulatedLethality.
Referenced by operator=(), and ProcessEffectCommon().
|
protectedvirtual |
Method to calculate the Launch Pk, in response to engagement conditions during launch. Will be called during Initialize().
| aSimTime | simulated time for the weapon effect. |
Reimplemented in WsfEngageLaunchPkTableLethality.
References CalcPkParameters(), GetEngagement(), WsfWeaponEngagement::GetTargetPlatform(), and WsfObject::GetTypeId().
Referenced by Initialize(), and operator=().
|
protectedvirtual |
Virtual method to degrade the selected Pk by some factor, in response to adverse engagement conditions. The base class implementation is null, but derived implementations may choose to degrade the (launch OR intercept) Pk for each individual target considered.
| aSimTime | simulated time for the weapon effect. |
| aTargetPtr | Target under consideration for damage. |
Referenced by operator=(), and ProcessEffectCommon().
|
protectedvirtual |
Capture the geometry values needed to do a Pk table lookup.
| aTargetPtr | Pointer to the target to be evaluated for geometry. |
| aAzimuth | Missile-body-relative azimuth to the target. |
| aElevation | Missile-body-relative elevation to the target. |
| aMissileSpeed | Missile speed. |
| aTargetSpeed | Target speed. |
Reimplemented in WsfExplicitWeaponEffects.
References GetEngagement(), WsfWeaponEngagement::GetFiringPlatform(), and WsfWeaponEngagement::GetTargetPlatform().
Referenced by CalcLaunchPk(), and operator=().
|
overridepure virtual |
Create a clone of the object.
Implements WsfObject.
Implemented in WsfCarltonLethality, WsfEngageLaunchPkTableLethality, WsfExoAtmosphericLethality, WsfExplicitWeaponEffects, WsfGraduatedLethality, WsfHEL_Lethality, WsfMobilityAndFirepowerLethality, WsfSphericalLethality, and WsfTabulatedLethality.
References Initialize(), PreInitialize(), and WsfWeaponEffects().
|
inline |
Returns 'true' if debugging is enabled for this instance.
References mDebugEnabled.
Referenced by WsfHEL_Lethality::ApplyEffectTo(), WsfMobilityAndFirepowerLethality::ApplyEffectTo(), ApplyEffectTo(), WsfExplicitWeaponEffects::CalcInterceptPk(), WsfEngageLaunchPkTableLethality::CalcLaunchPk(), and WsfGraduatedLethality::PreInitialize().
|
inline |
Force no terminal effect. Purpose is to be externally called when a catastrophic event during weapon flyout negates any future target effect (i.e. seeker gimbal limit, etc.).
References mDefeated.
|
inlineprotected |
Return a flag to indicate that this effect has been annulled by outside influences.
References mDefeated.
Referenced by WsfMobilityAndFirepowerLethality::ApplyEffectTo(), WsfExoAtmosphericLethality::CalcInterceptPk(), ProcessEffectExplicit(), and ProcessEffectImplicit().
|
inline |
Force a pk draw for an external platform target.
References mDrawEndgamePk.
|
protected |
Draw a uniform value for Pk determination.
References GetSimulation(), and SetPkDrawn().
Referenced by WsfHEL_Lethality::ApplyEffectTo(), WsfMobilityAndFirepowerLethality::ApplyEffectTo(), ApplyEffectTo(), and operator=().
|
inlinevirtual |
Access the value for engagement Circular Error Probable (CEP).
Referenced by WsfTabulatedLethality::CalcInterceptPk(), wsf::event::utils::PrintWE_Termination(), and wsf::event::utilsCSV::PrintWE_Termination().
|
inline |
Return the maximum lethal damage radius for this effect.
Referenced by WsfLaserWeapon::BeginShot(), wsf::event::utils::GetAdditionalDE_Info(), and wsf::event::utilsCSV::GetAdditionalDE_Info().
|
inlineprotected |
Return the Engagement that this effect was instantiated to support.
Referenced by WsfMobilityAndFirepowerLethality::AddInitialCM_States(), WsfHEL_Lethality::ApplyEffectIncrement(), WsfHEL_Lethality::ApplyEffectTo(), WsfExplicitWeaponEffects::CalcInterceptGeometry(), WsfCarltonLethality::CalcInterceptPk(), WsfGraduatedLethality::CalcInterceptPk(), WsfHEL_Lethality::CalcInterceptPk(), WsfEngageLaunchPkTableLethality::CalcLaunchPk(), CalcLaunchPk(), WsfExplicitWeaponEffects::CalcPkParameters(), CalcPkParameters(), WsfMobilityAndFirepowerLethality::Detonate(), WsfHEL_Lethality::FindMappedEntry(), WsfExplicitWeaponEffects::IsVulnerable(), IsVulnerable(), WsfMobilityAndFirepowerLethality::MyFullName(), WsfExoAtmosphericLethality::PreInitialize(), ProcessEffectExplicit(), WsfExoAtmosphericLethality::Terminate(), Terminate(), and WsfMobilityAndFirepowerLethality::WeaponFired().
|
inlineprotected |
|
inline |
Returns 'true' if the effect is allowed to extend beyond the intended target to damage other platforms.
References mIncidentalDamageAllowed.
Referenced by WsfEngageLaunchPkTableLethality::Initialize(), and UT_DEFINE_SCRIPT_METHOD().
|
inline |
Returns the current result of the effect on the incidental (unintended) targets. The value may change during an engagement.
|
inline |
|
inline |
Get the ID of a platform which will not be damaged.
|
inline |
Get the Launch Pk.
Referenced by wsf::event::utils::PrintWE_Termination(), and wsf::event::utilsCSV::PrintWE_Termination().
|
inline |
Can this weapon effect do damage to the parent? Not thread safe
References mParentDamageAllowed.
|
inline |
Method returns the current value of Pk to be used at intercept time to determine weapon miss or kill. This will return either the Launch Pk or Intercept PK, depending upon the results of UseLaunchPk() or UseInterceptPk() methods.
References mUseLaunchPk.
Referenced by WsfMobilityAndFirepowerLethality::ApplyEffectTo(), ApplyEffectTo(), wsf::event::utils::PrintWE_Termination(), wsf::event::utilsCSV::PrintWE_Termination(), and UT_DEFINE_SCRIPT_METHOD().
|
inline |
Return the current Pk degrade factor.
Referenced by wsf::event::utils::PrintWE_Termination(), wsf::event::utilsCSV::PrintWE_Termination(), and UT_DEFINE_SCRIPT_METHOD().
|
inlinevirtual |
Access the Pk value drawn for the (intended) target hit assessment.
Referenced by wsf::event::utils::PrintWE_Termination(), wsf::event::utilsCSV::PrintWE_Termination(), UT_DEFINE_SCRIPT_METHOD(), and WsfMilEventPipe::WeaponTerminated().
|
inline |
Referenced by WsfExplicitWeaponEffects::CalcInterceptPk().
|
static |
Uses the result enum value to return the result as a string cINVALID case defaults to "UNKNOWN" to match event output
References cDAMAGED, cKILLED, and cMISSED.
Referenced by wsf::event::utils::PrintWE_Termination(), wsf::event::utilsCSV::PrintWE_Termination(), UT_DEFINE_SCRIPT_METHOD(), and UT_DEFINE_SCRIPT_METHOD().
|
inline |
Referenced by PreInitialize(), and ProcessInput().
|
inlineoverride |
|
inlineprotected |
Referenced by ProcessInput(), and WsfWeaponEffects().
|
protected |
Referenced by WsfMobilityAndFirepowerLethality::AddCM_State(), WsfMobilityAndFirepowerLethality::AddInitialCM_States(), WsfHEL_Lethality::ApplyEffectIncrement(), ApplyEffectIncrement(), DrawUniformPk(), WsfMobilityAndFirepowerLethality::UpdateEvent::Execute(), WsfExoAtmosphericLethality::Initialize(), WsfMobilityAndFirepowerLethality::Initialize(), Initialize(), ProcessEffectCommon(), ProcessEffectExplicit(), and Terminate().
|
inline |
Current resulting effect on the intended target. The value may change during an engagement.
|
inline |
Returns the current result of the total effect on the target environment. The value may change during an engagement.
|
static |
Return the weapon effects type for the associated platform.
References WsfWeaponPlatformExtension::GetWeaponEffectsType().
Referenced by WsfExplicitWeapon::FireP(), WsfWeaponFuse::PrivateDetonate(), and WsfDisFire::Process().
|
virtual |
Initializes the effect at the time of weapon firing. May be used to set the anticipated launch Pk or CEP for the engagement, if needed. Calls virtual CalcLaunchPk()
| aSimTime | simulated time at the beginning of the engagement. |
| aEngagementPtr | The engagement that owns and controls this effect. |
Reimplemented in WsfEngageLaunchPkTableLethality, WsfExoAtmosphericLethality, WsfHEL_Lethality, WsfMobilityAndFirepowerLethality, and WsfTabulatedLethality.
References CalcLaunchPk(), GetSimulation(), mUseLaunchPk, and ok.
Referenced by Clone(), WsfEngageLaunchPkTableLethality::Initialize(), WsfExoAtmosphericLethality::Initialize(), WsfHEL_Lethality::Initialize(), WsfMobilityAndFirepowerLethality::Initialize(), and WsfTabulatedLethality::Initialize().
|
protected |
This protected method assures that a specified target index does exist.
Referenced by operator=(), and ProcessEffectCommon().
| bool WsfWeaponEffects::IsKilledPlatform | ( | size_t | aPlatformIndex | ) | const |
Returns 'true' if the specified WSF platform index has been killed during this engagement.
Referenced by ProcessEffectImplicit().
|
protectedvirtual |
Virtual method returning a boolean to indicate whether a target platform should be subjected to this weapon effect. The base class implementation enforces the 'allow_incidental_damage' flag to be honored, as well as a weapon not targeting itself, a specified "invincible" platform, or a target belonging to a specified category. Derived implementations may ignore these restrictions, or impose greater ones on top of the basic ones.
| aOtherPlatformPtr | Target under consideration. |
Reimplemented in WsfExplicitWeaponEffects, and WsfHEL_Lethality.
References cMORTALLY_WOUNDED, WsfPlatform::GetCategories(), WsfPlatform::GetDamageFactor(), GetEngagement(), WsfWeaponEngagement::GetFiringPlatform(), WsfPlatform::GetIndex(), WsfWeaponEngagement::GetWeaponPlatform(), WsfCategoryList::Intersects(), WsfPlatform::IsDeleted(), WsfPlatform::IsExternalShadow(), and mParentDamageAllowed.
Referenced by WsfExplicitWeaponEffects::IsVulnerable(), WsfHEL_Lethality::IsVulnerable(), operator=(), and ProcessEffectCommon().
|
inlineprotected |
Method returns an index of one of the platforms killed during this engagement.
|
inline |
Method returns the count of platforms killed during this engagement.
|
protected |
|
virtual |
Method will initialize any data required by the object prior to first use. (The type loader must call this method on each object after the data input stream is read and parsed.)
Reimplemented in WsfEngageLaunchPkTableLethality, WsfExoAtmosphericLethality, WsfGraduatedLethality, WsfSphericalLethality, and WsfTabulatedLethality.
References WsfMilExtension::Find(), WsfPk::TableManager::FindTableName(), WsfMilExtension::GetPkTableManager(), and GetScenario().
Referenced by Clone(), WsfWeaponEffectsTypes::InitializeType(), WsfEngageLaunchPkTableLethality::PreInitialize(), WsfExoAtmosphericLethality::PreInitialize(), WsfGraduatedLethality::PreInitialize(), WsfSphericalLethality::PreInitialize(), and WsfTabulatedLethality::PreInitialize().
|
protected |
Common driver code for base class explicit and implicit processing.
| aSimTime | simulated time for the weapon effect. |
| aRefPlatformPtr | The 'reference' platform. This will be the weapon platform (missile, bomb, etc.) for an explicit weapon and the firing platform for an implicit weapon. |
References ApplyEffectTo(), CalcInterceptPk(), CalcPkDegradation(), cMISSED, WsfScriptContext::ExecuteScript(), WsfScriptContext::FindScript(), WsfSimulation::GetPlatformCount(), WsfSimulation::GetPlatformEntry(), WsfPlatform::GetScriptContext(), GetSimulation(), IsIntendedTargetValid(), IsVulnerable(), mIncidentalDamageAllowed, UseInterceptPk(), WsfScriptContext::ValidateScript(), and WsfObserver::WeaponMissed().
Referenced by operator=(), ProcessEffectExplicit(), and ProcessEffectImplicit().
|
virtual |
Method for explicit weapon effects.
The effect is delivered by an intermediate platform (e.g., a bomb) not residing on the platform that initiated the engagement. This method applies the ApplyEffectTo()lethality transfer function from the weapon platform to all target platform(s) in the simulation which are within lethal range.
Calling heirarchy as follows:
| aSimTime | simulated time for the weapon effect. |
References Defeated(), GetEngagement(), WsfPlatform::GetIndex(), GetSimulation(), WsfWeaponEngagement::GetWeaponPlatform(), and ProcessEffectCommon().
|
virtual |
Method for implicit effects. The effect is delivered directly by the WsfWeapon that initiated the engagement (e.g., a directed energy device).
Calling hierarchy as follows:
| aSimTime | simulated time for the weapon effect. |
References Defeated(), IsKilledPlatform(), and ProcessEffectCommon().
|
overridevirtual |
Method will read a data stream, and set data values required by the object prior to first use.
Reimplemented from WsfObject.
References WsfScriptContext::CompileImplicitScript(), WsfMilExtension::Find(), GetScenario(), GetScriptContext(), mDebugEnabled, mDrawEndgamePk, mIncidentalDamageAllowed, mRemoveWeaponPlatform, WsfObject::ProcessInput(), ProcessInput(), SetCEP(), SetInterceptPk(), SetLaunchPk(), SetUseInterceptPk(), and SetUseLaunchPk().
Referenced by WsfEngageLaunchPkTableLethality::ProcessInput(), WsfExplicitWeaponEffects::ProcessInput(), WsfHEL_Lethality::ProcessInput(), and ProcessInput().
|
inline |
Set the value for engagement Circular Error Probable (CEP). (May not be used by all WsfEffects classes.)
Referenced by ProcessInput().
|
inline |
Set the maximum lethal damage radius for this effect.
Referenced by WsfHEL_Lethality::ApplyEffectTo(), and WsfHEL_Lethality::Initialize().
|
inline |
Enable or disable debugging for this instance.
References mDebugEnabled.
|
inline |
References mIncidentalDamageAllowed.
Referenced by UT_DEFINE_SCRIPT_METHOD().
|
protected |
Set the enumerated end result effect upon unintended target(s). One detonation may have an effect upon more than one target platform. This method assures capturing the most damaging result, and will save result cKILLED, ignoring a later cDAMAGED or cMISSED.
| aResult | internally reported effect to save as final. |
Referenced by SetResult().
|
inlineprotected |
Set the (assumedly fixed) Intercept Pk value.
Referenced by WsfCarltonLethality::CalcInterceptPk(), WsfExoAtmosphericLethality::CalcInterceptPk(), WsfExplicitWeaponEffects::CalcInterceptPk(), WsfGraduatedLethality::CalcInterceptPk(), WsfHEL_Lethality::CalcInterceptPk(), WsfTabulatedLethality::CalcInterceptPk(), ProcessInput(), WsfHEL_Lethality::WsfHEL_Lethality(), and WsfMobilityAndFirepowerLethality::WsfMobilityAndFirepowerLethality().
|
inline |
Set the ID of a platform which shall not be damaged. (Usually the launching entity.).
|
inlineprotected |
Set the (assumedly fixed) Launch Pk value.
Referenced by WsfEngageLaunchPkTableLethality::CalcLaunchPk(), and ProcessInput().
|
inline |
References mParentDamageAllowed.
|
inline |
Set the fraction by which the un-degraded Pk value should be multiplied to get the effective Pk.
| aPkDegrade | The multiplier [0..1] to be applied to the un-degraded Pk to get the effective Pk. |
Referenced by UT_DEFINE_SCRIPT_METHOD().
|
inlineprotected |
Set the Pk value used in the intended target hit assessment.
Referenced by DrawUniformPk().
|
protected |
Set the enumerated end result effect upon affected platform(s).
| aResult | internally reported effect to save as final. |
| aIsIntended | 'true' if aResult was to the intended target. |
References cINVALID, cMISSED, mDefeated, SetIncidentalResult(), and SetTargetResult().
Referenced by ApplyEffectIncrement().
|
protected |
Set the most grave enumerated end result upon the intended target. One employment of a weapon may have more than one effect upon a target platform, especially an implicit directed energy weapon, if the beam were to impinge repeatedly on the target. This method assures capturing the most damaging result, and will save result cKILLED, ignoring a later cMISSED.
| aResult | the reported effect to save as a final result. |
Referenced by SetResult().
|
inlineprotected |
Indicate that you wish to use the Intercept Pk value (in lieu of the Launch Pk value).
References mUseLaunchPk.
Referenced by ProcessInput(), WsfCarltonLethality::WsfCarltonLethality(), WsfExoAtmosphericLethality::WsfExoAtmosphericLethality(), WsfExplicitWeaponEffects::WsfExplicitWeaponEffects(), WsfGraduatedLethality::WsfGraduatedLethality(), WsfHEL_Lethality::WsfHEL_Lethality(), WsfMobilityAndFirepowerLethality::WsfMobilityAndFirepowerLethality(), and WsfTabulatedLethality::WsfTabulatedLethality().
|
inlineprotected |
Indicate that you wish to use the Launch Pk value (in lieu of the Intercept Pk value).
References mUseLaunchPk.
Referenced by ProcessInput(), and WsfEngageLaunchPkTableLethality::WsfEngageLaunchPkTableLethality().
|
virtual |
Method to complete the effect at the end of a weapon engagement. The first action is to inform the WsfObservers of WsfWeaponEngagement termination. For an explicit engagement, the next action is to remove the weapon platform from the simulation. For both implicit and explicit engagements, killed players are then removed.
| aSimTime | Current simulated time value. |
Reimplemented in WsfExoAtmosphericLethality.
References WsfMilInterface::Find(), GetEngagement(), WsfSimulation::GetPlatformByIndex(), GetSimulation(), WsfWeaponEngagement::GetWeaponPlatform(), WsfPlatform::IsExternallyControlled(), WsfPlatform::IsIndestructible(), WsfMilInterface::KillPlatform(), mRemoveWeaponPlatform, WsfPlatform::SetDamageFactor(), and WsfObserver::WeaponTerminated().
Referenced by WsfExoAtmosphericLethality::Terminate().
|
inline |
Method returns a boolean to indicate that the current value for Intercept Pk (in lieu of Launch Pk) will be the target of comparison for a uniform draw at intercept time.
References mUseLaunchPk.
Referenced by wsf::event::utils::PrintWE_Termination(), wsf::event::utilsCSV::PrintWE_Termination(), and ProcessEffectCommon().
|
inline |
Method returns a boolean to indicate that the current value for Launch Pk (in lieu of Intercept Pk) will be the target of comparison for a uniform draw at intercept time.
References mUseLaunchPk.
Referenced by wsf::event::utils::PrintWE_Termination(), and wsf::event::utilsCSV::PrintWE_Termination().
|
static |
Value indicating total damage to a player (eventually causing him to be removed from the simulation).
Referenced by ApplyEffectIncrement(), WsfHEL_Lethality::ApplyEffectTo(), WsfMobilityAndFirepowerLethality::ApplyEffectTo(), ApplyEffectTo(), and IsVulnerable().
|
static |
|
static |
Value indicating no damage to a player, the weapon had no effect.
Referenced by ApplyEffectIncrement(), WsfHEL_Lethality::ApplyEffectTo(), WsfMobilityAndFirepowerLethality::ApplyEffectTo(), and ApplyEffectTo().
| bool WsfWeaponEffects::mDebugEnabled |
Referenced by DebugEnabled(), ProcessInput(), SetDebugEnabled(), and WsfWeaponEffects().
| bool WsfWeaponEffects::mDefeated |
Referenced by Defeat(), Defeated(), SetResult(), and WsfWeaponEffects().
| bool WsfWeaponEffects::mDrawEndgamePk |
Referenced by ApplyEffectTo(), DrawEndgamePk(), ProcessInput(), and WsfWeaponEffects().
| unsigned short WsfWeaponEffects::mFlags |
Referenced by WsfWeaponEffects(), and WsfWeaponEffects().
| bool WsfWeaponEffects::mIncidentalDamageAllowed |
| bool WsfWeaponEffects::mParentDamageAllowed |
Referenced by GetParentDamageAllowed(), IsVulnerable(), and SetParentDamageAllowed().
| bool WsfWeaponEffects::mRemoveWeaponPlatform |
Referenced by ProcessInput(), Terminate(), and WsfWeaponEffects().
| bool WsfWeaponEffects::mUseLaunchPk |
Referenced by GetPkConstraint(), Initialize(), SetUseInterceptPk(), SetUseLaunchPk(), UseInterceptPk(), UseLaunchPk(), and WsfWeaponEffects().