#include <simple_octree.h>
Classes | |
class | Node |
Public Member Functions | |
void | build (const Scalar *bounds, Scalar voxel_size, NodeDataCreator *node_data_creator) |
Creates an empty octree with bounds at least as large as the ones provided as input and with leaf size equal to 'voxel_size'. | |
void | clear () |
Node * | createLeaf (Scalar x, Scalar y, Scalar z) |
Creates the leaf containing p = (x, y, z) and returns a pointer to it, however, only if p lies within the octree bounds! A more general version which allows p to be out of bounds is not implemented yet. The method returns NULL if p is not within the root bounds. If the leaf containing p already exists nothing happens and method just returns a pointer to the leaf. Note that for a new created leaf, the method also creates its data object. | |
const Scalar * | getBounds () const |
void | getBounds (Scalar b[6]) const |
Node * | getFullLeaf (int i, int j, int k) |
Since the leaves are aligned in a rectilinear grid, each leaf has a unique id. The method returns the full leaf, i.e., the one having a data object, with id [i, j, k] or NULL is no such leaf exists. | |
Node * | getFullLeaf (Scalar x, Scalar y, Scalar z) |
Returns a pointer to the full leaf, i.e., one having a data pbject, containing p = (x, y, z) or NULL if no such leaf exists. | |
std::vector< Node * > & | getFullLeaves () |
const std::vector< Node * > & | getFullLeaves () const |
Node * | getRoot () |
Scalar | getVoxelSize () const |
SimpleOctree () | |
virtual | ~SimpleOctree () |
Protected Member Functions | |
void | insertNeighbors (Node *node) |
Protected Attributes | |
Scalar | bounds_ [6] |
std::vector< Node * > | full_leaves_ |
NodeDataCreator * | node_data_creator_ |
Node * | root_ |
int | tree_levels_ |
Scalar | voxel_size_ |
Definition at line 57 of file simple_octree.h.
pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::SimpleOctree | ( | ) | [inline] |
Definition at line 191 of file simple_octree.hpp.
pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::~SimpleOctree | ( | ) | [inline, virtual] |
Definition at line 200 of file simple_octree.hpp.
void pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::build | ( | const Scalar * | bounds, |
Scalar | voxel_size, | ||
NodeDataCreator * | node_data_creator | ||
) | [inline] |
Creates an empty octree with bounds at least as large as the ones provided as input and with leaf size equal to 'voxel_size'.
Definition at line 222 of file simple_octree.hpp.
void pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::clear | ( | ) | [inline] |
Definition at line 208 of file simple_octree.hpp.
pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::Node * pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::createLeaf | ( | Scalar | x, |
Scalar | y, | ||
Scalar | z | ||
) | [inline] |
Creates the leaf containing p = (x, y, z) and returns a pointer to it, however, only if p lies within the octree bounds! A more general version which allows p to be out of bounds is not implemented yet. The method returns NULL if p is not within the root bounds. If the leaf containing p already exists nothing happens and method just returns a pointer to the leaf. Note that for a new created leaf, the method also creates its data object.
Definition at line 269 of file simple_octree.hpp.
const Scalar* pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::getBounds | ( | ) | const [inline] |
Definition at line 187 of file simple_octree.h.
void pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::getBounds | ( | Scalar | b[6] | ) | const [inline] |
Definition at line 190 of file simple_octree.h.
pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::Node * pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::getFullLeaf | ( | int | i, |
int | j, | ||
int | k | ||
) | [inline] |
Since the leaves are aligned in a rectilinear grid, each leaf has a unique id. The method returns the full leaf, i.e., the one having a data object, with id [i, j, k] or NULL is no such leaf exists.
Definition at line 311 of file simple_octree.hpp.
pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::Node * pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::getFullLeaf | ( | Scalar | x, |
Scalar | y, | ||
Scalar | z | ||
) | [inline] |
Returns a pointer to the full leaf, i.e., one having a data pbject, containing p = (x, y, z) or NULL if no such leaf exists.
Definition at line 325 of file simple_octree.hpp.
std::vector<Node*>& pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::getFullLeaves | ( | ) | [inline] |
Definition at line 178 of file simple_octree.h.
const std::vector<Node*>& pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::getFullLeaves | ( | ) | const [inline] |
Definition at line 181 of file simple_octree.h.
Node* pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::getRoot | ( | ) | [inline] |
Definition at line 184 of file simple_octree.h.
Scalar pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::getVoxelSize | ( | ) | const [inline] |
Definition at line 193 of file simple_octree.h.
void pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::insertNeighbors | ( | Node * | node | ) | [inline, protected] |
Definition at line 364 of file simple_octree.hpp.
Scalar pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::bounds_[6] [protected] |
Definition at line 200 of file simple_octree.h.
std::vector<Node*> pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::full_leaves_ [protected] |
Definition at line 203 of file simple_octree.h.
NodeDataCreator* pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::node_data_creator_ [protected] |
Definition at line 204 of file simple_octree.h.
Node* pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::root_ [protected] |
Definition at line 202 of file simple_octree.h.
int pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::tree_levels_ [protected] |
Definition at line 201 of file simple_octree.h.
Scalar pcl::recognition::SimpleOctree< NodeData, NodeDataCreator, Scalar >::voxel_size_ [protected] |
Definition at line 200 of file simple_octree.h.