#include <BBoxTree.h>
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. |
A binary tree in N-D holding bounding boxes.
geom::BBoxTree< N, T >::BBoxTree | ( | BBoxInputIter | begin, | |
BBoxInputIter | end, | |||
const SizeType | leafSize = 8 | |||
) |
Construct from a range of bounding boxes.
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. |
void geom::BBoxTree< N, T >::build | ( | BBoxInputIter | begin, | |
BBoxInputIter | end, | |||
const SizeType | leafSize = 8 | |||
) |
Build from a range of bounding boxes.
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. |