NTrace
GPU ray tracing framework
|
#include <BVHNode.hpp>
Inherits FW::BVHNode.
Public Member Functions | |
LeafNode (const AABB &bounds, int lo, int hi) | |
Constructor. More... | |
LeafNode (const LeafNode &s) | |
Copy constructor. More... | |
bool | isLeaf () const |
S32 | getNumChildNodes () const |
BVHNode * | getChildNode (S32) const |
Returns one of the node's child nodes. More... | |
S32 | getNumTriangles () const |
![]() | |
BVHNode () | |
Constructor. More... | |
float | getArea () const |
int | getSubtreeSize (BVH_STAT stat=BVH_STAT_NODE_COUNT) const |
Calculates various information about the node's subtree. More... | |
void | computeSubtreeProbabilities (const Platform &p, float parentProbability, float &sah) |
Calculates node's subtree probabilities and also sah price. More... | |
float | computeSubtreeSAHCost (const Platform &p) const |
Calculates subtree SAH cost. Requires calculated probabilities. More... | |
void | deleteSubtree () |
Deletes node's subtree. More... | |
void | assignIndicesDepthFirst (S32 index=0, bool includeLeafNodes=true) |
Assigns node's sbutree indices in depth first order. More... | |
void | assignIndicesBreadthFirst (S32 index=0, bool includeLeafNodes=true) |
Assigns node's subtree indices in breadth first order. More... | |
Public Attributes | |
S32 | m_lo |
Lower index to the BVH's triangle index array. More... | |
S32 | m_hi |
Higher index to the BVH's triangle index array. More... | |
![]() | |
AABB | m_bounds |
Bounding box of the node. More... | |
float | m_probability |
Probability of coming here (widebvh uses this). More... | |
float | m_parentProbability |
Probability of coming to parent (widebvh uses this). More... | |
int | m_treelet |
For queuing tests (qmachine uses this). More... | |
int | m_index |
in linearized tree (qmachine uses this). More... | |
BVH leaf node.
Definition at line 275 of file BVHNode.hpp.
|
inline |
Constructor.
[in] | bounds | Node's bounding box. |
[in] | lo | Lower index to the BVH's triangle index array. |
[in] | hi | Higher index to the BVH's triangle index array. |
Definition at line 285 of file BVHNode.hpp.
|
inline |
Returns one of the node's child nodes.
[in] | i | Index of the child node. |
Implements FW::BVHNode.
Definition at line 308 of file BVHNode.hpp.
|
inlinevirtual |
Implements FW::BVHNode.
Definition at line 301 of file BVHNode.hpp.
|
inlinevirtual |
Reimplemented from FW::BVHNode.
Definition at line 313 of file BVHNode.hpp.
|
inlinevirtual |
Implements FW::BVHNode.
Definition at line 296 of file BVHNode.hpp.
S32 FW::LeafNode::m_hi |
Higher index to the BVH's triangle index array.
Definition at line 315 of file BVHNode.hpp.
S32 FW::LeafNode::m_lo |
Lower index to the BVH's triangle index array.
Definition at line 314 of file BVHNode.hpp.