vtf-logo

geom::BBoxTree< N, T > Class Template Reference

A bounding box tree in N-D. More...

#include <BBoxTree.h>

List of all members.

Public Types

typedef Types::Number Number
 The number type.
typedef Types::Point Point
 The Cartesian point type.
typedef Types::BBox BBox
 A bounding box.
typedef Types::SizeType SizeType
 The size type.

Public Member Functions

Constructors and destructor.
 BBoxTree ()
 Default constructor. Empty tree.
template<class BBoxInputIter>
 BBoxTree (BBoxInputIter begin, BBoxInputIter end, const SizeType leafSize=8)
 Construct from a range of bounding boxes.
template<class BBoxInputIter>
void build (BBoxInputIter begin, BBoxInputIter end, const SizeType leafSize=8)
 Build from a range of bounding boxes.
 ~BBoxTree ()
 Destructor. Delete the tree.
void destroy ()
 Delete all the data structures.
Accesors.
SizeType getSize () const
 Return the number of objects in the tree.
bool isEmpty () const
 Return true if the tree is empty.
Queries.
template<typename IntegerOutputIter>
void computePointQuery (IntegerOutputIter iter, const Point &x) const
 Get the indices of the bounding boxes that contain the point.
template<typename IntegerOutputIter>
void computeWindowQuery (IntegerOutputIter iter, const BBox &window) const
 Get the indices of the bounding boxes that overlap the window.
template<typename IntegerOutputIter>
void computeMinimumDistanceQuery (IntegerOutputIter iter, const Point &x) const
 Get the indices of the bounding boxes that might contain objects of minimum distance.
File I/O.
void printAscii (std::ostream &out) const
 Print the records.
Memory usage.
SizeType getMemoryUsage () const
 Return the memory usage of the tree.
Validity check.
void checkValidity () const
 Check the validity of the kd-tree.

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &out, const BBoxTree< N, T > &x)
 Write to a file stream.


Detailed Description

template<int N, typename T = double>
class geom::BBoxTree< N, T >

A bounding box tree in N-D.

A binary tree in N-D holding bounding boxes.


Constructor & Destructor Documentation

template<int N, typename T = double>
template<class BBoxInputIter>
geom::BBoxTree< N, T >::BBoxTree ( BBoxInputIter  begin,
BBoxInputIter  end,
const SizeType  leafSize = 8 
)

Construct from a range of bounding boxes.

Parameters:
begin is the beginning of the range of bounding boxes.
end is the end of the range of bounding boxes.
leafSize is the maximum number of objects that are stored in a leaf. The default value is 8.


Member Function Documentation

template<int N, typename T = double>
template<class BBoxInputIter>
void geom::BBoxTree< N, T >::build ( BBoxInputIter  begin,
BBoxInputIter  end,
const SizeType  leafSize = 8 
)

Build from a range of bounding boxes.

Parameters:
begin is the beginning of the range of bounding boxes.
end is the end of the range of bounding boxes.
leafSize is the maximum number of objects that are stored in a leaf. The default value is 8.


The documentation for this class was generated from the following file:
Generated on Fri Aug 24 12:56:03 2007 for Computational Geometry Package by  doxygen 1.4.7