NTrace
GPU ray tracing framework
|
K-d tree acceleration structure class. More...
#include <KDTree.hpp>
Classes | |
struct | BuildParams |
Strucure holding build parameters. More... | |
struct | Stats |
Structure holding statistics about k-d tree. More... | |
Public Types | |
enum | BuilderType { SpatialMedian, ObjectMedian, SAH } |
Supported k-d tree builder types. More... | |
Public Member Functions | |
KDTree (Scene *scene, const Platform &platform, const BuildParams ¶ms) | |
Constructor. More... | |
~KDTree (void) | |
Destructor. More... | |
Scene * | getScene (void) const |
Gets source scene of the k-d tree. More... | |
const Platform & | getPlatform (void) const |
Gets platform settings of the k-d tree. More... | |
KDTreeNode * | getRoot (void) const |
Gets root node of the k-d tree. More... | |
Array< S32 > & | getTriIndices (void) |
Returns an array of triangle indices to which leaf nodes are pointig. These indices point to scene's triangle array. More... | |
const Array< S32 > & | getTriIndices (void) const |
Returns an array of triangle indices reffered to by the leaf nodes. These indices point to the scene's triangle array. More... | |
K-d tree acceleration structure class.
Definition at line 41 of file KDTree.hpp.
Supported k-d tree builder types.
Enumerator | |
---|---|
SpatialMedian | |
ObjectMedian | |
SAH |
Definition at line 47 of file KDTree.hpp.
FW::KDTree::KDTree | ( | Scene * | scene, |
const Platform & | platform, | ||
const BuildParams & | params | ||
) |
Constructor.
[in] | scene | Source scene. |
[in] | platform | Platform settings. |
[in] | params | Build parameters. |
Definition at line 35 of file KDTree.cpp.
|
inline |
Destructor.
Definition at line 113 of file KDTree.hpp.
Gets platform settings of the k-d tree.
Platform settings.
Definition at line 125 of file KDTree.hpp.
|
inline |
Gets root node of the k-d tree.
Definition at line 131 of file KDTree.hpp.
Returns an array of triangle indices to which leaf nodes are pointig. These indices point to scene's triangle array.
Definition at line 137 of file KDTree.hpp.
Returns an array of triangle indices reffered to by the leaf nodes. These indices point to the scene's triangle array.
Definition at line 143 of file KDTree.hpp.