You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: include/nbl/asset/utils/CPolygonGeometryManipulator.h
+25-2Lines changed: 25 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@
9
9
10
10
#include"nbl/asset/ICPUPolygonGeometry.h"
11
11
#include"nbl/asset/utils/CGeometryManipulator.h"
12
-
#include"nbl/asset/utils/CVertexHashMap.h"
12
+
#include"nbl/asset/utils/CVertexHashGrid.h"
13
13
14
14
namespacenbl::asset
15
15
{
@@ -19,7 +19,30 @@ class NBL_API2 CPolygonGeometryManipulator
19
19
{
20
20
public:
21
21
22
-
using SSNGVertexData = CVertexHashMap::VertexData;
22
+
structSSNGVertexData
23
+
{
24
+
uint64_t index; //offset of the vertex into index buffer
25
+
uint32_t hash;
26
+
hlsl::float32_t3 weightedNormal;
27
+
// TODO(kevinyu): Should we separate this from SSNGVertexData, and store it in its own vector in VertexHashGrid? Similar like how hashmap work. Or keep it intrusive?
28
+
hlsl::float32_t3 position; //position of the vertex in 3D space
29
+
30
+
hlsl::float32_t3 getPosition() const
31
+
{
32
+
return position;
33
+
}
34
+
35
+
voidsetHash(uint32_t hash)
36
+
{
37
+
this->hash = hash;
38
+
}
39
+
40
+
uint32_tgetHash() const
41
+
{
42
+
return hash;
43
+
};
44
+
45
+
};
23
46
24
47
using VxCmpFunction = std::function<bool(const SSNGVertexData&, const SSNGVertexData&, const ICPUPolygonGeometry*)>;
0 commit comments