12 #include <matrix/vlVector.h>
15 #include <tbb/recursive_mutex.h>
16 #include <tbb/concurrent_queue.h>
17 #include <boost/signals2.hpp>
24 class SimObjectDetonationCallback;
26 namespace makVrfEvents
135 const DtUUID& entityId,
void* callbackObject, DtDamageAdjudicationFunction func);
144 const DtUUID& entityId,
DtSimMunition munition,
double maxDamageRadius,
void* callbackObject,
145 DtDamageAdjudicationFunction func);
153 const DtUUID& entityId,
const DtString& powerType,
double minDamagePower,
void* callbackObject,
154 DtDamageAdjudicationFunction func);
169 DtDamageAdjudicationFunction func);
184 virtual bool loadParametersFromFile(
const DtFilename&
filename);
186 virtual bool loadDeformationParametersFromFile(
const DtFilename &
filename);
190 virtual double detonationPower(
const DtSimMunition & munition,
double rangeFromShooter,
191 double rangeFromImpact,
const DtString& powerType)
const;
221 virtual void resetParameters();
224 virtual bool parametersLoaded()
const;
227 virtual const DtFilename& parametersFile()
const;
229 virtual const DtFilename& deformationParametersFile()
const;
250 virtual void processUUIDChanged(
const DtUUID& oldUUID,
const DtUUID& newUUID);
266 virtual void processCollateralDetonationForEntitiesInRange(
DtDetonationContext& detonationContext);
269 virtual DtDetonationResult defaultDetonationResult()
const;
271 void cleanOutDeadEntities();
314 bool myCreatedConnections =
false;
UUID is a unique ID wrapper class.
Definition: uuid.h:59
Contains the DtAdsbDataServiceInterface class declaration.
DtCollateralDetonationTargetMap myCollateralDetonationTargetMap
Definition: detonationManager.h:293
virtual void sendDetonationInteraction(const makVrfEvents::DtDetonationEvent &detonation)=0
Send the fully initialized detonation interaction.
DtFilename myParametersFile
Definition: detonationManager.h:304
DtMunitionDamageMap damageByMunitionMap
Definition: detonationManager.h:78
virtual void tick()=0
Tick the detonation manager.
DtDetonationParams * myParameters
Parameters for this detonation manager.
Definition: detonationManager.h:308
Readable-writable class holding all parameters to configure the DtDetonationManager.
Definition: detonationParams.h:22
DtDamageAdjudicationFunction callbackFcn
Definition: detonationManager.h:66
virtual DtDetonationResult detonationResult(const DtSimMunition &munition, DtDetonatorFuze fuze, const DtEntityType &targetEntityType, const DtVector &localPosition) const =0
Returns the detonation result when a munition of the given type hits an entity of the given type...
DtPowerDamageMap damageByPowerMap
Definition: detonationManager.h:79
Definition: detonationManager.h:63
std::list< DtDetonationCallbackInfo > DtDetonationCallbackInfoList
Definition: detonationManager.h:82
Factory for creating DtBaseMunitionDispersalDeterminants.
Definition: baseMunitionDispersalDeterminant.h:50
std::shared_ptr< DtDetonationContext > DtDetonationContextPtr
Definition: detonationManager.h:54
double myMinPowerForDamage
Definition: detonationManager.h:295
virtual bool unRegisterCollateralDetonationCallback(const DtUUID &entity, void *callbackObject, DtDamageAdjudicationFunction func)=0
Removes the given entity callback from the detonation manager's container of detonation target callba...
DtSimulationServices * mySimulationServices
Definition: detonationManager.h:302
Definition: surface.h:181
Definition: detonationEvent.h:20
virtual bool registerCollateralDetonation(const DtUUID &entityId, DtSimMunition munition, double maxDamageRadius, void *callbackObject, DtDamageAdjudicationFunction func)=0
Use this function to register interest in collateral detonations ie ground detonations from indirect ...
DtMunitionDamageMap DtMunitionMaxRangeMap
Definition: detonationManager.h:71
std::map< DtUUID, DtCollateralDetonationTargetInfoPtr > DtCollateralDetonationTargetMap
Definition: detonationManager.h:98
virtual bool unRegisterDirectDetonationTarget(const DtUUID &entity)=0
Removes the entity from the detonation manager's container of detonation targets. ...
Definition: detonationManager.h:84
void * callbackUserData
Definition: detonationManager.h:67
virtual bool reinitialize()=0
Resets the detonation manager to initial state.
The DtPhysicalWorld is the primary interface to and manager of all of the "physical" aspects of the s...
Definition: physicalWorld.h:102
Definition: coordSystem.h:54
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
Factory for creating power range determinants.
Definition: powerRangeDeterminant.h:117
DtUUID globalId
Definition: detonationManager.h:65
DtDirectDetonationTargetMap myDirectDetonationTargetMap
Definition: detonationManager.h:292
bool myQueueEntitiesToBeRemoved
After all the callbacks have been made those who've been destroyed or asked to unregistered need to b...
Definition: detonationManager.h:300
std::list< DtCollateralDetonationTargetInfoPtr > DtCollateralDetonationTargetList
Definition: detonationManager.h:97
void * callbackUserData
Definition: detonationManager.h:77
DtDetonationServiceInterface & operator=(const DtDetonationServiceInterface &)
DtDetonationCallbackInfoList callbacks
Definition: detonationManager.h:87
std::map< DtSimMunition, double > DtMunitionDamageMap
Definition: detonationManager.h:70
DtFilename myDeformationParamsFile
Definition: detonationManager.h:305
The DtDetonationContext contains all the information necessary for processing a Detonation Interactio...
Definition: detonationContext.h:23
tbb::concurrent_queue< SimObjectDetonationCallback * > myParallelDetonationQueue
Definition: detonationManager.h:317
std::map< DtUUID, DtDirectDetonationTargetInfoPtr > DtDirectDetonationTargetMap
Definition: detonationManager.h:93
DtMunitionMaxRangeMap myMaxRangeForSpecificMunitionDamage
Definition: detonationManager.h:296
DtDamageAdjudicationFunction callbackFcn
Definition: detonationManager.h:76
DtBoost::shared_ptr< DtCollateralDetonationTargetInfo > DtCollateralDetonationTargetInfoPtr
Definition: detonationManager.h:95
Definition: detonationManager.h:74
DtTerrainDeformationParams * myDeformationParams
Definition: detonationManager.h:310
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:95
DtDamageAdjudicationFunction callbackFcn
Definition: detonationManager.h:57
std::list< DtDirectDetonationTargetInfoPtr > DtDirectDetonationTargetList
Definition: detonationManager.h:92
Definition: detonationManager.h:55
virtual const DtTerrainDeformationParams * terrainDeformationParameters() const =0
DtUUID globalId
Definition: detonationManager.h:86
virtual bool registerCollateralDetonationByPower(const DtUUID &entityId, const DtString &powerType, double minDamagePower, void *callbackObject, DtDamageAdjudicationFunction func)=0
Use this function to register interest in collateral detonations ie ground detonations from indirect ...
virtual const DtDetonationParams * parameters() const =0
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
DtDetonationContext context
TODO this is performing a copy, maybe I should use a unique pointer.
Definition: detonationManager.h:60
tbb::recursive_mutex myMutex
Definition: detonationManager.h:312
DtBoost::shared_ptr< DtDirectDetonationTargetInfo > DtDirectDetonationTargetInfoPtr
Definition: detonationManager.h:90
virtual bool unRegisterCollateralDetonationTarget(const DtUUID &entity)=0
std::map< DtString, double > DtPowerDamageMap
Definition: detonationManager.h:72
DtSimMunition class.
Definition: simMunition.h:31
tbb::concurrent_queue< DtQueuedDetonationCallbackInfo > myDetonationCallbackQueue
Definition: detonationManager.h:316
std::list< DtUUID > myEntitiesQueuedToBeRemovedList
Definition: detonationManager.h:301
void * callbackUserData
Definition: detonationManager.h:58
Abstract interface class to the detonation service. This service provides information about detonatio...
Definition: detonationServiceInterface.h:34
virtual bool registerDirectDetonation(const DtUUID &entityId, void *callbackObject, DtDamageAdjudicationFunction func)=0
Use this function to register interest in direct detonations ie entity impact or entity proximate det...
The DtDetonationManager class exists to centralize the processing of detonation interactions. Components register with the detonation manager, providing a pointer to a DtSimObject as well as the objects global designator, and a damage adjudication function to call when the detonation affects the registered sim object. The detonation manager determines the entity or entities the detonation affects, and notifies them and only them through the supplied callback functions.
Definition: detonationManager.h:50
virtual DtDetonationResult detonationResultMidAir(const DtSimMunition &munition, const DtVector &localPosition) const =0
Returns the detonation result for a munition of the given type that when it detonates in mid-air...