VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
damageAdjudicationActuator.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2015 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 
12 #pragma once
13 
19 
23 class DtSimMessage;
24 class DtSimRadio;
25 class DtPrbValueList;
26 class DtRwExplosionEntry;
27 
44 
64 {
65 
66 public:
67 
71  DtLocalObject* owner,
72  DtSimulationServices* simManager,
73  DtComponentDescriptor* desc = nullptr,
74  DtReaderWriterRegistry* parentRegistry = nullptr);
75 
78  virtual ~DtDamageAdjudicationActuator() override;
79 
89  virtual bool init() override;
90 
93  virtual bool createPSR();
94 
101  static bool processDirectDetonationCallback(const DtDetonationContext& detonationContext, void* usr);
102 
109  static bool processCollateralDetonationCallback(const DtDetonationContext& detonationContext, void* usr);
110 
133 
135  virtual bool adjudicateDirectDamage(const DtDetonationContext& detonationContext) = 0;
136 
138  virtual bool adjudicateCollateralDamage(const DtDetonationContext& detonationContext) = 0;
139 
142  virtual const char* type() const override = 0;
143 
153  virtual void tick() override;
154 
156  static void setDestroyedCallback(DtSimMessage* msg, void* usrData);
157 
159  static void setRestoredCallback(DtSimMessage* msg, void* usrData);
160 
162  static void setInvulnerableCallback(DtSimMessage* msg, void* usrData);
163 
165  static void setFunctionDamageStatusCallback(DtSimMessage* msg, void* usrData);
166 
167 protected:
168 
171  virtual void getImpactZoneFromDirectFire(DtDetonationContext& detonationContext) = 0;
172 
175  virtual void getImpactZoneFromIndirectFire(DtDetonationContext& detonationContext) = 0;
176 
183  virtual bool isCatastrophicallyKilled() const;
184 
190  virtual bool isFirepowerKilled() const;
191 
198  virtual bool isMobilityKilled() const;
199 
205  virtual bool isSensorsKilled() const;
206 
207 
209  virtual DtSymbolString catastrophicKillString() const;
210 
212  virtual DtSymbolString mobilityKillString() const;
213 
215  virtual DtSymbolString firepowerKillString() const;
216 
218  virtual DtSymbolString sensorsKillString() const;
219 
221  virtual bool protectedFromCollateralDamageByEmbarkation() const;
222 
226  virtual void determineDestroyedStatus();
227 
231  virtual void determineDamageIfEmbarked();
232 
233 
236  virtual bool isRegisteredForDetonations() const;
237  virtual void setIsRegisteredForDetonations(bool yesOrNo);
239 
247  virtual void setDestroyed();
248 
251  virtual void setRestored();
252 
254  virtual void processSetInvulnerable(DtSimMessage* msg);
255 
258  virtual void processSetFunctionDamageStatus(DtSimMessage* msg);
259 
264  virtual bool registerForDetonations();
265 
269  virtual bool unregisterForDetonations();
270 
273  virtual void setMobilityKilled(bool consoleWarn = true);
274 
277  virtual void setFirepowerKilled(bool consoleWarn = true);
278 
281  virtual void setSensorsKilled(bool consoleWarn = true);
282 
284  virtual void setRadio(DtSimRadio* radio) override;
285 
287  virtual void triggerDestructionExplosions();
288 
291  virtual void updateDestructionExplosions();
292 
293  virtual void sendDetonation(const DtRwExplosionEntry& explosionEntry);
294 
298  virtual DtVector positionOnEntity(const DtVector& percentOffset);
299 
300 protected:
302 
304 
308 
312 
313  std::set<DtString> myProcessedEvents;
314 
315 private:
316 
318  DtDamageAdjudicationActuator() = delete;
319 
322 
325 };
326 
327 
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
This class allows one to collect and compare strings using an index number instead of having to do st...
Definition: symbolString.h:27
DtDamageAdjudicationComponentDescriptor is used to specify the parameters for the DtDamageAdjudicatio...
Definition: damageAdjudicationComponentDescriptor.h:33
Holds data and provides accessors pertinent to damage adjudication. E.g. time destroyed.
Definition: damageAdjudicationPSR.h:18
Definition: simRadio.h:30
const DtActuatorComponent & operator=(const DtActuatorComponent &orig)
assignment operator
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
virtual void setRadio(DtSimRadio *radio)
Definition: readerWriterRegistry.h:39
End User Description: DtActuator is the base class for all actuator model components. Developer Description: The DtActuator base class caches a pointer to the entity&#39;s radio for convenience. Derived classes may have articulated parts that are configured from the DtActuatorComponentDescriptor&#39;s DtSimArtPartDescriptorList. For each articulated part in the list a DtArticulatedPartStateRepository will be created to store the data for the part such as it&#39;s location, rotation and so forth. These are created in the entity&#39;s DtVrfObjectStateRepository createParts() function. This call creates all the attached parts for all the actuators. These articulated state repositories are managed by the DtAttachmentManager. They are cached by their partType which is the DIS Enumeration describing the part from the disEnums.h file and was specified in the actuator&#39;s DtActuatorComponentDescriptor as descriped above. The partType is used as the category of the DtEntityType used to look up articulated parts in the DtAttachementManager. When an actuator needs access to a particular articulated part it looks it up by the part&#39;s object type.
Definition: actuatorComponent.h:47
DtDamageAdjudicationActuator is responsible for adjudicating the damage from appropriate detonations...
Definition: damageAdjudicationActuator.h:63
std::set< DtString > myProcessedEvents
Definition: damageAdjudicationActuator.h:313
DtDamageAdjudicationComponentDescriptor * myDamageComponentDescriptor
Definition: damageAdjudicationActuator.h:301
DtPrbValueList.
Definition: prbValueList.h:19
DtHumanLocalObjectFacade myHumanLocalObjectFacade
Definition: damageAdjudicationActuator.h:311
File: simMsg.h.
Definition: simMessage.h:35
virtual bool init() override
Overridden to cache a pointer to the entity&#39;s radio in this class.
virtual void tick()
This gives the thread of control to the component. The component is ticked once each simulation from ...
The DtDetonationContext contains all the information necessary for processing a Detonation Interactio...
Definition: detonationContext.h:23
DtDamageAdjudicationPSR * myProcessState
Definition: damageAdjudicationActuator.h:303
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:96
bool myIsRegisteredForDetonations
Keep track of whether or not we&#39;ve registered detonation callbacks with detonation manager...
Definition: damageAdjudicationActuator.h:307
Definition: rwExplosionEntry.h:17
DtPlatformLocalObjectFacade myPlatformLocalObjectFacade
Member to allow for access to platform specific data.
Definition: damageAdjudicationActuator.h:310
virtual const char * type() const =0
Returns a string identifies the class type of component. Type values are defined in compTypes...
A locally simulated VRF object.
Definition: localObject.h:98

Document ID: Generated on Thu Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)