Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
TriangleGrouperMorton Class Reference

#include <TriangleGrouperMorton.h>

Inheritance diagram for TriangleGrouperMorton:
TriangleGrouper

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
 

Detailed Description

A class that groups triangles in batches of N according to morton code of centroid. Time complexity: O(N log(N))

Member Function Documentation

◆ Group()

JPH_NAMESPACE_BEGIN void TriangleGrouperMorton::Group ( const VertexList inVertices,
const IndexedTriangleList inTriangles,
int  inGroupSize,
Array< uint > &  outGroupedTriangleIndices 
)
overridevirtual

Group a batch of indexed triangles

Parameters
inVerticesThe list of vertices
inTrianglesThe list of indexed triangles (indexes into inVertices)
inGroupSizeHow big each group should be
outGroupedTriangleIndicesAn 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.


The documentation for this class was generated from the following files: