![]() |
Jolt Physics
A multi core friendly Game Physics Engine
|
Binning splitter approach taken from: Realtime Ray Tracing on GPU with BVH-based Packet Traversal by Johannes Gunther et al. More...
#include <TriangleSplitterBinning.h>
Public Member Functions | |
| TriangleSplitterBinning (const VertexList &inVertices, const IndexedTriangleList &inTriangles, uint inMinNumBins=8, uint inMaxNumBins=128, uint inNumTrianglesPerBin=6) | |
| Constructor. | |
| virtual void | GetStats (Stats &outStats) const override |
| Get stats of splitter. | |
| virtual bool | Split (const Range &inTriangles, Range &outLeft, Range &outRight) override |
Public Member Functions inherited from TriangleSplitter | |
| TriangleSplitter (const VertexList &inVertices, const IndexedTriangleList &inTriangles) | |
| Constructor. | |
| virtual | ~TriangleSplitter ()=default |
| Virtual destructor. | |
| Range | GetInitialRange () const |
| Range of triangles to start with. | |
| 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 |
Additional Inherited Members | |
Protected Member Functions inherited from TriangleSplitter | |
| 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 inherited from TriangleSplitter | |
| 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. | |
Binning splitter approach taken from: Realtime Ray Tracing on GPU with BVH-based Packet Traversal by Johannes Gunther et al.
| JPH_NAMESPACE_BEGIN TriangleSplitterBinning::TriangleSplitterBinning | ( | const VertexList & | inVertices, |
| const IndexedTriangleList & | inTriangles, | ||
| uint | inMinNumBins = 8, | ||
| uint | inMaxNumBins = 128, | ||
| uint | inNumTrianglesPerBin = 6 ) |
Constructor.
|
inlineoverridevirtual |
Get stats of splitter.
Implements TriangleSplitter.
|
overridevirtual |
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. |
Implements TriangleSplitter.