OctreeBuilder Class Reference
[Graphics]

Builds an octree from a dataset and returns the root node. More...

#include <OctreeBuilder.hpp>

Inherited by OctreeBuilderTester.

List of all members.

Public Member Functions

 OctreeBuilder (Dataset *dataset)
OctreeNodebuild ()
int * getOffsets () const
int getTotalNodes () const
int getTreeHeight () const
void setThreshold (float threshold)
string toString ()

Static Public Member Functions

static int getTreeHeightOf (Dataset *dataset)

Protected Member Functions

OctreeNodebuildNode (Index &center, int depth)
void buildNodeAsInner (const Index &center, int depth, OctreeNode *node)
void buildNodeAsLeaf (const Index &center, int depth, OctreeNode *node)
void initOffsets ()
Index offsetCenter (const Index &Center, int offset, int childNumber)
Index offsetSample (const Index &Center, int sampleNumber)

Private Attributes

Datasetdataset
float threshold
int * offsets
int totalNodes
int treeHeight

Detailed Description

Builds an octree from a dataset and returns the root node.


Member Function Documentation

int getTotalNodes (  )  const [inline]
Returns:
Total number of nodes in the tree.
int getTreeHeight (  )  const [inline]
Returns:
distance from root to a leaf.
int getTreeHeightOf ( Dataset dataset  )  [static]

Computes the height of the tree required for a dataset.

Calculated as (log base 8 of the total samples) - 1;

Parameters:
dataset Pointer to the Dataset to use.
void setThreshold ( float  t  )  [inline]

Sets the number that determines if a node is empty.


The documentation for this class was generated from the following files:
Generated on Wed Jun 9 01:36:36 2010 for Gander by  doxygen 1.6.3