VR-Forces 5.0.3 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 
56 
59  virtual DtString type() const;
60 
62  DtReaderWriterRegistry* parentRegistry = NULL) const;
63 
65  virtual bool init();
66 
73  virtual const DtDmgMunitionTable* damageModel() const;
74 
75  virtual void setDamageModel(const DtDmgMunitionTable* model);
76 
79  virtual const DtDamageByMunitionPowerMap& damageModelByMunitionPower() const;
80  virtual void setDamageModelByMunitionPower(const DtDamageByMunitionPowerMap& model);
82 
85  virtual DtReal smokeTime() const;
86  virtual void setSmokeTime(DtReal smokeTime);
88 
91  virtual DtTime flameTime() const;
92  virtual void setFlameTime(DtTime flameTime);
94 
97  virtual bool terminateOnDestroy() const;
98  virtual void setTerminateOnDestroy(bool yesNo);
100 
102 
103  virtual bool explodeWhenDestroyed() const;
104  virtual void setExplodeWhenDestroyed(bool b);
106 
108 
109  virtual DtRwExplosionList& explosionList();
110  virtual const DtRwExplosionList& explosionList() const;
112 
116 
117  virtual bool getDirectKillProbabilities(const DtSimMunition& munition,
118  const DtString& surface, DtReal angleOfIncidence, DtReal range,
119  const DetonationPowerMap& powers, DtPrbValueList * probabilities) const;
120 
121  virtual bool getCollateralDamageProbabilities(const DtSimMunition& munition,
122  const DtString& surface, DtReal angleOfIncidence, DtReal range,
123  const DetonationPowerMap& powers, DtPrbValueList * probabilities) const;
125 
128  virtual void putSelf(std::string& fp, int indentLevel = 0,
129  bool writeUnspecified = false,
130  const DtFilename& path = DtReaderWriter::appPath());
131 
133  static DtComponentDescriptor* creator();
134 
135 protected:
138 
139 protected:
143 
150 
157 
163 
169 
175 
181 
187 
190 };
virtual DtComponentDescriptor * clone(DtReaderWriterRegistry *parentRegistry=0) const
DtActuatorComponentDescriptor & operator=(const DtActuatorComponentDescriptor &orig)
assignment
Definition: symbolString.h:20
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:149
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
DtRwTime myFlameTime
Parameter Name: flame-time Parameter Description: The time the flaming appearance indicator will be t...
Definition: damageAdjudicationComponentDescriptor.h:156
virtual DtString type() const
Returns the type of component this descriptor describes. Used to create the descriptor on read from a...
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:180
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:162
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:189
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:174
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:186
const DtDmgMunitionTable * myDamageModel
Parameter Name: damage-model Parameter Description: Damage model for direct or collateral damage from...
Definition: damageAdjudicationComponentDescriptor.h:168

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)