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 DtRwExplosionList& explosionList();
109  virtual const DtRwExplosionList& explosionList() const;
111 
115 
116  virtual bool getMunitionDirectKillProbabilities(const DtSimMunition& munition,
117  const DtString& surface, DtReal angleOfIncidence, DtReal range,
118  DtPrbValueList * probabilities) const;
119 
120  virtual bool getPowerDirectKillProbabilities(const DtSimMunition& munition,
121  const DtString& surface, DtReal angleOfIncidence, DtReal range,
122  const DetonationPowerMap& powers, DtPrbValueList * probabilities) const;
123 
124  virtual bool getMunitionCollateralDamageProbabilities(const DtSimMunition& munition,
125  const DtString& surface, DtReal angleOfIncidence, DtReal range,
126  DtPrbValueList * probabilities) const;
127 
128  virtual bool getPowerCollateralDamageProbabilities(const DtSimMunition& munition,
129  const DtString& surface, DtReal angleOfIncidence, DtReal range,
130  const DetonationPowerMap& powers, DtPrbValueList * probabilities) const;
132 
135  virtual void putSelf(std::string& fp, int indentLevel = 0, bool writeUnspecified = false,
136  const DtFilename& path = DtReaderWriter::appPath()) override;
137 
139  static DtComponentDescriptor* creator();
140 
141 protected:
144 
145 protected:
149 
156 
163 
169 
175 
181 
187 
193 
196 };
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
DtRwTime mySmokeTime
Parameter Name: smoke-time Parameter Description: The time the smoking appearance indicator will be t...
Definition: damageAdjudicationComponentDescriptor.h:155
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:162
std::map< DtString, double > DetonationPowerMap
Definition: damageAdjudicationComponentDescriptor.h:37
DtPrbValueList.
Definition: prbValueList.h:19
File: vlClock.h.
DtRwBoolean myExplodeWhenDestroyed
Parameter Name: explode-when-destroyed Parameter Description: If true, entity will create one or more...
Definition: damageAdjudicationComponentDescriptor.h:186
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:168
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:195
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:180
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:192
const DtDmgMunitionTable * myDamageModel
Parameter Name: damage-model Parameter Description: Damage model for direct or collateral damage from...
Definition: damageAdjudicationComponentDescriptor.h:174

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)