Jolt Physics
A multi core friendly Game Physics Engine
|
#include <TriangleGrouperMorton.h>
Public Member Functions | |
virtual void | Group (const VertexList &inVertices, const IndexedTriangleList &inTriangles, int inGroupSize, Array< uint > &outGroupedTriangleIndices) override |
Public Member Functions inherited from TriangleGrouper | |
virtual | ~TriangleGrouper ()=default |
Virtual destructor. More... | |
virtual void | Group (const VertexList &inVertices, const IndexedTriangleList &inTriangles, int inGroupSize, Array< uint > &outGroupedTriangleIndices)=0 |
Public Member Functions inherited from NonCopyable | |
NonCopyable ()=default | |
NonCopyable (const NonCopyable &)=delete | |
void | operator= (const NonCopyable &)=delete |
A class that groups triangles in batches of N according to morton code of centroid. Time complexity: O(N log(N))
|
overridevirtual |
Group a batch of indexed triangles
inVertices | The list of vertices |
inTriangles | The list of indexed triangles (indexes into inVertices) |
inGroupSize | How big each group should be |
outGroupedTriangleIndices | An ordered list of indices (indexing into inTriangles), contains groups of inGroupSize large worth of indices to triangles that are grouped together. If the triangle count is not an exact multiple of inGroupSize the last batch will be smaller. |
Implements TriangleGrouper.