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 = true);
102 
114  virtual bool getProbabilities(const DtDetonationContext& detonationContext,
115  DtPrbValueList& probabilities, bool isDirectDamage = true);
116 
119  virtual void getImpactZoneFromDirectFire(DtDetonationContext& detonationContext) override;
120 
123  virtual void getImpactZoneFromIndirectFire(DtDetonationContext& detonationContext) override;
124 
130  virtual bool assessDamagePoints(const DtDetonationContext& detContext);
131 
132  virtual bool getDamagePoints(const DtDetonationContext& detContext, DtPrbValueList& damagePointsEntry);
133 
135  virtual DtSymbolString getSurface(DtBoundingVolumeFace impactSurface);
136 
146  virtual bool isFirepowerKilled(DtPrbValueList& probabilities,
147  DtSymbolString firepowerKillString) const;
148 
158  virtual bool isMobilityKilled(DtPrbValueList& probabilities,
159  DtSymbolString mobilityKillString) const;
160 
170  virtual bool isSensorsKilled(DtPrbValueList& probabilities,
171  DtSymbolString sensorsKillString) const;
172 
182  virtual double getPossibleDamagePoints(DtPrbValueList& damagePointsList,
183  DtSymbolString damageString) const;
184 
186  virtual DtSymbolString maximumDamageString() const;
187 
189  virtual DtSymbolString minimumDamageString() const;
190 
191  virtual void setRestored() override;
192 
194  virtual void setDamagePoints(double current);
195 
196 protected:
197 
201 
208 
209 private:
210 
212  DtMultipleHitDamageActuator() = delete;
213 
216 
219 
220 };
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
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:200
Definition: readerWriterRegistry.h:39
A damage actuator that keeps track of "Hit Points" for an entity.
Definition: multipleHitDamageActuator.h:38
virtual bool adjudicateDirectDamage(const DtDetonationContext &detonationContext)=0
When a detonation context is received, from the detonation manager, it is processed in order to deter...
DtBoundingVolumeFace
Definition: boundingVolumeFace.h:19
virtual bool adjudicateCollateralDamage(const DtDetonationContext &detonationContext)=0
Determines collateral damage from an impact near the entity.
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:203
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:63
DtMultipleHitDamagePSR * myMHDProcessState
Definition: multipleHitDamageActuator.h:204
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:96
The DtSimComponent class is the base class for the entire simulation model component hierarchy...
Definition: simComponent.h:89
virtual bool isSensorsKilled() const
Determines if the entity has its sensors killed by the detonation.
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:207
class DtMultipleHitDamagePSR:
Definition: multipleHitDamagePSR.h:21
virtual bool isFirepowerKilled() const
Determines if the entity is firepower killed by the detonation.
A locally simulated VRF object.
Definition: localObject.h:98
virtual bool isMobilityKilled() const
Determines if the entity is mobility killed by the detonation.

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)