TriangleGrouperMorton.h 543 B

12345678910111213141516171819
  1. // SPDX-FileCopyrightText: 2021 Jorrit Rouwe
  2. // SPDX-License-Identifier: MIT
  3. #pragma once
  4. #include <TriangleGrouper/TriangleGrouper.h>
  5. namespace JPH {
  6. /// A class that groups triangles in batches of N according to morton code of centroid.
  7. /// Time complexity: O(N log(N))
  8. class TriangleGrouperMorton : public TriangleGrouper
  9. {
  10. public:
  11. // See: TriangleGrouper::Group
  12. virtual void Group(const VertexList &inVertices, const IndexedTriangleList &inTriangles, int inGroupSize, vector<uint> &outGroupedTriangleIndices) override;
  13. };
  14. } // JPH