NTrace
GPU ray tracing framework
|
#include <BVHNode.hpp>
Inherits FW::BVHNode.
Public Member Functions | |
InnerNode (const AABB &bounds, BVHNode *child0, BVHNode *child1) | |
Constructor. More... | |
InnerNode (const AABB &bounds, BVHNode *child0, BVHNode *child1, S32 axis, SplitInfo::SplitType splitType, bool osahTested) | |
Constructor. More... | |
bool | isLeaf () const |
S32 | getNumChildNodes () const |
BVHNode * | getChildNode (S32 i) const |
Returns one of the node's child nodes. More... | |
![]() | |
BVHNode () | |
Constructor. More... | |
virtual S32 | getNumTriangles () const |
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 | |
BVHNode * | m_children [2] |
Child nodes. More... | |
SplitInfo | m_splitInfo |
Split info. 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 inner node.
Definition at line 228 of file BVHNode.hpp.
Constructor.
[in] | bounds | Node's bounding box. |
[in] | child0 | Left child node. |
[in] | child1 | Right child node. |
Definition at line 238 of file BVHNode.hpp.
|
inline |
Constructor.
[in] | bounds | Node's bounding box. |
[in] | child0 | Left child node. |
[in] | child1 | Right child node. |
[in] | axis | Axis of the node's split. |
[in] | splitType | Type of the node's split. |
[in] | osahTested | Flag whether the split was tested for OSAH. |
Definition at line 249 of file BVHNode.hpp.
Returns one of the node's child nodes.
[in] | i | Index of the child node. |
Implements FW::BVHNode.
Definition at line 266 of file BVHNode.hpp.
|
inlinevirtual |
Implements FW::BVHNode.
Definition at line 259 of file BVHNode.hpp.
|
inlinevirtual |
Implements FW::BVHNode.
Definition at line 254 of file BVHNode.hpp.
BVHNode* FW::InnerNode::m_children[2] |
Child nodes.
Definition at line 268 of file BVHNode.hpp.
SplitInfo FW::InnerNode::m_splitInfo |
Split info.
Definition at line 269 of file BVHNode.hpp.