VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
localObjectCreateInformation.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2021 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
6 #pragma once
7 
9 #include "vrfutil/rwUUID.h"
11 #include "vlpi/entityIdentifier.h"
12 #include "matrix/vlVector.h"
13 #include "matrix/vlVector.h"
14 #include "vlpi/disEnums.h"
15 
16 #include <vector>
17 #include <list>
18 
20 class DtLocalObject;
21 class DtAdminContent;
23 
25 typedef bool(*DtVrfObjectUserInitFcn)(DtLocalObject* vrfObject, void* usr);
26 
27 namespace makVrf
28 {
29  class DtExternalCurrentFrameState;
30 }
31 
36 {
37 public:
40 
43 
46 
50 
53 
54  void setUUID(const DtUUID&);
55  const DtUUID& uuid() const;
56 
57  void setOverlay(const DtString&);
58  const DtString& overlay() const;
59 
60  void setObjectType(const DtObjectType&);
61  const DtObjectType& objectType() const;
62 
64  void setPublishFlag(int);
65  void setPublishObject(bool);
66  bool publishObject() const ;
67  int publishFlag() const;
68 
69  void setEntityIdentifier(const DtEntityIdentifier&);
70  const DtEntityIdentifier& entityIdentifier() const;
71 
72  void setLabel(const DtString&);
73  const DtString& label() const;
74 
75  void setExtendedLabels(const std::map<int, DtString>&);
76  const std::map<int, DtString>& extendedLabels() const;
77 
79  void setPosition(const DtVector& geocLocation);
80 
82  DtVector position() const;
83  DtVector endPosition() const;
84 
85  const std::vector<DtVector>& vertices() const;
86  std::vector<DtVector>& vertices();
87 
89  void setVertices(const DtList&);
90  void setVertices(const std::vector<DtVector>&);
91  void addVertex(const DtVector&);
92 
93  const DtTaitBryan& orientation() const;
94  void setOrientation(const DtTaitBryan&);
95 
98  void setColor(int);
99  int color() const;
100  bool colorSet() const;
101  void clearColor();
103 
106  void setLineWidth(int);
107  int lineWidth() const;
108  bool lineWidthSet() const;
109  void clearLineWidth();
111 
114  void setPenStyle(int);
115  int penStyle() const;
116  bool penStyleSet() const;
117  void clearPenStyle();
119 
122  void setFillStyle(int);
123  int fillStyle() const;
124  bool fillStyleSet() const;
125  void clearFillStyle();
127 
130  void setWorldVelocity(const DtVector&);
131  const DtVector& worldVelocity() const;
132  bool worldVelocitySet() const;
133  void clearWorldVelocity();
134 
135  void setWorldOrientation(const DtTaitBryan&);
136  const DtTaitBryan& worldOrientation() const;
137  bool worldOrientationSet() const;
138  void clearWorldOrientation();
140 
141  void setAmClampedToGround(bool);
142  bool amClampedToGround() const;
143 
145  void setHeading(double rad);
146  double heading() const;
147 
149  void setPitch(double rad);
150  double pitch() const;
151 
153  void setRoll(double rad);
154  double roll() const;
155 
156  void setObjectName(const DtString&);
157  const DtString& objectName() const;
158 
160  void setObjectNamePrefix(const DtString&);
161  const DtString& objectNamePrefix() const;
162 
163  void setForceType(DtForceType);
164  DtForceType forceType() const;
165 
168  void setClampToGround(bool);
169  bool clampToGround() const;
170 
172  void setProjected(bool);
173  bool projected() const;
174 
176  void setIsClutterEntity(bool);
177  bool isClutterEntity() const;
178 
180  void setClosedFigure(bool);
181  bool closedFigure() const;
182 
184  void setAppearance(unsigned int);
185  unsigned int appearance() const;
186 
188  void setConnectToRadioNetwork(bool b);
189  bool connectToRadioNetwork() const;
190 
193  void setAddToOrbat(bool);
194  bool addToOrbat() const;
195 
197  void setCreateSubObjects(bool b);
198  bool createSubObjects() const;
199 
201  void setOrganized(bool);
202  bool organized() const;
203 
206  void setUserCallback(DtVrfObjectUserInitFcn, void*);
207  DtVrfObjectUserInitFcn callbackFunction() const;
208  void* callbackData() const;
209 
211  void setRequestId(unsigned long);
212  unsigned long requestId() const;
213 
216  void setStartingFormation(const DtString&);
217  const DtString& startingFormation() const;
218 
219  void setAggregateCreationMode(int);
220  int aggregateCreationMode() const;
222 
224  const std::map<std::string, std::string>& extendedData() const;
225  std::map<std::string, std::string>& extenedData();
226  void setExtendedData(const std::map<std::string, std::string>&);
227  void setExtendedData(const std::map<DtString, DtString>&);
228  void setExtendedData( const DtString& keyword, const DtString& data );
229 
232  const DtString& userData() const;
233  void setUserData(const DtString&);
234 
236  void setSuperior(const DtUUID&);
237  const DtUUID& superior() const;
238 
240  const std::list<DtAdminContent*>& initialAdminContent() const;
241 
243  std::list<DtAdminContent*>& initialAdminContent();
244 
245  void setInitialAdminContent(const std::list<DtAdminContent*>& adminContent);
246  void addInitialAdminContent(DtAdminContent* adminContent);
247  void clearInitialAdminContent();
248 
250  const std::list<DtSimInterfaceContent*>& initialInterfaceContent() const;
251 
253  std::list<DtSimInterfaceContent*>& initialInterfaceContent();
254 
255  void setInitialInterfaceContent(const std::list<DtSimInterfaceContent*>& adminContent);
256  void addInitialInterfaceContent(DtSimInterfaceContent* adminContent);
257  void clearInitialInterfaceContent();
258 
261  void addSubordinates(const std::vector<DtUUID>&);
262  void addSubordinate(const DtUUID&);
263  void renmoveSubordinate(const DtUUID&);
264  void clearSubordinates();
265  const std::vector<DtUUID>& subordinates() const;
266 
268  virtual bool isValid() const;
269 
270 protected:
272  void validateUUID();
273 
274 protected:
276  DtObjectType myObjectType;
281  std::map<int, DtString> myExtendedLabels;
287 
290 
293 
295  DtTaitBryan myOrientation;
296 
298  std::vector<DtVector> myVertices;
299 
302 
304  DtForceType myForceType;
305 
307  DtEntityIdentifier myEntityIdentifier;
308 
311 
314 
315  unsigned int myAppearance;
317 
318  unsigned long myRequestId;
319 
320  std::map<std::string, std::string> myExtendedData;
321 
322  std::list<DtAdminContent*> myAdminContent;
323  std::list<DtSimInterfaceContent*> myInterfaceContent;
324 
326 
330 
332  DtTaitBryan myWorldOrientation;
334 
336  std::vector<DtUUID> mySubordinates;
337 
338  int myColor;
340 
343 
346 
349 
351 };
std::vector< DtVector > myVertices
The vertices (geocentric) used to create this object.
Definition: localObjectCreateInformation.h:298
UUID is a unique ID wrapper class.
Definition: uuid.h:59
bool myConnectToRadioNetwork
Definition: localObjectCreateInformation.h:316
The DtLocalObjectCreateInformation class is a subset of the information used in the DtIfCreateVrfObje...
Definition: localObjectCreateInformation.h:35
#define DT_DLL_vrfmsgs
This file is used to determine how to build.
Definition: vrfmsgsDefines.h:28
DtTaitBryan myWorldOrientation
If this is specified, use this instead of the supplied orientation.
Definition: localObjectCreateInformation.h:332
DtString myStartingFormation
Definition: localObjectCreateInformation.h:288
DtString myUserData
Definition: localObjectCreateInformation.h:285
std::list< DtAdminContent * > myAdminContent
Definition: localObjectCreateInformation.h:322
bool myClosedFigure
Default is false.
Definition: localObjectCreateInformation.h:313
DtUUID mySuperior
Definition: localObjectCreateInformation.h:325
std::map< int, DtString > myExtendedLabels
Definition: localObjectCreateInformation.h:281
bool(* DtVrfObjectUserInitFcn)(DtLocalObject *vrfObject, void *usr)
User action function definition for createAndInitVrfObject()
Definition: localObjectCreateInformation.h:25
Contains the DtUUID class declaration.
unsigned long myRequestId
Definition: localObjectCreateInformation.h:318
void * myUserInitData
Definition: localObjectCreateInformation.h:292
DtVector myWorldVelocity
World velocity to be set in the local object (only used if set)
Definition: localObjectCreateInformation.h:328
unsigned int myAppearance
Definition: localObjectCreateInformation.h:315
int myAggregateCreationMode
Definition: localObjectCreateInformation.h:289
bool myCreateSubObjects
Definition: localObjectCreateInformation.h:283
bool myIsClutterEntity
Definition: localObjectCreateInformation.h:350
bool myOrganized
Definition: localObjectCreateInformation.h:284
int myColor
Definition: localObjectCreateInformation.h:338
DtString myObjectName
Definition: localObjectCreateInformation.h:278
int myFillStyle
Definition: localObjectCreateInformation.h:347
std::vector< DtUUID > mySubordinates
Takes the UUIDs supplied, and, if the subordinates exist, adds them to the newly created object...
Definition: localObjectCreateInformation.h:336
DtString myOverlay
Definition: localObjectCreateInformation.h:280
int myLineWidth
Definition: localObjectCreateInformation.h:341
bool myLineWidthSet
Definition: localObjectCreateInformation.h:342
bool myClampToGround
Definition: localObjectCreateInformation.h:286
int myPublishFlag
Whether or not to publish this item on the network. Default is true.
Definition: localObjectCreateInformation.h:301
bool myPenStyleSet
Definition: localObjectCreateInformation.h:345
bool myProjected
Default is true.
Definition: localObjectCreateInformation.h:310
bool myWorldVelocitySet
Definition: localObjectCreateInformation.h:329
bool myWorldOrientationSet
Definition: localObjectCreateInformation.h:333
DtAdminContent.
Definition: adminContent.h:23
DtUUID myUUID
Definition: localObjectCreateInformation.h:275
DtString myObjectNamePrefix
Definition: localObjectCreateInformation.h:279
Definition: simInterfaceContent.h:45
bool myColorSet
Definition: localObjectCreateInformation.h:339
std::list< DtSimInterfaceContent * > myInterfaceContent
Definition: localObjectCreateInformation.h:323
DtString myLabel
Definition: localObjectCreateInformation.h:277
std::map< std::string, std::string > myExtendedData
Definition: localObjectCreateInformation.h:320
DtObjectType myObjectType
Definition: localObjectCreateInformation.h:276
DtEntityIdentifier myEntityIdentifier
VR-Link specific – the entity identifier to use as a seed.
Definition: localObjectCreateInformation.h:307
DtVrfObjectUserInitFcn myUserInitFunction
Definition: localObjectCreateInformation.h:291
bool myFillStyleSet
Definition: localObjectCreateInformation.h:348
DtTaitBryan myOrientation
The topographic orientation to set for this object.
Definition: localObjectCreateInformation.h:295
DtForceType myForceType
Default is DtForceOther.
Definition: localObjectCreateInformation.h:304
bool myAddToOrbat
Definition: localObjectCreateInformation.h:282
int myPenStyle
Definition: localObjectCreateInformation.h:344
class DtIfCreateVrfObject:
Definition: ifCreateVrfObject.h:77
A locally simulated VRF object. Holds all internal and external data for the object, and provides access to both the current frame and next frame state data for the object. All current frame data is read-only, and next-frame data can be written to. No thread safety guarantees are made on this object during the simulation frame and it should only be accessed by the thread that is simulating the object.
Definition: localObject.h:86

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)