|
WSF
|
A Helper class for WsfDisInterface to process weapon launch and termination events. More...
#include <WsfDisWeaponEvents.hpp>
Public Member Functions | |
| WsfDisWeaponEvents (WsfMilDisInterface *aInterfacePtr) | |
| virtual | ~WsfDisWeaponEvents ()=default |
| void | WeaponFired (double aSimTime, const WsfWeaponEngagement *aEngagementPtr, const WsfTrack *aTrackPtr) |
| void | DirectedEnergyWeaponFired (double aSimTime, const WsfDirectedEnergyWeapon *aWeaponPtr, const WsfWeaponEngagement *aEngagementPtr) |
| void | DirectedEnergyWeaponHit (double aSimTime, const WsfDirectedEnergyWeapon *aWeaponPtr, const WsfWeaponEngagement *aEngagementPtr) |
| void | ImplicitWeaponEndEngagement (double aSimTime, WsfImplicitWeapon *aImplicitWeapon, const WsfWeaponEngagement *aEngagementPtr) |
| void | WeaponTerminated (double aSimTime, const WsfWeaponEngagement *aEngagementPtr) |
| bool | InitiateWeaponTransfer (double aSimTime, DisFire *aPduPtr) |
| bool | TransferPlatformToExternalControl (double aSimTime, WsfPlatform *aPlatformPtr) |
| bool | TransferPlatformToInternalControl (double aSimTime, WsfPlatform *aPlatformPtr, DisEntityId &aEntityId, DisEntityType &aEntityType) |
| bool | IsOutgoingWeaponTransfer (double aSimTime, WsfPlatform *aPlatformPtr) |
| WsfSimulation * | GetSimulation () const |
Public Attributes | |
| UtCallbackListN< void(DisFire &)> | ProcessFirePDU |
| UtCallbackListN< void(DisDetonation &)> | ProcessDetonationPDU |
| UtCallbackListN< void(const WsfWeapon *, WsfPlatform *, WsfDisPlatform *, DisEntityId &, bool &)> | ProcessWeaponPrelaunchStatus |
| UtCallbackListN< void(WsfDisPlatform *, DisEntityId &)> | ProcessWeaponTerminated |
| UtCallbackListN< void(std::string)> | ReportErrorMessage |
| UtCallbackListN< void(WsfGeoPoint &, int)> | SetTrackLocationData |
| UtCallbackListN< void(WsfPlatform *, const WsfWeapon *, const WsfWeaponEngagement *, DisEntityId &)> | UpdateFiringPlatformSystems |
A Helper class for WsfDisInterface to process weapon launch and termination events.
| WsfDisWeaponEvents::WsfDisWeaponEvents | ( | WsfMilDisInterface * | aInterfacePtr | ) |
|
virtualdefault |
| void WsfDisWeaponEvents::DirectedEnergyWeaponFired | ( | double | aSimTime, |
| const WsfDirectedEnergyWeapon * | aWeaponPtr, | ||
| const WsfWeaponEngagement * | aEngagementPtr ) |
References WsfDisPlatform::ForceUpdate(), WsfDirectedEnergyWeapon::Beam::GetApertureDiameter(), WsfDirectedEnergyWeapon::GetBeam(), WsfDisUtil::GetDisPlatform(), WsfImplicitWeapon::GetEngagement(), WsfDisPlatform::GetEntityId(), WsfExtData::GetEntityType(), WsfDisUtil::GetExtInterface(), WsfWeaponEngagement::GetFiringPlatform(), WsfWeaponEngagement::GetFiringPlatformIndex(), WsfDirectedEnergyWeapon::Beam::GetIncidenceAngle(), WsfDirectedEnergyWeapon::Beam::GetOffsetLocationECS(), WsfDirectedEnergyWeapon::Beam::GetPeakIrradiance(), WsfDisPlatform::GetPlatform(), WsfSimulation::GetPlatformByIndex(), WsfDirectedEnergyWeapon::Beam::GetPulseRepetitionFrequency(), WsfDirectedEnergyWeapon::Beam::GetPulseWidth(), WsfDirectedEnergyWeapon::Beam::GetSemiMajorAxis(), WsfDirectedEnergyWeapon::Beam::GetSemiMinorAxis(), WsfWeaponEngagement::GetSerialNumber(), GetSimulation(), WsfWeaponEngagement::GetStartTime(), WsfWeaponEngagement::GetTargetPlatformIndex(), WsfDirectedEnergyWeapon::Beam::GetWavelength(), WsfPlatform::IsExternallyControlled(), WsfWeaponEngagement::IsExternallyControlled(), WsfPlatform::IsExternallyMoved(), WsfDirectedEnergyWeapon::IsFiring(), WsfDisUtil::PutPdu(), and WsfDisExt::ToDis().
Referenced by ~WsfDisWeaponEvents().
| void WsfDisWeaponEvents::DirectedEnergyWeaponHit | ( | double | aSimTime, |
| const WsfDirectedEnergyWeapon * | aWeaponPtr, | ||
| const WsfWeaponEngagement * | aEngagementPtr ) |
References WsfWeaponEffects::cDAMAGED, WsfWeaponEffects::cKILLED, WsfDirectedEnergyWeapon::GetBeam(), WsfDisUtil::GetDisPlatform(), WsfDisPlatform::GetEntityId(), WsfDirectedEnergyWeapon::Beam::GetOffsetLocationECS(), WsfSimulation::GetPlatformByIndex(), WsfDirectedEnergyWeapon::Beam::GetSemiMinorAxis(), WsfWeaponEngagement::GetSerialNumber(), GetSimulation(), WsfWeaponEngagement::GetTargetPlatformIndex(), WsfWeaponEngagement::GetTargetResult(), WsfPlatform::IsExternallyControlled(), and WsfDisUtil::PutPdu().
Referenced by ~WsfDisWeaponEvents().
| WsfSimulation * WsfDisWeaponEvents::GetSimulation | ( | ) | const |
| void WsfDisWeaponEvents::ImplicitWeaponEndEngagement | ( | double | aSimTime, |
| WsfImplicitWeapon * | aImplicitWeapon, | ||
| const WsfWeaponEngagement * | aEngagementPtr ) |
References WsfWeaponEngagement::GetSerialNumber().
Referenced by ~WsfDisWeaponEvents().
| bool WsfDisWeaponEvents::InitiateWeaponTransfer | ( | double | aSimTime, |
| DisFire * | aPduPtr ) |
Determine if the incoming weapon entity should be transferred and controlled locally.
This is invoked by WsfDisFire::Process to determine the DIS Fire event is specifying a weapon that has been defined to be transferred to local control and modeled locally.
References WsfComponentListT< COMPONENT_TYPE >::AddComponent(), WsfComponentList::RoleIterator< T >::AtEnd(), WsfObjectTypeList< T >::Clone(), WsfTrack::cPREDEFINED, WsfTrack::cPROCESSED, WsfDisUtil::FindDisPlatform(), WsfWeapon::Fire(), WsfWeaponTypes::Get(), WsfAuxDataEnabled::GetAuxData(), WsfDisPlatform::GetEntityId(), WsfPlatform::GetIndex(), WsfGeoPoint::GetLocationLLA(), WsfObject::GetNameId(), WsfPlatform::GetNextTrackId(), WsfDisPlatform::GetPlatform(), WsfWeaponEngagement::GetSerialNumber(), WsfPlatform::GetSideId(), GetSimulation(), WsfPlatform::GetSpatialDomain(), WsfObject::GetTypeId(), WsfWeaponEngagement::GetWeaponPlatform(), WsfWeapon::Initialize(), WsfPlatform::IsExternallyControlled(), WsfPlatform::IsExternallyMoved(), WsfWeapon::FireResult::mEngagementPtr, WsfMilDisInterface::IncomingTransfer::mFiringDisEntityId, WsfMilDisInterface::IncomingTransfer::mWeaponDisEntityType, WsfWeapon::FireOptions::mWeaponId, WsfMilDisInterface::IncomingTransfer::mWeaponSystemType, ReportErrorMessage, WsfObject::SetName(), WsfWeapon::SetQuantityRemaining(), SetTrackLocationData, trackPtr, WsfPlatform::Update(), and WSF_SPATIAL_DOMAIN_LAND.
Referenced by WsfDisFire::Process(), and ~WsfDisWeaponEvents().
| bool WsfDisWeaponEvents::IsOutgoingWeaponTransfer | ( | double | aSimTime, |
| WsfPlatform * | aPlatformPtr ) |
Is the specified platform selected by an 'outbound_weapon_transfer' command.
| aSimTime | The current simulation time. |
| aPlatformPtr | The platform to be tested. |
References WsfWeaponEngagement::Find(), WsfObject::GetTypeId(), WsfWeaponEngagement::GetWeaponSystem(), and WsfPlatform::IsExternallyControlled().
Referenced by TransferPlatformToExternalControl(), and ~WsfDisWeaponEvents().
| bool WsfDisWeaponEvents::TransferPlatformToExternalControl | ( | double | aSimTime, |
| WsfPlatform * | aPlatformPtr ) |
Transfer the platform being created from internal to external control.
This is invoked by WsfDisInterface::AddPlatform to transfer control of the newly created platform to some external application.
| aSimTime | The current simulation time. |
| aPlatformPtr | The platform to be transferred from local to external control. |
References WsfComponentList::DeleteComponent(), IsOutgoingWeaponTransfer(), moverPtr, WsfPlatform::SetMover(), and WsfExtInterface::StripExternalPlatform().
Referenced by ~WsfDisWeaponEvents().
| bool WsfDisWeaponEvents::TransferPlatformToInternalControl | ( | double | aSimTime, |
| WsfPlatform * | aPlatformPtr, | ||
| DisEntityId & | aEntityId, | ||
| DisEntityType & | aEntityType ) |
Transfer the platform being created from external to internal control.
This is invoked by WsfDisInterface::AddPlatform to transfer control of the platform being created to internal control. This really isn't so much a transfer as it is making the new platform assume the identity of a platform that may already exist as an externally control platform.
| aSimTime | [input] The current simulation time. |
| aPlatformPtr | [input] The platform to be transferred from external to local control. |
| aEntityId | [output] The DIS Entity Id to be assigned to the platform IF the method return value is true. |
| aEntityType | [output] The DIS Entity Type to be assigned to the platform IF the method return value is true. |
References WsfSimulation::DeletePlatform(), WsfWeaponEngagement::Find(), WsfDisUtil::FindDisPlatform(), WsfWeaponEngagement::GetFiringPlatformIndex(), WsfWeaponEngagement::GetInitialTargetTrackId(), WsfDisPlatform::GetPlatform(), GetSimulation(), WsfWeaponEngagement::GetStartTime(), WsfWeaponEngagement::GetWeaponSystemName(), and WsfDisPlatform::SetHasBeenReplaced().
Referenced by ~WsfDisWeaponEvents().
| void WsfDisWeaponEvents::WeaponFired | ( | double | aSimTime, |
| const WsfWeaponEngagement * | aEngagementPtr, | ||
| const WsfTrack * | aTrackPtr ) |
References WsfComponent::ComponentHasRole(), cWSF_COMPONENT_DIRECTED_ENERGY_WEAPON, and WsfWeaponEngagement::GetWeaponSystem().
Referenced by ~WsfDisWeaponEvents().
| void WsfDisWeaponEvents::WeaponTerminated | ( | double | aSimTime, |
| const WsfWeaponEngagement * | aEngagementPtr ) |
References WsfWeaponEffects::cDAMAGED, WsfWeaponEffects::cKILLED, WsfWeaponEngagement::cTARGET_IMPACT, WsfWeaponEngagement::cTARGET_PROXIMITY_AIR_BURST, WsfWeaponEngagement::cTARGET_PROXIMITY_GROUND_IMPACT, WsfAuxDataEnabled::GetAuxDataConst(), WsfPlatform::GetDamageFactor(), WsfDisUtil::GetDisPlatform(), WsfDisPlatform::GetEntityId(), WsfDisPlatform::GetEntityType(), WsfDisUtil::GetExtInterface(), WsfWeaponEngagement::GetFiringPlatformIndex(), WsfWeaponEngagement::GetGeometryResult(), WsfWeaponEngagement::GetMissDistance(), WsfDisPlatform::GetPlatform(), WsfWeaponEngagement::GetSerialNumber(), WsfWeaponEngagement::GetTargetLocationWCS(), WsfWeaponEngagement::GetTargetPlatformIndex(), WsfWeaponEngagement::GetTargetResult(), WsfWeaponEngagement::GetWeaponLocationWCS(), WsfWeaponEngagement::GetWeaponPlatform(), WsfWeaponEngagement::GetWeaponPlatformIndex(), WsfWeaponEngagement::GetWeaponSystem(), WsfWeaponEngagement::GetWeaponVelocityWCS(), WsfPlatform::IsExternallyControlled(), WsfWeaponEngagement::IsExternallyControlled(), WsfPlatform::IsExternallyMoved(), ProcessDetonationPDU, ProcessWeaponTerminated, and WsfDisUtil::PutPdu().
Referenced by ~WsfDisWeaponEvents().
| UtCallbackListN<void(DisDetonation&)> WsfDisWeaponEvents::ProcessDetonationPDU |
Referenced by WeaponTerminated().
| UtCallbackListN<void(DisFire&)> WsfDisWeaponEvents::ProcessFirePDU |
| UtCallbackListN<void(const WsfWeapon*, WsfPlatform*, WsfDisPlatform*, DisEntityId&, bool&)> WsfDisWeaponEvents::ProcessWeaponPrelaunchStatus |
| UtCallbackListN<void(WsfDisPlatform*, DisEntityId&)> WsfDisWeaponEvents::ProcessWeaponTerminated |
Referenced by WeaponTerminated().
| UtCallbackListN<void(std::string)> WsfDisWeaponEvents::ReportErrorMessage |
Referenced by InitiateWeaponTransfer().
| UtCallbackListN<void(WsfGeoPoint&, int)> WsfDisWeaponEvents::SetTrackLocationData |
Referenced by InitiateWeaponTransfer().
| UtCallbackListN<void(WsfPlatform*, const WsfWeapon*, const WsfWeaponEngagement*, DisEntityId&)> WsfDisWeaponEvents::UpdateFiringPlatformSystems |