Physsim::Octree Class Reference

A generic octree. More...

#include <Octree.h>

List of all members.

Public Member Functions

 Octree ()
 Constructs an octree with zero minimum resolution.
 Octree (Real minres)
 Constructs an octree with the specified minimum resolution.
 Octree (Real minres, const Vector3 &lo_bounds, const Vector3 &hi_bounds)
 Constructs an octree with the specified minimum resolution and bounds.
 Octree (boost::shared_ptr< Octree > parent, Real minres, const Vector3 &lo_bounds, const Vector3 &hi_bounds)
void insert (const Vector3 &point)
 Inserts a point into the octree.
bool clear_cell (const Vector3 &point)
 Clears the point from the Octree.
OctreePtr is_cell_occupied (const Vector3 &point) const
 Returns NULL if empty, Octree of leaf if occupied.
bool is_occupied (const Vector3 &lo_bounds, const Vector3 &hi_bounds) const
 Determines (quickly) whether any part of a rectangular region of space is occupied.
void set_bounds (const Vector3 &lo_bounds, const Vector3 &hi_bounds)
 (Re)sets the bounds for this octree
void get_bounds (Vector3 &lo_bounds, Vector3 &hi_bounds) const
 Gets the bounds for this Octree cell.
void reset ()
const std::vector< OctreePtr > & get_children () const
 Gets the vector of children of this octree node.
void set_parent (OctreePtr parent)
 Sets the parent of this octree.
OctreePtr get_parent () const
 Gets the parent of this octree.
unsigned get_num_points () const
 Gets the number of points in this octree node.
Real get_min_res () const
 Gets the minimum resolution for this octree.
void set_min_res (Real minres)
 Sets the minimum resolution for this octree.
bool is_leaf () const
 Determines whether this octree node is a leaf.


Detailed Description

A generic octree.


Constructor & Destructor Documentation

Octree::Octree (  ) 

Constructs an octree with zero minimum resolution.

The bounds of the octree are set to -/+ infinity.

Octree::Octree ( Real  minres  ) 

Constructs an octree with the specified minimum resolution.

The bounds of the octree are set to -/+ infinity.


Member Function Documentation

bool Octree::clear_cell ( const Vector3 point  ) 

Clears the point from the Octree.

Returns:
true if the point was found in the octree (and deleted), and false otherwise


The documentation for this class was generated from the following files:
Generated on Wed Oct 24 14:54:23 2007 for Physsim by  doxygen 1.5.1