VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
multipleHitDamageActuator.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2012 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
15 
19 
40 {
41 
42 public:
43 
47  DtLocalObject* owner,
48  DtSimulationServices* simManager,
49  DtComponentDescriptor* desc = nullptr,
50  DtReaderWriterRegistry* parentRegistry = nullptr);
51 
54  virtual ~DtMultipleHitDamageActuator() override;
55 
57  virtual bool init() override;
58 
61  virtual bool createPSR() override;
62 
67  virtual void preFirstTickInit() override;
68 
71  virtual void tick() override;
72 
76  virtual bool adjudicateDirectDamage(const DtDetonationContext& detonationContext) override;
77 
81  virtual bool adjudicateCollateralDamage(const DtDetonationContext& detonationContext) override;
82 
85  virtual const char* type() const override;
86 
90  static DtSimComponent * creator(const DtString& name,
91  DtLocalObject* owner,
92  DtSimulationServices* simManager,
93  DtComponentDescriptor* desc = nullptr,
94  DtReaderWriterRegistry* parentRegistry = nullptr);
95 
96 protected:
97 
101  virtual void checkDamageType(const DtDetonationContext& detonationContext, bool isDirectDamage,
102  bool& isDestroyed, bool& isMobKilled, bool& isFPKilled, bool& isSensKilled);
103 
115  virtual bool getProbabilities(const DtDetonationContext& detonationContext,
116  DtPrbValueList& probabilities, bool isDirectDamage = true);
117 
120  virtual void getImpactZoneFromDirectFire(DtDetonationContext& detonationContext) override;
121 
124  virtual void getImpactZoneFromIndirectFire(DtDetonationContext& detonationContext) override;
125 
131  virtual bool assessDamagePoints(const DtDetonationContext& detContext, double& newDamagePoints);
132 
133  virtual bool getDamagePoints(const DtDetonationContext& detContext, DtPrbValueList& damagePointsEntry);
134 
136  virtual DtSymbolString getSurface(DtBoundingVolumeFace impactSurface);
137 
147  virtual bool isFirepowerKilled(DtPrbValueList& probabilities,
148  DtSymbolString firepowerKillString) const;
149 
159  virtual bool isMobilityKilled(DtPrbValueList& probabilities,
160  DtSymbolString mobilityKillString) const;
161 
171  virtual bool isSensorsKilled(DtPrbValueList& probabilities,
172  DtSymbolString sensorsKillString) const;
173 
183  virtual double getPossibleDamagePoints(DtPrbValueList& damagePointsList,
184  DtSymbolString damageString) const;
185 
187  virtual DtSymbolString maximumDamageString() const;
188 
190  virtual DtSymbolString minimumDamageString() const;
191 
192  virtual void setRestored() override;
193 
195  virtual void addDamagePoints(double newDamage, double& newTotalDamage);
196 
197 protected:
198 
202 
209 
210 private:
211 
213  DtMultipleHitDamageActuator() = delete;
214 
217 
220 
221 };
virtual bool init() override
Registers callbacks with the detonation manager. Provides the detonation manager a pointer to the com...
#define DT_DLL_vrfmodel
This file is used to determine how to build.
Definition: vrfmodelDefines.h:24
virtual bool adjudicateCollateralDamage(const DtDetonationContext &detonationContext)
Determines collateral damage from an impact near the entity.
DtDamageAdjudicationActuator & operator=(const DtDamageAdjudicationActuator &orig)=delete
assignment operator; not implemented
This class allows one to collect and compare strings using an index number instead of having to do st...
Definition: symbolString.h:27
virtual void getImpactZoneFromDirectFire(DtDetonationContext &detonationContext)=0
Determines the impact zone–can just be bounding volume surface or a user defined impact zone– from a ...
virtual void preFirstTickInit()
This function can be overridden to initialize a component before it is ticked for the first time...
Definition: multipleHitDamageActuatorDescriptor.h:27
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
const DtMultipleHitDamageActuatorDescriptor * myMultipleHitDamageComponentDescriptor
The descriptor that initializes this actuator. It reads in the initial number of hit points this enti...
Definition: multipleHitDamageActuator.h:201
Definition: readerWriterRegistry.h:39
A damage actuator that keeps track of "Hit Points" for an entity.
Definition: multipleHitDamageActuator.h:38
virtual bool isFirepowerKilled(DtPrbValueList &probabilities, DtSymbolString firepowerKillString) const =0
Determines if the entity is firepower killed by the detonation.
virtual bool isMobilityKilled(DtPrbValueList &probabilities, DtSymbolString mobilityKillString) const =0
Determines if the entity is mobility killed by the detonation.
DtBoundingVolumeFace
Definition: boundingVolumeFace.h:19
virtual const char * type() const override=0
Returns a string identifies the class type of component. Type values are defined in compTypes...
double myTotalDamagePoints
The total damage entity can take before it's destroyed.
Definition: multipleHitDamageActuator.h:204
virtual void setRestored()
Re-registers the entity to receive detonations since it is now restored.
virtual bool createPSR()
Create a process state repository (DtDamageAdjudicationPSR), or a different type if it is specified i...
virtual void tick() override
Determines the destroyed status of the entity, and then checks to see if the flaming and smoking indi...
DtDamageAdjudicationActuator is responsible for adjudicating the damage from appropriate detonations...
Definition: damageAdjudicationActuator.h:66
virtual bool isSensorsKilled(DtPrbValueList &probabilities, DtSymbolString sensorsKillString) const =0
Determines if the entity has its sensors killed by the detonation.
DtMultipleHitDamagePSR * myMHDProcessState
Definition: multipleHitDamageActuator.h:205
DtPrbValueList.
Definition: prbValueList.h:19
virtual void getImpactZoneFromIndirectFire(DtDetonationContext &detonationContext)=0
Determines the impact zon–can just be bounding volume surface or a user defined impact zone– from a i...
The DtDetonationContext contains all the information necessary for processing a Detonation Interactio...
Definition: detonationContext.h:23
Central access point of all non-object-specific the services and managers that are available for use ...
Definition: simulationServices.h:97
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:89
DtString myCurrentId
This is set in adjudicate direct damage to make sure a hit isn't counted twice in a collateral damage...
Definition: multipleHitDamageActuator.h:208
virtual bool adjudicateDirectDamage(const DtDetonationContext &detonationContext)
When a detonation context is received, from the detonation manager, it is processed in order to deter...
class DtMultipleHitDamagePSR:
Definition: multipleHitDamagePSR.h:21
A locally simulated VRF object.
Definition: localObject.h:98

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)