24 const char * mSplitterName =
nullptr;
52 return Range(0, (
uint)mSortedTriangleIdx.size());
71 return mTriangles[mSortedTriangleIdx[inIdx]];
76 bool SplitInternal(
const Range &inTriangles,
uint inDimension,
float inSplit, Range &outLeft, Range &outRight);
#define JPH_EXPORT
Definition Core.h:236
unsigned int uint
Definition Core.h:446
#define JPH_NAMESPACE_END
Definition Core.h:379
#define JPH_NAMESPACE_BEGIN
Definition Core.h:373
Triangle with 32-bit indices and material index.
Definition IndexedTriangle.h:73
Class that makes another class non-copyable. Usage: Inherit from NonCopyable.
Definition NonCopyable.h:11
A class that splits a triangle list into two parts for building a tree.
Definition TriangleSplitter.h:14
Array< Float3 > mCentroids
Unsorted centroids of triangles.
Definition TriangleSplitter.h:80
virtual ~TriangleSplitter()=default
Virtual destructor.
const VertexList & GetVertices() const
Get the list of vertices.
Definition TriangleSplitter.h:63
const VertexList & mVertices
Vertices of the indexed triangles.
Definition TriangleSplitter.h:78
virtual void GetStats(Stats &outStats) const =0
Get stats of splitter.
virtual bool Split(const Range &inTriangles, Range &outLeft, Range &outRight)=0
const IndexedTriangleList & mTriangles
Unsorted triangles.
Definition TriangleSplitter.h:79
Array< uint > mSortedTriangleIdx
Indices to sort triangles.
Definition TriangleSplitter.h:81
const IndexedTriangle & GetTriangle(uint inIdx) const
Get triangle by index.
Definition TriangleSplitter.h:69
Range GetInitialRange() const
Range of triangles to start with.
Definition TriangleSplitter.h:50
Helper struct to indicate triangle range before and after the split.
Definition TriangleSplitter.h:33
uint mEnd
Definition TriangleSplitter.h:46
Range(uint inBegin, uint inEnd)
Definition TriangleSplitter.h:36
uint Count() const
Get number of triangles in range.
Definition TriangleSplitter.h:39
uint mBegin
Start and end index (end = 1 beyond end)
Definition TriangleSplitter.h:45
Range()=default
Constructor.
Definition TriangleSplitter.h:23