Nori

KDTreeBase< BoundingBoxType > Class Template Reference

Base class of all kd-trees. More...

#include <gkdtree.h>

Inheritance diagram for KDTreeBase< BoundingBoxType >:
GenericKDTree< BoundingBoxType, TreeConstructionHeuristic, Derived >

List of all members.

Classes

struct  KDNode
 KD-tree node in 8 bytes. More...

Public Types

typedef uint32_t IndexType
 Index number format (max 2^32 prims)
typedef uint32_t SizeType
 Size number format.

Public Member Functions

 BOOST_STATIC_ASSERT (sizeof(KDNode)==8)
const KDNodegetRoot () const
 Return the root node of the kd-tree.
bool isBuilt () const
 Return whether or not the kd-tree has been built.
const BoundingBoxType & getBoundingBox () const
 Return a (slightly enlarged) axis-aligned bounding box containing all primitives.
const BoundingBoxType & getTightBoundingBox () const
 Return a tight axis-aligned bounding box containing all primitives.

Protected Attributes

KDNodem_nodes
BoundingBoxType m_bbox
BoundingBoxType m_tightBBox

Detailed Description

template<typename BoundingBoxType>
class KDTreeBase< BoundingBoxType >

Base class of all kd-trees.

This class defines the byte layout for KD-tree nodes and provides methods for querying the tree structure.

Definition at line 394 of file gkdtree.h.


Member Typedef Documentation

template<typename BoundingBoxType>
typedef uint32_t KDTreeBase< BoundingBoxType >::IndexType
template<typename BoundingBoxType>
typedef uint32_t KDTreeBase< BoundingBoxType >::SizeType

Member Function Documentation

template<typename BoundingBoxType>
KDTreeBase< BoundingBoxType >::BOOST_STATIC_ASSERT ( sizeof(KDNode = =8)
template<typename BoundingBoxType>
const BoundingBoxType& KDTreeBase< BoundingBoxType >::getBoundingBox ( ) const [inline]

Return a (slightly enlarged) axis-aligned bounding box containing all primitives.

Reimplemented in KDTree.

Definition at line 552 of file gkdtree.h.

template<typename BoundingBoxType>
const KDNode* KDTreeBase< BoundingBoxType >::getRoot ( ) const [inline]

Return the root node of the kd-tree.

Definition at line 542 of file gkdtree.h.

template<typename BoundingBoxType>
const BoundingBoxType& KDTreeBase< BoundingBoxType >::getTightBoundingBox ( ) const [inline]

Return a tight axis-aligned bounding box containing all primitives.

Definition at line 555 of file gkdtree.h.

template<typename BoundingBoxType>
bool KDTreeBase< BoundingBoxType >::isBuilt ( ) const [inline]

Return whether or not the kd-tree has been built.

Definition at line 547 of file gkdtree.h.


Member Data Documentation

template<typename BoundingBoxType>
BoundingBoxType KDTreeBase< BoundingBoxType >::m_bbox [protected]

Definition at line 558 of file gkdtree.h.

template<typename BoundingBoxType>
KDNode* KDTreeBase< BoundingBoxType >::m_nodes [protected]

Definition at line 557 of file gkdtree.h.

template<typename BoundingBoxType>
BoundingBoxType KDTreeBase< BoundingBoxType >::m_tightBBox [protected]

Definition at line 558 of file gkdtree.h.


The documentation for this class was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines