@@ -21,45 +21,45 @@ class CSmoothNormalGenerator
2121 private:
2222 class VertexHashMap
2323 {
24- public:
25- struct BucketBounds
26- {
27- core::vector<CPolygonGeometryManipulator::SSNGVertexData>::iterator begin;
28- core::vector<CPolygonGeometryManipulator::SSNGVertexData>::iterator end;
29- };
24+ public:
25+ struct BucketBounds
26+ {
27+ core::vector<CPolygonGeometryManipulator::SSNGVertexData>::iterator begin;
28+ core::vector<CPolygonGeometryManipulator::SSNGVertexData>::iterator end;
29+ };
3030
31- public:
32- VertexHashMap (size_t _vertexCount, uint32_t _hashTableMaxSize, float _cellSize);
31+ public:
32+ VertexHashMap (size_t _vertexCount, uint32_t _hashTableMaxSize, float _cellSize);
3333
34- // inserts vertex into hash table
35- void add (CPolygonGeometryManipulator::SSNGVertexData&& vertex);
34+ // inserts vertex into hash table
35+ void add (CPolygonGeometryManipulator::SSNGVertexData&& vertex);
3636
37- // sorts hashtable and sets iterators at beginnings of bucktes
38- void validate ();
37+ // sorts hashtable and sets iterators at beginnings of bucktes
38+ void validate ();
3939
40- inline uint32_t getVertexCount () const { return m_vertices.size (); }
40+ inline uint32_t getVertexCount () const { return m_vertices.size (); }
4141
42- //
43- std::array<uint32_t , 8 > getNeighboringCellHashes (const CPolygonGeometryManipulator::SSNGVertexData& vertex);
42+ //
43+ std::array<uint32_t , 8 > getNeighboringCellHashes (const CPolygonGeometryManipulator::SSNGVertexData& vertex);
4444
45- inline uint32_t getBucketCount () { return m_buckets.size (); }
46- inline BucketBounds getBucketBoundsById (uint32_t index) const { return { m_buckets[index], m_buckets[index + 1 ] }; }
47- BucketBounds getBucketBoundsByHash (uint32_t hash);
45+ inline uint32_t getBucketCount () { return m_buckets.size (); }
46+ inline BucketBounds getBucketBoundsById (uint32_t index) const { return { m_buckets[index], m_buckets[index + 1 ] }; }
47+ BucketBounds getBucketBoundsByHash (uint32_t hash);
4848
49- private:
50- static constexpr uint32_t invalidHash = 0xFFFFFFFF ;
51- static constexpr uint32_t primeNumber1 = 73856093 ;
52- static constexpr uint32_t primeNumber2 = 19349663 ;
53- static constexpr uint32_t primeNumber3 = 83492791 ;
49+ private:
50+ static inline constexpr uint32_t invalidHash = 0xFFFFFFFF ;
51+ static inline constexpr uint32_t primeNumber1 = 73856093 ;
52+ static inline constexpr uint32_t primeNumber2 = 19349663 ;
53+ static inline constexpr uint32_t primeNumber3 = 83492791 ;
5454
55- // holds iterators pointing to beginning of each bucket, last iterator points to m_vertices.end()
56- core::vector<core::vector<CPolygonGeometryManipulator::SSNGVertexData>::iterator> m_buckets;
57- core::vector<CPolygonGeometryManipulator::SSNGVertexData> m_vertices;
58- const uint32_t m_hashTableMaxSize;
59- const float m_cellSize;
55+ // holds iterators pointing to beginning of each bucket, last iterator points to m_vertices.end()
56+ core::vector<core::vector<CPolygonGeometryManipulator::SSNGVertexData>::iterator> m_buckets;
57+ core::vector<CPolygonGeometryManipulator::SSNGVertexData> m_vertices;
58+ const uint32_t m_hashTableMaxSize;
59+ const float m_cellSize;
6060
61- uint32_t hash (const CPolygonGeometryManipulator::SSNGVertexData& vertex) const ;
62- uint32_t hash (const hlsl::uint32_t3& position) const ;
61+ uint32_t hash (const CPolygonGeometryManipulator::SSNGVertexData& vertex) const ;
62+ uint32_t hash (const hlsl::uint32_t3& position) const ;
6363
6464 };
6565
0 commit comments