TriangleGrouperMorton.h 625 B

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