|
WSF
|
A simple weapon effect calculating the lethal effect from a high-energy laser (HEL). More...
#include <WsfHEL_Lethality.hpp>


Classes | |
| class | Effect |
| class | Entry |
Public Member Functions | |
| WsfHEL_Lethality (WsfScenario &aScenario) | |
| WsfHEL_Lethality (const WsfHEL_Lethality &aLethality) | |
| ~WsfHEL_Lethality () override=default | |
| WsfWeaponEffects * | Clone () const override |
| bool | ProcessInput (UtInput &aInput) override |
| bool | Initialize (double aSimTime, const WsfWeaponEngagement *aEngagementPtr) override |
| Public Member Functions inherited from WsfWeaponEffects | |
| WsfWeaponEffects (WsfScenario &aScenario) | |
| ~WsfWeaponEffects () override | |
| virtual bool | PreInitialize () |
| bool | ProcessInput (UtInput &aInput) override |
| 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 () |
| 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) |
| 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) |
Protected Member Functions | |
| WsfHEL_Lethality & | operator= (const WsfHEL_Lethality &aRhs)=delete |
| Disable use. | |
| void | ApplyEffectTo (double aSimTime, WsfPlatform *aTargetPtr) override |
| Calculate the weapon's effect on the target. | |
| void | ApplyEffectIncrement (double aSimTime, WsfPlatform *aOtherPlatformPtr, double aDamageAmount) override |
| void | CalcInterceptPk (double aSimTime, WsfPlatform *aTargetPtr) override |
| bool | IsVulnerable (WsfPlatform *aOtherPlatformPtr) override |
| Different processing from base class if we decide to manage kills (used for virtual sim. with API). | |
| const Entry * | FindMappedEntry (WsfPlatform *aTargetPtr) |
| Protected Member Functions inherited from WsfWeaponEffects | |
| WsfWeaponEffects (const WsfWeaponEffects &aSrc) | |
| Copy Constructor for Clone(). | |
| WsfWeaponEffects & | operator= (const WsfWeaponEffects &aRhs) |
| 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 | 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. | |
| 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()). | |
Additional Inherited Members | |
| Public Types inherited from WsfWeaponEffects | |
| enum | Result { cINVALID , cMISSED , cDAMAGED , cKILLED } |
| Public Types inherited from WsfObject | |
| typedef std::vector< WsfStringId > | TypeList |
| The list of types returned by GetTypeList. | |
| Static Public Member Functions inherited from WsfWeaponEffects | |
| static WsfStringId | GetWeaponEffectsType (WsfPlatform &aPlatform) |
| Return the weapon effects type for the associated platform. | |
| static std::string | GetResultString (WsfWeaponEffects::Result aResult) |
| Static Public Attributes inherited from WsfWeaponEffects | |
| 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 |
A simple weapon effect calculating the lethal effect from a high-energy laser (HEL).
The conditions for a lethal effect are that it must be on target for a minimum time above a certain intensity threshold. We are not yet calculating beam size or aspect effects. We tacitly assume that these parameters are sufficient to obtain the desired effect.
| WsfHEL_Lethality::WsfHEL_Lethality | ( | WsfScenario & | aScenario | ) |
References WsfWeaponEffects::SetInterceptPk(), WsfWeaponEffects::SetUseInterceptPk(), and WsfWeaponEffects::WsfWeaponEffects().
Referenced by Clone(), operator=(), and WsfHEL_Lethality().
| WsfHEL_Lethality::WsfHEL_Lethality | ( | const WsfHEL_Lethality & | aLethality | ) |
References WsfHEL_Lethality(), and WsfWeaponEffects::WsfWeaponEffects().
|
overridedefault |
References WsfWeaponEffects::WsfWeaponEffects().
|
overrideprotectedvirtual |
Depending on configuration, perform base class' implementation or a modified implementation that does not delete killed entities. This latter implementation is used for virtual simulation (esp. for the API version of HELSim).
Reimplemented from WsfWeaponEffects.
References WsfWeaponEffects::ApplyEffectIncrement(), WsfObserver::DirectedEnergyWeaponHit(), WsfWeaponEffects::GetEngagement(), WsfWeaponEffects::GetSimulation(), WsfWeaponEngagement::GetWeaponSystem(), and WsfPlatform::IsExternallyControlled().
Referenced by ApplyEffectTo().
|
overrideprotectedvirtual |
Calculate the weapon's effect on the target.
Reimplemented from WsfWeaponEffects.
References ApplyEffectIncrement(), WsfHEL_Lethality::Entry::cCATEGORY, WsfHEL_Lethality::Effect::cENERGY, WsfHEL_Lethality::Effect::cENERGY_DENSITY, WsfWeaponEffects::cMORTALLY_WOUNDED, WsfHEL_Lethality::Entry::cPLATFORM_REGION, WsfHEL_Lethality::Entry::cPLATFORM_TYPE, WsfWeaponEffects::cUNHARMED, WsfWeaponEffects::DebugEnabled(), WsfWeaponEffects::DrawUniformPk(), FindMappedEntry(), WsfDirectedEnergyWeapon::Beam::GetEnergy(), WsfDirectedEnergyWeapon::Beam::GetEnergyDensity(), WsfWeaponEffects::GetEngagement(), WsfWeaponEngagement::GetIntendedTargetOffsetName(), WsfWeaponEffects::GetInterceptPk(), WsfObject::GetName(), WsfObject::GetType(), WsfWeaponEngagement::GetWeaponSystem(), WsfHEL_Lethality::Effect::mKind, WsfHEL_Lethality::Effect::mRadius, WsfHEL_Lethality::Effect::mThreshold, and WsfWeaponEffects::SetDamageRadius().
|
overrideprotectedvirtual |
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 from WsfWeaponEffects.
References FindMappedEntry(), WsfDirectedEnergyWeapon::Beam::GetEnergy(), WsfWeaponEffects::GetEngagement(), WsfWeaponEngagement::GetWeaponSystem(), and WsfWeaponEffects::SetInterceptPk().
|
overridevirtual |
Create a clone of the object.
Implements WsfWeaponEffects.
References WsfHEL_Lethality(), and WsfWeaponEffects::WsfWeaponEffects().
|
protected |
Go through all categories of the target platform; attempt to find a match in the given map (category to value map). If no match is found, throw an exception.
References WsfPlatform::GetCategories(), WsfCategoryList::GetCategoryList(), WsfWeaponEffects::GetEngagement(), WsfWeaponEngagement::GetIntendedTargetOffsetName(), and WsfObject::GetType().
Referenced by ApplyEffectTo(), CalcInterceptPk(), Initialize(), and operator=().
|
overridevirtual |
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 from WsfWeaponEffects.
References FindMappedEntry(), WsfObject::GetName(), WsfWeaponEngagement::GetTargetPlatform(), WsfWeaponEffects::Initialize(), WsfWeaponEffects::SetDamageRadius(), and success.
|
overrideprotectedvirtual |
Different processing from base class if we decide to manage kills (used for virtual sim. with API).
Reimplemented from WsfWeaponEffects.
References WsfWeaponEffects::IsVulnerable().
|
protecteddelete |
Disable use.
References FindMappedEntry(), and WsfHEL_Lethality().
|
overridevirtual |
Process input from a generic source.
Examine the current input command. If it is NOT one of the commands recognized by this class then it simply returns 'false'. If it is one of the commands recognized by this class then it processes the command and returns 'true'.
| aInput | a reference to a UtInput object. |
| UtInput::ExceptionBase | (or an object derived from it) if the command was recognized but contains some sort of error. |
Reimplemented from WsfObject.
References WsfHEL_Lethality::Effect::cENERGY, WsfHEL_Lethality::Effect::cENERGY_DENSITY, WsfHEL_Lethality::Effect::cPOWER, WsfHEL_Lethality::Entry::GetId(), WsfHEL_Lethality::Entry::mEffects, WsfHEL_Lethality::Entry::ProcessInput(), WsfWeaponEffects::ProcessInput(), WsfHEL_Lethality::Entry::ProcessType(), and success.