VR-Forces 4.6.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
dynamicTerrainCommand.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2016 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
9 #pragma once
10 
11 #include "vrfplan/simCommand.h"
12 #include "vrfplan/vrfplanDefines.h"
13 #include "vrfutil/rwInt.h"
14 #include "vrfutil/rwReal.h"
15 #include "vrfutil/rwKeyValueList.h"
16 #include "vrfutil/rwVectorList.h"
17 
21 {
22 public:
23 
25  {
28  WholeWorld
29  };
30 
33 
35  DtDynamicTerrainCommand(const DtString& writeName,
36  DtReaderWriterRegistry* parentRegistry = NULL);
37 
39  DtDynamicTerrainCommand(const DtString & writeName, const DtDynamicTerrainCommand& orig,
40  DtReaderWriterRegistry* parentRegistry = NULL);
41 
43  virtual ~DtDynamicTerrainCommand();
44 
47 
49 
50  virtual void setGeometryType(GeometryType geomType);
51  virtual GeometryType geometryType() const;
53 
56 
57  virtual void setCenterOfCircle(const DtVector& location);
58  virtual DtVector centerOfCircle() const;
60 
63 
64  virtual void setRadiusOfCircle(double radius);
65  virtual double radiusOfCircle() const;
67 
70 
71  virtual void setVerticesOfPolygon(const DtRwVectorList& locations);
72  virtual const DtRwVectorList& verticesOfPolygon() const;
73  virtual void addVertexToPolygon(const DtVector& location);
75 
77 
78  virtual void setChanges(const std::map<DtString, DtString>& changes);
79  virtual void setChanges(const DtRwKeyValueList& changes);
80  virtual const DtRwKeyValueList& changes() const;
81  virtual void addChange(const DtString& changeType, const DtString& changeVal);
83 
85  virtual DtString stringRep() const;
86 
88  virtual int netRepSize() const;
89 
91  virtual bool setFromNet(const char* contentBuffer,
92  unsigned contentSize);
93 
95  virtual bool setToNet();
96 
97 protected:
103 };
104 
105 template<class CommandType>
107 {
108  return new CommandType();
109 }
110 
111 
115 {
116 public:
117 
119 
121  DtReaderWriterRegistry* parentRegistry = NULL)
122  : DtDynamicTerrainCommand(writeName, parentRegistry) {};
123 
125  DtReaderWriterRegistry* parentRegistry = NULL)
126  : DtDynamicTerrainCommand(writeName, orig, parentRegistry) {};
127 
129 
131 
132  virtual DtSimCommand* clone(const DtString & name, DtReaderWriterRegistry* parentRegistry = 0) const
133  { return new DtAddDynamicTerrainChangesCommand(name, *this, parentRegistry); }
134 
135 };
136 
140 {
141 public:
142 
144 
146  DtReaderWriterRegistry* parentRegistry = NULL)
147  : DtDynamicTerrainCommand(writeName, parentRegistry) {};
148 
150  DtReaderWriterRegistry* parentRegistry = NULL)
151  : DtDynamicTerrainCommand(writeName, orig, parentRegistry) {};
152 
154 
156 
157  virtual DtSimCommand* clone(const DtString & name, DtReaderWriterRegistry* parentRegistry = 0) const
158  { return new DtResetDynamicTerrainChangesCommand(name, *this, parentRegistry); }
159 
161 
162  virtual void setChangesToReset(const std::vector<DtString>& changes);
163  virtual std::vector<DtString> changesToReset() const;
164  virtual void addChangeToReset(const DtString& changeType);
166 };
167 
171 {
172 public:
173 
175 
177  DtReaderWriterRegistry* parentRegistry = NULL)
178  : DtDynamicTerrainCommand(writeName, parentRegistry) {};
179 
181  DtReaderWriterRegistry* parentRegistry = NULL)
182  : DtDynamicTerrainCommand(writeName, orig, parentRegistry) {};
183 
185 
187 
188  virtual DtSimCommand* clone(const DtString & name, DtReaderWriterRegistry* parentRegistry = 0) const
189  { return new DtRemoveDynamicTerrainDamageCommand(name, *this, parentRegistry); }
190 
191 };
192 

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)