VR-Forces 4.7 Class Documentation
 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 };

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)