GoPxL SDK
GoGdpMesh.h
Go to the documentation of this file.
1 
10 #ifndef GO_PXL_SDK_GOGDPMESH_H
11 #define GO_PXL_SDK_GOGDPMESH_H
12 
14 
15 class GoGdpMsgTests;
16 
17 namespace GoPxLSdk
18 {
20  {
21  ID_Vertex = 0,
22  ID_Facet = 1,
27  };
28 
30  {
38  };
39 
41  {
42  Error = 0,
44  Allocated = 2,
45  Empty = 3,
47  Full = 5
48  };
49 
50  typedef struct GoFacet32u
51  {
52  k32u vertex1;
53  k32u vertex2;
54  k32u vertex3;
55  } GoFacet32u;
56 
58  {
59  k32u id;
60  k32u type;
61  k32s state;
62  k32u flag;
64  kSize usedCount;
65  std::vector<std::shared_ptr<void>> buffer;
66 
67  MeshMsgChannel() = default;
68  MeshMsgChannel(k32s id, k32u type, k32s state, k32u flag, kSize allocatedCount, kSize usedCount, std::vector<std::shared_ptr<void>> buffer) :
69  id(id), type(type), state(state), flag(flag), allocatedCount(allocatedCount), usedCount(usedCount), buffer(buffer)
70  {
71 
72  }
73  };
74 
76  {
77  public:
84  GoGdpMesh();
85  ~GoGdpMesh() = default;
86 
95  void Deserialize(kSerializer serializer) override;
96 
104  const bool HasData() const;
105 
113  const kSize SystemChannelCount() const;
114 
122  const kSize MaxUserChannelCount() const;
123 
131  const kSize UserChannelCount() const;
132 
140  const kSize ChannelCount() const;
141 
149  const kPoint3d64f Offset() const;
150 
158  const kPoint3d64f Range() const;
159 
168  const Channel_Type ChannelType(size_t id) const;
169 
178  const Channel_State ChannelState(size_t id) const;
179 
189  const k32u ChannelFlag(size_t id) const;
190 
201  const kSize AllocatedChannelDataCount(size_t id) const;
202 
209  const kSize UsedChannelDataCount(size_t id) const;
210 
217  const std::vector<std::shared_ptr<void>>& ChannelData(size_t id) const;
218 
219  private:
220  bool hasData = false;
221  kSize systemChannelCount = 0;
222  kSize maxUserChannelCount = 0;
223  kSize userChannelCount = 0;
224  kSize channelCount = 0;
225  kPoint3d64f offset = { 0.0 };
226  kPoint3d64f range = { 0.0 };
227  std::vector<MeshMsgChannel> channels;
228 
229  friend class ::GoGdpMsgTests;
230 
231  };
232 
233 }
234 
235 #endif
236 
Channel_Type
Definition: GoGdpMesh.h:29
#define GoPxLSdkClass
Definition: Def.h:35
Definition: GoGdpMesh.h:42
k32u vertex2
Definition: GoGdpMesh.h:53
Definition: GoGdpMesh.h:26
Definition: GoGdpMesh.h:46
Definition: GoGdpMesh.h:57
kSize usedCount
Definition: GoGdpMesh.h:64
Definition: GoGdpMesh.h:36
Definition: GoGdpMesh.h:37
k32u flag
Definition: GoGdpMesh.h:62
Definition: GoGdpMesh.h:44
MeshMsgChannel(k32s id, k32u type, k32s state, k32u flag, kSize allocatedCount, kSize usedCount, std::vector< std::shared_ptr< void >> buffer)
Definition: GoGdpMesh.h:68
std::vector< std::shared_ptr< void > > buffer
Definition: GoGdpMesh.h:65
k32u id
Definition: GoGdpMesh.h:59
Channel_ID
Definition: GoGdpMesh.h:19
Declares the GoPxLSdk.GoGdpMsg class.
k32u type
Definition: GoGdpMesh.h:60
kSize allocatedCount
Definition: GoGdpMesh.h:63
Definition: GoGdpMesh.h:31
Definition: GoGdpMesh.h:24
Definition: GoGdpMesh.h:45
Definition: GoGdpMesh.h:43
Channel_State
Definition: GoGdpMesh.h:40
Definition: GoGdpMesh.h:21
Definition: GoGdpMesh.h:75
Definition: GoGdpMesh.h:34
k32u vertex3
Definition: GoGdpMesh.h:54
Definition: GoGdpMesh.h:35
k32u vertex1
Definition: GoGdpMesh.h:52
k32s state
Definition: GoGdpMesh.h:61
Definition: Def.h:46
Definition: GoGdpMesh.h:23
Definition: GoGdpMesh.h:22
Definition: GoGdpMesh.h:47
Definition: GoGdpMesh.h:50
Definition: GoGdpMsg.h:38
Definition: GoGdpMesh.h:33
Definition: GoGdpMesh.h:25
Definition: GoGdpMesh.h:32