|  | Jolt Physics
    A multi core friendly Game Physics Engine | 
A class that splits a triangle list into two parts for building a tree. More...
#include <TriangleSplitter.h>
 
  
| Classes | |
| struct | Range | 
| Helper struct to indicate triangle range before and after the split.  More... | |
| struct | Stats | 
| Public Member Functions | |
| TriangleSplitter (const VertexList &inVertices, const IndexedTriangleList &inTriangles) | |
| Constructor. | |
| virtual | ~TriangleSplitter ()=default | 
| Virtual destructor. | |
| virtual void | GetStats (Stats &outStats) const =0 | 
| Get stats of splitter. | |
| Range | GetInitialRange () const | 
| Range of triangles to start with. | |
| virtual bool | Split (const Range &inTriangles, Range &outLeft, Range &outRight)=0 | 
| const VertexList & | GetVertices () const | 
| Get the list of vertices. | |
| const IndexedTriangle & | GetTriangle (uint inIdx) const | 
| Get triangle by index. | |
|  Public Member Functions inherited from NonCopyable | |
| NonCopyable ()=default | |
| NonCopyable (const NonCopyable &)=delete | |
| void | operator= (const NonCopyable &)=delete | 
| Protected Member Functions | |
| bool | SplitInternal (const Range &inTriangles, uint inDimension, float inSplit, Range &outLeft, Range &outRight) | 
| Helper function to split triangles based on dimension and split value. | |
| Protected Attributes | |
| const VertexList & | mVertices | 
| Vertices of the indexed triangles. | |
| const IndexedTriangleList & | mTriangles | 
| Unsorted triangles. | |
| Array< Float3 > | mCentroids | 
| Unsorted centroids of triangles. | |
| Array< uint > | mSortedTriangleIdx | 
| Indices to sort triangles. | |
A class that splits a triangle list into two parts for building a tree.
| JPH_NAMESPACE_BEGIN TriangleSplitter::TriangleSplitter | ( | const VertexList & | inVertices, | 
| const IndexedTriangleList & | inTriangles ) | 
Constructor.
| 
 | virtualdefault | 
Virtual destructor.
| 
 | pure virtual | 
Get stats of splitter.
Implemented in TriangleSplitterBinning, and TriangleSplitterMean.
| 
 | inline | 
Get triangle by index.
| 
 | inline | 
Get the list of vertices.
| 
 | pure virtual | 
Split triangles into two groups left and right, returns false if no split could be made
| inTriangles | The range of triangles (in mSortedTriangleIdx) to process | 
| outLeft | On return this will contain the ranges for the left subpart. mSortedTriangleIdx may have been shuffled. | 
| outRight | On return this will contain the ranges for the right subpart. mSortedTriangleIdx may have been shuffled. | 
Implemented in TriangleSplitterBinning, and TriangleSplitterMean.
| 
 | protected | 
Helper function to split triangles based on dimension and split value.
| 
 | protected | 
Unsorted triangles.
| 
 | protected | 
Vertices of the indexed triangles.