VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
damageProbabilityTable.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2016 MaK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 #pragma once
11 
12 #include "vrfutil/simMunition.h"
15 #include <readerWriter/rwReal.h>
16 
21 {
22 public:
25 
28  parentRegistry = NULL);
29 
31  parentRegistry = NULL);
32 
35  DtReaderWriterRegistry* parentRegistry = NULL);
36 
38  DtReaderWriterRegistry* parentRegistry = NULL);
39 
41 
44 
45  virtual ~DtDamageProbabilityTable() override;
46 
47  virtual DtDamageProbabilityTable* clone(const DtString& name,
48  DtReaderWriterRegistry* parentRegistry = NULL) const;
49 
50  virtual DtDamageProbabilityTable* clone(const DtSymbolString& name,
51  DtReaderWriterRegistry* parentRegistry = NULL) const;
52 
53  virtual void getSelf(DtlObjPtr args, const DtReaderWriter::SearchPaths& searchPaths = SearchPaths(),
54  const DtVariableBindingsList& variableBindings = nullVariableReference()) override;
55 
56  virtual void putSelf(std::string& fp, int indentLevel = 0, bool writeUnspecified = false,
57  const DtFilename& path = DtFilename::nullFilename()) override;
58 
61  virtual const DtString& damageFilename() const;
62  virtual void setDamageFilename(const DtString& filename);
64 
66  virtual void addSurfaceEntry(const DtDmgSurfaceEntry& surfaceEntry);
67 
70  virtual bool getProbabilities(const DtString& surface, DtReal angleOfIncidence,
71  DtReal value, DtPrbValueList* probList) const;
72 
74  virtual double getMaximumInputValue() const;
75 
77  virtual double getMinimumInputValue() const;
78 
80  virtual bool isValid() const;
81 
84  {
85  return myDamageTable;
86  }
87 
89  {
90  return myDamageTable;
91  }
92 
94  bool operator==(const DtDamageProbabilityTable& rhs) const;
95  bool operator!=(const DtDamageProbabilityTable& rhs) const
96  {
97  return !(*this == rhs);
98  }
99 
101  static const char* theXmlType();
102 
103  virtual const char* xmlType() const override {
104  return theXmlType();
105  }
106 
107  virtual const char* readerWriterType() const override;
108 
109 protected:
111  virtual void removeSurfaceEntry(DtDmgSurfaceEntry* surfaceEntry);
112 
113 protected:
117 
122 
127 
129 };
130 
131 
bool operator==(const DtReaderWriter &) const
Equivalence operator.
virtual const char * readerWriterType() const
Used to supply a string type that this reader writer type is. This can be used in place of dynamic-ca...
const DtDmgSurfaceTable & damageTable() const
Return the damage table.
Definition: damageProbabilityTable.h:83
This class allows one to collect and compare strings using an index number instead of having to do st...
Definition: symbolString.h:27
#define DT_DLL_vrfobjparam
This file is used to determine how to build.
Definition: vrfobjparamDefines.h:28
Instances of DtDmgSurfaceTable are (readable/writable) lists of DtDmgSurfaceEntrys. A string hash index is maintained for quick lookup. Given a surface, angle, and some input value, this class&#39;s getProbabilities() method will fill in the supplied DtPrbValueList.
Definition: dmgSurfaceTable.h:25
bool operator!=(const DtDamageProbabilityTable &rhs) const
Definition: damageProbabilityTable.h:95
Definition: readerWriter.h:85
Definition: readerWriterRegistry.h:39
This file contains the class declaration for the.
DtDmgSurfaceTable & damageTable()
Definition: damageProbabilityTable.h:88
DtPrbValueList.
Definition: prbValueList.h:19
std::list< const DtRwVariableBindings * > DtVariableBindingsList
Definition: readerWriterRegistry.h:29
std::vector< DtFilename > SearchPaths
Definition: readerWriter.h:92
DtDmgSurfaceTable myDamageTable
Parameter Name: damage-table Parameter Description: The damage table used to determine damage based o...
Definition: damageProbabilityTable.h:126
DtDamageProbabilityTable.
Definition: damageProbabilityTable.h:20
virtual void getSelf(DtlObjPtr args, const DtReaderWriter::SearchPaths &searchPaths=SearchPaths(), const DtVariableBindingsList &variableBindings=nullVariableReference())
Top level to read itself from an input stream. searchPath is passed down to all DtReaderWriter member...
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...
static const DtVariableBindingsList & nullVariableReference()
virtual const char * xmlType() const override
Definition: damageProbabilityTable.h:103
DtDmgSurfaceEntry is a readable/writable list of angle of incidence tables; the name of the list is a...
Definition: dmgSurfaceEntry.h:29
DtReaderWriterFile myDamageFile
Parameter Name: damage-file Parameter Description: The damage file to read in from Parameter Default ...
Definition: damageProbabilityTable.h:121
const DtReaderWriter & operator=(const DtReaderWriter &orig)
assignment operator
static const char * theXmlType()
The type that is used when archiving to an XML stream.
Using a DtReaderWriterFile allows a DtReaderWriter object to be read in from an MTL stream contained ...
Definition: readerWriterFile.h:35

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)