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) 2025 MAK Technologies, Inc.
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 
57  virtual ~Dt3DGraphicalObjectStateRecord() override;
58 
60  virtual DtEnvironmentalRecord *clone() const override;
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() override;
127 
129  const DtNet3DGraphicalObjectStateRecord* objectNetRep() const;
130  DtNet3DGraphicalObjectStateRecord* objectNetRep();
131 
133  virtual void setFromNet(const DtNetEnvironmentalRecord &buffer,
134  int protocolVersion) override;
135 
137  virtual int netRepSize() const override;
138 
139 protected:
140 
141  virtual bool resizeNetRep(int newSize) override;
142 
143  // These functions do the pointer math to get a pointer to
144  // the right place in the internal buffer for the start of these
145  // data areas.
146  virtual void* pointerToApplicationIds() const;
147  virtual void* pointerToAttachmentList() const;
148  virtual void* pointerToAttachmentIdList() const;
149  virtual void* pointerToParentOverlays() const;
150  virtual void* pointerToLabel() const;
151  virtual void* pointerToUserData() const;
152 
153 protected:
154 
155  DtVector32 myOffset;
156  int myColorR;
157  int myColorG;
158  int myColorB;
159  int myColorA;
162  DtForceType myForceType;
164  bool myBound2D;
165  DtGlobalObjectDesignatorList myApplicationIds;
167  DtGlobalObjectDesignatorList myAttachmentIds;
170  char* myUserData;
172 
174 
175 };
int myNetRepSize
Definition: 3dGraphicalObjectStateRecord.h:173
int myFillPattern
Definition: 3dGraphicalObjectStateRecord.h:160
DtAttachmentDescriptorList myAttachments
Definition: 3dGraphicalObjectStateRecord.h:166
Definition: 3dGraphicalObjectStateRecord.h:23
DtNetU8 myForceType
Definition: 3dGraphicalObjectStateRecord.h:29
int myColorA
Definition: 3dGraphicalObjectStateRecord.h:159
bool myProjected
Definition: 3dGraphicalObjectStateRecord.h:163
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:156
int myUserDataLength
Definition: 3dGraphicalObjectStateRecord.h:171
DtNetU8 myNumberOfParentOverlays
Definition: 3dGraphicalObjectStateRecord.h:34
bool myBound2D
Definition: 3dGraphicalObjectStateRecord.h:164
int myColorG
Definition: 3dGraphicalObjectStateRecord.h:157
Definition: attachmentDescriptor.h:64
DtNetU8 myLabelSize
Definition: 3dGraphicalObjectStateRecord.h:35
bool myFlashing
Definition: 3dGraphicalObjectStateRecord.h:161
Definition: stringList.h:15
DtVector32 myOffset
Definition: 3dGraphicalObjectStateRecord.h:155
DtNetU8 myNumberOfApplicationIds
Definition: 3dGraphicalObjectStateRecord.h:32
Contains the DtAttachmentDescriptorList class declaration.
DtStringList myParentOverlays
Definition: 3dGraphicalObjectStateRecord.h:168
Contains the DtStringList class declaration.
DtString myLabel
Definition: 3dGraphicalObjectStateRecord.h:169
DtNetVector32 myOffset
Definition: 3dGraphicalObjectStateRecord.h:25
DtGlobalObjectDesignatorList myApplicationIds
Definition: 3dGraphicalObjectStateRecord.h:165
DtForceType myForceType
Definition: 3dGraphicalObjectStateRecord.h:162
DtGlobalObjectDesignatorList myAttachmentIds
Definition: 3dGraphicalObjectStateRecord.h:167
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:170
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:158
#define DT_DLL_vrfExtObjects
Definition: dllExport.h:23

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)