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