VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
damageAdjudicationComponentDescriptor.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2013 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
11 
12 #pragma once
13 
17 #include <readerWriter/rwReal.h>
18 #include "vrfutil/simClock.h"
19 #include <readerWriter/rwBoolean.h>
20 #include "vrfutil/rwTemplatedMap.h"
22 
23 
24 class DtSimMunition;
26 
28 typedef std::map<DtRwString, DtDamageProbabilityTable> DtDamageByMunitionPowerMap;
29 
34 {
35 public:
36 
37  typedef std::map<DtString, double> DetonationPowerMap;
38 
41  DtReaderWriterRegistry* parentRegistry = NULL);
42 
48  DtReaderWriterRegistry* parentRegistry = NULL);
49 
53 
55  virtual ~DtDamageAdjudicationComponentDescriptor() override;
56 
59  virtual DtString type() const override;
60 
61  virtual DtComponentDescriptor* clone(DtReaderWriterRegistry* parentRegistry = NULL) const override;
62 
64  virtual bool init() override;
65 
72  virtual const DtDmgMunitionTable* damageModel() const;
73 
74  virtual void setDamageModel(const DtDmgMunitionTable* model);
75 
78  virtual const DtDamageByMunitionPowerMap& damageModelByMunitionPower() const;
79  virtual void setDamageModelByMunitionPower(const DtDamageByMunitionPowerMap& model);
81 
84  virtual DtReal smokeTime() const;
85  virtual void setSmokeTime(DtReal smokeTime);
87 
90  virtual DtTime flameTime() const;
91  virtual void setFlameTime(DtTime flameTime);
93 
96  virtual bool terminateOnDestroy() const;
97  virtual void setTerminateOnDestroy(bool yesNo);
99 
101 
102  virtual bool explodeWhenDestroyed() const;
103  virtual void setExplodeWhenDestroyed(bool b);
105 
107 
108  virtual bool movementKillOnOneHitZoneDamaged() const;
109  virtual void setMovmentKillOnOneHitZoneDamaged(bool b);
111 
113 
114  virtual bool weaponKillOnOneHitZoneDamaged() const;
115  virtual void setWeaponKillOnOneHitZoneDamaged(bool b);
117 
119 
120  virtual bool sensorsKillOnOneHitZoneDamaged() const;
121  virtual void setSensorsKillOnOneHitZoneDamaged(bool b);
123 
125  virtual bool functionKillOnOneHitZoneDamaged(DtU8 function);
126 
128 
129  virtual DtRwExplosionList& explosionList();
130  virtual const DtRwExplosionList& explosionList() const;
132 
134 
135  virtual bool showHitZoneBoundingVolumeTaskVis() const;
136  virtual void setShowHitZoneBoundingVolumeTaskVis(bool b);
138 
140 
141  virtual bool showDetonationInformationTaskVis() const;
142  virtual void setShowDetonationInformationTaskVis(bool b);
144 
148 
149  virtual bool getMunitionDirectKillProbabilities(const DtSimMunition& munition,
150  const DtString& surface, DtReal angleOfIncidence, DtReal range,
151  DtPrbValueList * probabilities) const;
152 
153  virtual bool getPowerDirectKillProbabilities(const DtSimMunition& munition,
154  const DtString& surface, DtReal angleOfIncidence, DtReal range,
155  const DetonationPowerMap& powers, DtPrbValueList * probabilities) const;
156 
157  virtual bool getMunitionCollateralDamageProbabilities(const DtSimMunition& munition,
158  const DtString& surface, DtReal angleOfIncidence, DtReal range,
159  DtPrbValueList * probabilities) const;
160 
161  virtual bool getPowerCollateralDamageProbabilities(const DtSimMunition& munition,
162  const DtString& surface, DtReal angleOfIncidence, DtReal range,
163  const DetonationPowerMap& powers, DtPrbValueList * probabilities) const;
165 
168  virtual void putSelf(std::string& fp, int indentLevel = 0, bool writeUnspecified = false,
169  const DtFilename& path = DtReaderWriter::appPath()) override;
170 
172  static DtComponentDescriptor* creator();
173 
174 protected:
177 
178 protected:
182 
189 
196 
202 
208 
214 
220 
226 
233 
240 
247 
252 
257 
260 };
DtActuatorComponentDescriptor & operator=(const DtActuatorComponentDescriptor &orig)
assignment
This class allows one to collect and compare strings using an index number instead of having to do st...
Definition: symbolString.h:27
DtRwTemplatedMapPtr< DtRwString, DtDamageProbabilityTable > DtRwDamageByMunitionPowerMap
Definition: damageAdjudicationComponentDescriptor.h:25
DtDamageAdjudicationComponentDescriptor is used to specify the parameters for the DtDamageAdjudicatio...
Definition: damageAdjudicationComponentDescriptor.h:33
#define DT_DLL_vrfobjparam
This file is used to determine how to build.
Definition: vrfobjparamDefines.h:28
End User Description: DtActuatorComponentDescriptor contains parameters common to all actuator compon...
Definition: actuatorComponentDescriptor.h:47
DtRwBoolean myShowHitZoneBoundingVolumeTaskVis
Parameter Name: show-hit-zone-bounding-volume-task-vis Parameter Description: Parameter Default Value...
Definition: damageAdjudicationComponentDescriptor.h:251
DtRwTime mySmokeTime
Parameter Name: smoke-time Parameter Description: The time the smoking appearance indicator will be t...
Definition: damageAdjudicationComponentDescriptor.h:188
virtual bool init()
Base class init does nothing, but will be called by createComponentDescriptor(), allowing derived cla...
A readable, writable type whose name is the name of a component and that has a list of component name...
Definition: componentDescriptor.h:49
Definition: readerWriterRegistry.h:39
virtual DtComponentDescriptor * clone(DtReaderWriterRegistry *parentRegistry=0) const override
DtRwTime myFlameTime
Parameter Name: flame-time Parameter Description: The time the flaming appearance indicator will be t...
Definition: damageAdjudicationComponentDescriptor.h:195
std::map< DtString, double > DetonationPowerMap
Definition: damageAdjudicationComponentDescriptor.h:37
DtPrbValueList.
Definition: prbValueList.h:19
DtRwBoolean mySensorsKillOnOneHitZoneDamaged
Parameter Name: sensors-kill-on-one-hit-zone-damaged Parameter Description: If true, entity will be function killed when one hit zone associated with that function is damaged. if false, all of the hit zones associated with that function will need to be damaged for this function to be killed. Parameter Default Value: false. .
Definition: damageAdjudicationComponentDescriptor.h:246
File: vlClock.h.
DtRwBoolean myExplodeWhenDestroyed
Parameter Name: explode-when-destroyed Parameter Description: If true, entity will create one or more...
Definition: damageAdjudicationComponentDescriptor.h:219
virtual DtString type() const override
Returns the type of component this descriptor describes. Used to create the descriptor on read from a...
virtual void putSelf(std::string &fp, int indentLevel=0, bool writeUnspecified=false, const DtFilename &path=DtFilename::nullFilename())
Top level call to write itself to file. If write unspecified is true, will write entries that are uns...
Description: Readable, Writable DtReal (double)
Definition: rwReal.h:27
static DtComponentDescriptor * creator()
Description: Readable, Writable bool.
Definition: rwBoolean.h:26
DtRwBoolean myTerminateOnDestroy
Parameter Name: terminate-on-destroy Parameter Description: The flag that determines whether the enti...
Definition: damageAdjudicationComponentDescriptor.h:201
DtRwBoolean myShowDetonationInformationTaskVis
Parameter Name: show-detonation-information-task-vis Parameter Description: Parameter Default Value: ...
Definition: damageAdjudicationComponentDescriptor.h:256
DtRwBoolean myWeaponKillOnOneHitZoneDamaged
Parameter Name: weapon-kill-on-one-hit-zone-damaged Parameter Description: If true, entity will be function killed when one hit zone associated with that function is damaged. if false, all of the hit zones associated with that function will need to be damaged for this function to be killed. Parameter Default Value: false. .
Definition: damageAdjudicationComponentDescriptor.h:239
DtDmgMunitionTable is the parameter that specifies the damage model for an entity. An entity may choose not to have a damage model, so this class uses the setValueSpecified() capability of DtReaderWriter to support being an optional argument.
Definition: dmgMunitionTable.h:25
std::map< DtRwString, DtDamageProbabilityTable > DtDamageByMunitionPowerMap
Definition: damageAdjudicationComponentDescriptor.h:28
bool myOwnDamageModel
Definition: damageAdjudicationComponentDescriptor.h:259
DtSimMunition class.
Definition: simMunition.h:31
DtRwDamageByMunitionPowerMap myDamageModelByMunitionPower
Parameter Name: damage-by-munition-power Parameter Description: Damage model based on the power of th...
Definition: damageAdjudicationComponentDescriptor.h:213
static const DtFilename & appPath()
Gets the current working directory. The first time this accessor is called, it determines the current...
DtRwExplosionList myExplosionList
Parameter Name: explosion-list Parameter Description: List of explosions that will occur when the ent...
Definition: damageAdjudicationComponentDescriptor.h:225
DtRwBoolean myMovementKillOnOneHitZoneDamaged
Parameter Name: movement-kill-on-one-hit-zone-damaged Parameter Description: If true, entity will be function killed when one hit zone associated with that function is damaged. if false, all of the hit zones associated with that function will need to be damaged for this function to be killed. Parameter Default Value: false. .
Definition: damageAdjudicationComponentDescriptor.h:232
const DtDmgMunitionTable * myDamageModel
Parameter Name: damage-model Parameter Description: Damage model for direct or collateral damage from...
Definition: damageAdjudicationComponentDescriptor.h:207

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)