VR-Forces 5.0.3 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 
18 
22 class DtSimMessage;
23 class DtSimRadio;
24 class DtPrbValueList;
25 class DtRwExplosionEntry;
26 
43 
62 
65 {
66 
67 public:
68 
72  DtLocalObject* owner,
73  DtSimulationServices* simManager,
74  DtComponentDescriptor* desc = 0,
75  DtReaderWriterRegistry* parentRegistry = 0);
76 
80 
90  virtual bool init();
91 
94  virtual bool createPSR();
95 
102  static bool processDirectDetonationCallback(const DtDetonationContext& detonationContext, void* usr);
103 
110  static bool processCollateralDetonationCallback(const DtDetonationContext& detonationContext, void* usr);
111 
134 
136  virtual bool adjudicateDirectDamage(const DtDetonationContext& detonationContext);
137 
139  virtual bool adjudicateCollateralDamage(const DtDetonationContext& detonationContext);
140 
143  virtual const char* type() const;
144 
154  virtual void tick();
155 
157  static void setDestroyedCallback(DtSimMessage* msg, void* usrData);
158 
160  static void setRestoredCallback(DtSimMessage* msg, void* usrData);
161 
163  static void setInvulnerableCallback(DtSimMessage* msg, void* usrData);
164 
166  static void setFunctionDamageStatusCallback(DtSimMessage* msg, void* usrData);
167 
171  static DtSimComponent * creator(const DtString& name,
172  DtLocalObject* owner,
173  DtSimulationServices* simManager,
174  DtComponentDescriptor* desc = 0,
175  DtReaderWriterRegistry* parentRegistry = 0);
176 
177 protected:
178 
181  virtual void getDirectFireSurfaceAndAngleOfIncidence(DtDetonationContext& detonationContext);
182 
185  virtual void getIndirectFireSurfaceAndAngleOfIncidence(DtDetonationContext& detonationContext);
186 
188  virtual DtSymbolString getSurface(DtBoundingVolumeFace impactSurface);
189 
201  virtual bool getProbabilities(const DtDetonationContext& detonationContext,
202  DtPrbValueList& probabilities, bool isDirectDamage = true) const;
203 
214  virtual bool isCatastrophicallyKilled(DtPrbValueList& probabilities,
215  DtSymbolString catastrophicKillString) const;
216 
226  virtual bool isFirepowerKilled(DtPrbValueList& probabilities,
227  DtSymbolString firepowerKillString) const;
228 
238  virtual bool isMobilityKilled(DtPrbValueList& probabilities,
239  DtSymbolString mobilityKillString) const;
240 
250  virtual bool isSensorsKilled(DtPrbValueList& probabilities,
251  DtSymbolString sensorsKillString) const;
252 
253 
255  virtual DtSymbolString catastrophicKillString() const;
256 
258  virtual DtSymbolString mobilityKillString() const;
259 
261  virtual DtSymbolString firepowerKillString() const;
262 
264  virtual DtSymbolString sensorsKillString() const;
265 
267  virtual bool protectedFromCollateralDamageByEmbarkation() const;
268 
275  virtual void determineDestroyedStatus();
276 
277 
280  virtual bool isRegisteredForDetonations() const;
281  virtual void setIsRegisteredForDetonations(bool yesOrNo);
283 
291  virtual void setDestroyed();
292 
295  virtual void setRestored();
296 
298  virtual void processSetInvulnerable(DtSimMessage* msg);
299 
302  virtual void processSetFunctionDamageStatus(DtSimMessage* msg);
303 
308  virtual bool registerForDetonations();
309 
313  virtual bool unregisterForDetonations();
314 
316  virtual void setMobilityKilled();
317 
319  virtual void setFirepowerKilled();
320 
322  virtual void setSensorsKilled();
323 
325  virtual void setRadio(DtSimRadio* radio);
326 
328  virtual void triggerDestructionExplosions();
329 
332  virtual void updateDestructionExplosions();
333 
334  virtual void sendDetonation(const DtRwExplosionEntry& explosionEntry);
335 
339  virtual DtVector positionOnEntity(const DtVector& percentOffset);
340 
341 protected:
343 
345 
349 
353 
354 private:
355 
358 
361 
364 };
365 
366 
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
Definition: symbolString.h:20
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
virtual bool init()
Overridden to cache a pointer to the entity's radio in this class.
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's radio for convenience. Derived classes may have articulated parts that are configured from the DtActuatorComponentDescriptor's DtSimArtPartDescriptorList. For each articulated part in the list a DtArticulatedPartStateRepository will be created to store the data for the part such as it's location, rotation and so forth. These are created in the entity'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's DtActuatorComponentDescriptor as descriped above. The partType is used as the category of the DtObjectType 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's object type.
Definition: actuatorComponent.h:47
DtBoundingVolumeFace
Definition: boundingVolumeFace.h:16
DtDamageAdjudicationActuator is responsible for adjudicating the damage from appropriate detonations...
Definition: damageAdjudicationActuator.h:64
DtDamageAdjudicationComponentDescriptor * myDamageComponentDescriptor
Definition: damageAdjudicationActuator.h:342
DtPrbValueList.
Definition: prbValueList.h:19
DtHumanLocalObjectFacade myHumanLocalObjectFacade
Definition: damageAdjudicationActuator.h:352
File: simMsg.h.
Definition: simMessage.h:35
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:344
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:90
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:70
bool myIsRegisteredForDetonations
Keep track of whether or not we've registered detonation callbacks with detonation manager...
Definition: damageAdjudicationActuator.h:348
Definition: rwExplosionEntry.h:17
DtPlatformLocalObjectFacade myPlatformLocalObjectFacade
Member to allow for access to platform specific data.
Definition: damageAdjudicationActuator.h:351
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. Holds all internal and external data for the object, and provides access to both the current frame and next frame state data for the object. All current frame data is read-only, and next-frame data can be written to. No thread safety guarantees are made on this object during the simulation frame and it should only be accessed by the thread that is simulating the object.
Definition: localObject.h:86

Document ID: Generated on Thu Jun 1 17:58:13 EDT 2023 from SVN revision 255404
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)