NTrace
GPU ray tracing framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
FW::KDTLeafNode Class Reference

K-d tree's leaf node class. More...

#include <KDTreeNode.hpp>

Inherits FW::KDTreeNode.

Public Member Functions

 KDTLeafNode (int lo, int hi)
 Constructor. More...
 
bool isLeaf () const
 Returns whether the node is a leaf node. More...
 
S32 getNumChildNodes () const
 Returns number of the node's child nodes. More...
 
KDTreeNodegetChildNode (S32) const
 Returns node's child node (left or right). More...
 
S32 getNumTriangles () const
 Returns number of triangles this node references. More...
 
- Public Member Functions inherited from FW::KDTreeNode
void deleteSubtree ()
 Deletes node's subtree. More...
 
int getSubtreeSize (KDTREE_STAT stat=KDTREE_STAT_NODE_COUNT) const
 Computes given statistics about node's subtree. More...
 

Public Attributes

S32 m_lo
 Lower index to the tree's triangle references array. More...
 
S32 m_hi
 Higher index to the tree's triangle references array. More...
 

Detailed Description

K-d tree's leaf node class.

Definition at line 134 of file KDTreeNode.hpp.

Constructor & Destructor Documentation

FW::KDTLeafNode::KDTLeafNode ( int  lo,
int  hi 
)
inline

Constructor.

Parameters
[in]loLower index to the tree's triangle references array.
[in]hiHigher index to the tree's triangle references array.

Definition at line 142 of file KDTreeNode.hpp.

Member Function Documentation

KDTreeNode* FW::KDTLeafNode::getChildNode ( S32  ) const
inlinevirtual

Returns node's child node (left or right).

Parameters
[in]iWhich child to get. 0 = left, 1 = right.
Returns
Always NULL.

Implements FW::KDTreeNode.

Definition at line 161 of file KDTreeNode.hpp.

S32 FW::KDTLeafNode::getNumChildNodes ( ) const
inlinevirtual

Returns number of the node's child nodes.

Returns
Always 0.

Implements FW::KDTreeNode.

Definition at line 154 of file KDTreeNode.hpp.

S32 FW::KDTLeafNode::getNumTriangles ( ) const
inlinevirtual

Returns number of triangles this node references.

Returns
Number of triangles this node references.

Reimplemented from FW::KDTreeNode.

Definition at line 167 of file KDTreeNode.hpp.

bool FW::KDTLeafNode::isLeaf ( ) const
inlinevirtual

Returns whether the node is a leaf node.

Returns
Always true.

Implements FW::KDTreeNode.

Definition at line 148 of file KDTreeNode.hpp.

Member Data Documentation

S32 FW::KDTLeafNode::m_hi

Higher index to the tree's triangle references array.

Definition at line 170 of file KDTreeNode.hpp.

S32 FW::KDTLeafNode::m_lo

Lower index to the tree's triangle references array.

Definition at line 169 of file KDTreeNode.hpp.


The documentation for this class was generated from the following file: