All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
UT_KDTree::Visitor Class Referenceabstract

Interface for tree traversals. More...

#include <UT_KDTree.h>

+ Inheritance diagram for UT_KDTree::Visitor:

Public Member Functions

virtual ~Visitor ()
virtual void setNumNodes (int num_nodes)
virtual void visitLeaf (int nodeid, const int *point_list, int size, const UT_BoundingBox &box)=0
virtual void postVisitInternal (int nodeid, int leftid, int rightid, const UT_BoundingBox &box, int axis, float split)

Detailed Description

Interface for tree traversals.

Definition at line 652 of file UT_KDTree.h.

Constructor & Destructor Documentation

virtual UT_KDTree::Visitor::~Visitor ( )

Definition at line 654 of file UT_KDTree.h.

Member Function Documentation

virtual void UT_KDTree::Visitor::postVisitInternal ( int  nodeid,
int  leftid,
int  rightid,
const UT_BoundingBox box,
int  axis,
float  split 

Post-traverses an internal node (left and right are guaranteed to have been traversed before this method is called)

Definition at line 673 of file UT_KDTree.h.

virtual void UT_KDTree::Visitor::setNumNodes ( int  num_nodes)

Before traversal, this method is called to indicate the total number of nodes (internal + leaf) that will be traversed. nodeid passed to the visit functions will take on values in the range [0, num_nodes-1].

Definition at line 660 of file UT_KDTree.h.

virtual void UT_KDTree::Visitor::visitLeaf ( int  nodeid,
const int point_list,
int  size,
const UT_BoundingBox box 
pure virtual

Traverses a leaf node in the tree. Leaf nodes contain a list of points (specified by point_list and size) that is disjoint from other leaf nodes.

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