VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
damageImpactZone.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2024 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 
11 #pragma once
12 
14 
15 #include "readerWriter/rwVector.h"
16 #include <readerWriter/rwInt.h>
17 #include <readerWriter/rwString.h>
18 #include <readerWriter/rwBoolean.h>
19 #include <readerWriter/rwReal.h>
20 #include <vrfutil/rwTaitBryan.h>
21 #include "vrfutil/rwTemplatedMap.h"
22 
26 
28 {
29 public:
32  parentRegistry = NULL);
33 
35  parentRegistry = NULL);
36 
38  virtual ~DtDamageImpactZone() override;
39 
41  DtDamageImpactZone(const DtString& name,
42  const DtDamageImpactZone& orig,
43  DtReaderWriterRegistry* parentRegistry = NULL);
44 
45  DtDamageImpactZone(const DtSymbolString& name, const DtDamageImpactZone& orig,
46  DtReaderWriterRegistry* parentRegistry = NULL);
47 
50  const DtDamageImpactZone& orig,
51  DtReaderWriterRegistry* parentRegistry = NULL);
52 
55 
56  virtual DtDamageImpactZone* clone(const DtString& name,
57  DtReaderWriterRegistry* parentRegistry = NULL) const;
58 
61  const DtVector& zoneCenter() const;
62  void setZoneCenter(const DtVector&);
64 
67  const DtVector& zoneOffset() const;
68  void setZoneOffset(const DtVector&);
70 
73  const bool zoneArticulates() const;
74  void setZoneArticulates(const bool);
76 
79  const DtRwTaitBryan zoneOrientation() const;
80  void setZoneOrientation(const DtTaitBryan&);
82 
85  unsigned int zoneId() const;
86  void setZoneId(unsigned int);
88 
91  const DtString& zoneName() const;
92  void setZoneName(const DtString&);
94 
97  unsigned int numberOfHits() const;
98  void setNumberOfHits(unsigned int);
100 
103  double damageTaken() const;
104  void setDamageTaken(double);
106 
107  virtual const char* readerWriterType() const override;
108 
109  virtual DtDamageImpactZone* clone() const;
110 
112  static const char* theXmlType();
113 
114  virtual const char* xmlType() const override {
115  return theXmlType();
116  }
117 
118 private:
121 
122 protected:
123 
127 
132 
137 
142 
148 
153 
158 
163 
168 
170 };
171 
173 
174 inline void DtDamageImpactZone::setZoneCenter(const DtVector& v)
175 {
176  myZoneCenter = v;
177 }
178 
179 inline const DtVector& DtDamageImpactZone::zoneCenter() const
180 {
181  return myZoneCenter;
182 }
183 
184 inline void DtDamageImpactZone::setZoneOffset(const DtVector& v)
185 {
186  myZoneOffset = v;
187 }
188 
189 inline const DtVector& DtDamageImpactZone::zoneOffset() const
190 {
191  return myZoneOffset;
192 }
193 
194 inline void DtDamageImpactZone::setZoneOrientation(const DtTaitBryan& o)
195 {
196  myZoneOrientation = o;
197 }
198 
200 {
201  return myZoneOrientation;
202 }
203 
204 inline void DtDamageImpactZone::setZoneId(unsigned int a)
205 {
206  myZoneId = a;
207 }
208 
209 inline unsigned int DtDamageImpactZone::zoneId() const
210 {
211  return myZoneId;
212 }
213 
214 inline void DtDamageImpactZone::setZoneArticulates(const bool b)
215 {
216  myZoneArticulates = b;
217 }
218 
219 inline const bool DtDamageImpactZone::zoneArticulates() const
220 {
221  return myZoneArticulates;
222 }
223 
225 {
226  myZoneName = s;
227 }
228 
230 {
231  return myZoneName;
232 }
233 
234 inline void DtDamageImpactZone::setNumberOfHits(unsigned int a)
235 {
236  myNumberHits = a;
237 }
238 
239 inline unsigned int DtDamageImpactZone::numberOfHits() const
240 {
241  return myNumberHits;
242 }
243 
245 {
246  myDamageTaken = a;
247 }
248 
249 inline double DtDamageImpactZone::damageTaken() const
250 {
251  return myDamageTaken;
252 }
253 
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...
DtRwTaitBryan myZoneOrientation
Parameter Name: zone-orientation Parameter Description: Used in cases where a zone encases an articul...
Definition: damageImpactZone.h:147
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
Definition: readerWriter.h:85
Description: Readable, Writable DtString Variable substitutions are done on this object when it is re...
Definition: rwString.h:20
const DtVector & zoneOffset() const
Accessor/mutator for myZoneOffset.
Definition: damageImpactZone.h:189
Description: Readable, Writable DtTaitBryan.
Definition: rwTaitBryan.h:20
Definition: readerWriterRegistry.h:39
void setDamageTaken(double)
Accessor/mutator for #myDamagetaken.
Definition: damageImpactZone.h:244
const DtString & zoneName() const
Accessor/mutator for myZoneName.
Definition: damageImpactZone.h:229
DtRwVector myZoneOffset
Parameter Name: zone-offset Parameter Description: offset from center deteriming extents of the zone ...
Definition: damageImpactZone.h:136
double damageTaken() const
Accessor/mutator for #myDamagetaken.
Definition: damageImpactZone.h:249
const DtVector & zoneCenter() const
Accessor/mutator for myZoneCenter.
Definition: damageImpactZone.h:179
void setZoneOffset(const DtVector &)
Accessor/mutator for myZoneOffset.
Definition: damageImpactZone.h:184
void setNumberOfHits(unsigned int)
Accessor/mutator for myNumberHits.
Definition: damageImpactZone.h:234
void setZoneOrientation(const DtTaitBryan &)
Accessor/mutator for myZoneOrientation.
Definition: damageImpactZone.h:194
Contains the DtRwTaitBryan class declaration.
void setZoneName(const DtString &)
Accessor/mutator for myZoneName.
Definition: damageImpactZone.h:224
Definition: rwVector.h:23
DtRwInt myZoneId
Parameter Name: zone-id Parameter Description: A simple int id assigned to the zone Parameter Default...
Definition: damageImpactZone.h:152
void setZoneArticulates(const bool)
Accessor/mutator for myZoneArticulates.
Definition: damageImpactZone.h:214
DtRwTemplatedMapPtr< DtRwInt, DtDamageImpactZone > DtRwDamageImpactZoneMap
Definition: damageImpactZone.h:172
Definition: rwTemplatedMap.h:97
Description: Readable, Writable int.
Definition: rwInt.h:25
const DtRwTaitBryan zoneOrientation() const
Accessor/mutator for myZoneOrientation.
Definition: damageImpactZone.h:199
void setZoneCenter(const DtVector &)
Accessor/mutator for myZoneCenter.
Definition: damageImpactZone.h:174
DtRwBoolean myZoneArticulates
Parameter Name: zone-articulates Parameter Description: Whether or not zone represents an articulatin...
Definition: damageImpactZone.h:141
void setZoneId(unsigned int)
Accessor/mutator for myZoneId.
Definition: damageImpactZone.h:204
Description: Readable, Writable DtReal (double)
Definition: rwReal.h:27
DtRwInt myNumberHits
Parameter Name: number-of-hits Parameter Description: number of times this zone was hit Parameter Def...
Definition: damageImpactZone.h:162
Description: Readable, Writable bool.
Definition: rwBoolean.h:26
DtRwVector myZoneCenter
Parameter Name: zone-center Parameter Description: center in entity&#39;s body coordinates Parameter Def...
Definition: damageImpactZone.h:131
unsigned int numberOfHits() const
Accessor/mutator for myNumberHits.
Definition: damageImpactZone.h:239
const bool zoneArticulates() const
Accessor/mutator for myZoneArticulates.
Definition: damageImpactZone.h:219
DtRwString myZoneName
Parameter Name: zone-name Parameter Description: Free form string that will give the name of this zon...
Definition: damageImpactZone.h:157
const DtReaderWriter & operator=(const DtReaderWriter &orig)
assignment operator
DtDamageImpactZone.
Definition: damageImpactZone.h:27
unsigned int zoneId() const
Accessor/mutator for myZoneId.
Definition: damageImpactZone.h:209
static const char * theXmlType()
The type that is used when archiving to an XML stream.
virtual const char * xmlType() const override
Definition: damageImpactZone.h:114
DtRwReal myDamageTaken
Parameter Name: damage-points-taken Parameter Description: how much damage this zone has incurred Par...
Definition: damageImpactZone.h:167
File: rwVector.h.

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)