VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
3dGraphicalObjectStateRecord.h
Go to the documentation of this file.
1 /****************************************************************************
2  * Copyright (c) 2017 VT MAK
3  * All rights reserved.
4  ****************************************************************************/
5 
9 
10 #pragma once
11 
15 
16 #include <vl/globalObjectDesignatorList.h>
17 #include <vl/environmentalRecord.h>
18 #include <vl/packets/envProcP.h>
19 #include <vlpi/disEnums.h>
20 
21 #include <vector>
22 
23 struct DtNet3DGraphicalObjectStateRecord : DtNetEnvironmentalRecord
24 {
25  DtNetVector32 myOffset;
26  DtNetU8 myColor[4];
27  DtNetInt32 myFillPattern;
28  DtNetBoolean myFlashing;
29  DtNetU8 myForceType;
30  DtNetBoolean myProjected;
31  DtNetBoolean myBound2D;
35  DtNetU8 myLabelSize;
36  DtNetU16 myUserDataSize;
37 };
38 
39 
43 {
44 public:
47 
50  const Dt3DGraphicalObjectStateRecord& orig);
51 
53  const Dt3DGraphicalObjectStateRecord& operator=(
54  const Dt3DGraphicalObjectStateRecord& orig);
55 
58 
60  virtual DtEnvironmentalRecord* clone() const;
61 
63  virtual void setOffset(const DtVector32& pos);
64  virtual const DtVector32& offset() const;
65 
67  virtual void setColor(int r, int g, int b, int a);
68  virtual void getColor(int& r, int& g, int& b, int& a) const;
69 
71  virtual void setFillPattern(int pattern);
72  virtual int fillPattern() const;
73 
75  virtual void setFlashing(bool yesNo);
76  virtual bool flashing() const;
77 
79  virtual void setForceType(DtForceType forceType);
80  virtual DtForceType forceType() const;
81 
83  virtual void setProjected(bool yesNo);
84  virtual bool projected() const;
85 
87  virtual void setBound2D(bool yesNo);
88  virtual bool bound2D() const;
89 
90  virtual bool setNumberOfApplicationIds(int newNumberOfAppIds);
91  virtual int numberOfApplicationIds() const;
92 
93  virtual bool setApplicationId(int index,
94  const DtGlobalObjectDesignator& subID);
95 
96  virtual bool getApplicationId(int index, DtGlobalObjectDesignator& subID)
97  const;
98 
99  virtual bool setNumberOfAttachments(int newNumberOfAppIds);
100  virtual int numberOfAttachments() const;
101 
102  virtual bool setAttachment(int index, const DtAttachmentDescriptor& desc,
103  const DtGlobalObjectDesignator& attachId);
104 
105  virtual bool getAttachment(int index, DtAttachmentDescriptor& desc,
106  DtGlobalObjectDesignator& attachId) const;
107 
108  virtual bool setNumberOfParentOverlays(int newNumberOfParentOverlays);
109  virtual int numberOfParentOverlays() const;
110 
111  virtual bool setParentOverlay(int index,
112  const DtString& name);
113 
114  virtual bool getParentOverlay(int index, DtString& name) const;
115 
116 
118  virtual void setLabel(const DtString& label);
119  virtual const DtString& label() const;
120 
122  virtual void setUserData(const char* data, int length);
123  virtual const char* userData(int* length = 0) const;
124 
126  virtual bool createNetworkRepresentation();
127 
129  const DtNet3DGraphicalObjectStateRecord* objectNetRep() const;
130  DtNet3DGraphicalObjectStateRecord* objectNetRep();
131 
133  virtual void setFromNet(const DtNetEnvironmentalRecord& buffer, int protocolVersion);
134 
136  virtual int netRepSize() const;
137 
138 protected:
139 
140  virtual bool resizeNetRep(int newSize);
141 
142  // These functions do the pointer math to get a pointer to
143  // the right place in the internal buffer for the start of these
144  // data areas.
145  virtual void* pointerToApplicationIds() const;
146  virtual void* pointerToAttachmentList() const;
147  virtual void* pointerToAttachmentIdList() const;
148  virtual void* pointerToParentOverlays() const;
149  virtual void* pointerToLabel() const;
150  virtual void* pointerToUserData() const;
151 
152 protected:
153 
154  DtVector32 myOffset;
155  int myColorR;
156  int myColorG;
157  int myColorB;
158  int myColorA;
161  DtForceType myForceType;
163  bool myBound2D;
164  DtGlobalObjectDesignatorList myApplicationIds;
166  DtGlobalObjectDesignatorList myAttachmentIds;
169  char* myUserData;
171 
173 
174 };
int myNetRepSize
Definition: 3dGraphicalObjectStateRecord.h:172
int myFillPattern
Definition: 3dGraphicalObjectStateRecord.h:159
DtAttachmentDescriptorList myAttachments
Definition: 3dGraphicalObjectStateRecord.h:165
Definition: 3dGraphicalObjectStateRecord.h:23
DtNetU8 myForceType
Definition: 3dGraphicalObjectStateRecord.h:29
int myColorA
Definition: 3dGraphicalObjectStateRecord.h:158
bool myProjected
Definition: 3dGraphicalObjectStateRecord.h:162
DtNetInt32 myFillPattern
Definition: 3dGraphicalObjectStateRecord.h:27
DtNetBoolean myBound2D
Definition: 3dGraphicalObjectStateRecord.h:31
DtNetU8 myNumberOfAttachments
Definition: 3dGraphicalObjectStateRecord.h:33
DtNetBoolean myProjected
Definition: 3dGraphicalObjectStateRecord.h:30
DtNetU16 myUserDataSize
Definition: 3dGraphicalObjectStateRecord.h:36
Definition: attachmentDescriptor.h:27
DtNetBoolean myFlashing
Definition: 3dGraphicalObjectStateRecord.h:28
int myColorR
Definition: 3dGraphicalObjectStateRecord.h:155
int myUserDataLength
Definition: 3dGraphicalObjectStateRecord.h:170
DtNetU8 myNumberOfParentOverlays
Definition: 3dGraphicalObjectStateRecord.h:34
bool myBound2D
Definition: 3dGraphicalObjectStateRecord.h:163
int myColorG
Definition: 3dGraphicalObjectStateRecord.h:156
Definition: attachmentDescriptor.h:64
DtNetU8 myLabelSize
Definition: 3dGraphicalObjectStateRecord.h:35
bool myFlashing
Definition: 3dGraphicalObjectStateRecord.h:160
Definition: stringList.h:15
DtVector32 myOffset
Definition: 3dGraphicalObjectStateRecord.h:154
DtNetU8 myNumberOfApplicationIds
Definition: 3dGraphicalObjectStateRecord.h:32
Contains the DtAttachmentDescriptorList class declaration.
DtStringList myParentOverlays
Definition: 3dGraphicalObjectStateRecord.h:167
Contains the DtStringList class declaration.
DtString myLabel
Definition: 3dGraphicalObjectStateRecord.h:168
DtNetVector32 myOffset
Definition: 3dGraphicalObjectStateRecord.h:25
DtGlobalObjectDesignatorList myApplicationIds
Definition: 3dGraphicalObjectStateRecord.h:164
DtForceType myForceType
Definition: 3dGraphicalObjectStateRecord.h:161
DtGlobalObjectDesignatorList myAttachmentIds
Definition: 3dGraphicalObjectStateRecord.h:166
DT_DLL_VRVCORE double length(const makVrv::DtCoordinateSystem &, const std::vector< DtVector > &vertices)
Returns the total distance of a segmented line defined by the provided vector of vertices. Coordinates are in local database coordinates. The coordinate system is used to convert between the local database coordinates and geocentric. All distance is in 2D – the Z value is ignored.
char * myUserData
Definition: 3dGraphicalObjectStateRecord.h:169
Dt3DGraphicalObjectStateRecord implements the 3d graphical object state record for the remote graphic...
Definition: 3dGraphicalObjectStateRecord.h:42
DtNetU8 myColor[4]
Definition: 3dGraphicalObjectStateRecord.h:26
voidpf uLong offset
Definition: ioapi.h:42
int myColorB
Definition: 3dGraphicalObjectStateRecord.h:157
#define DT_DLL_vrfExtObjects
Definition: dllExport.h:23

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)