46 #ifndef SIMPLE_OCTREE_H_
47 #define SIMPLE_OCTREE_H_
49 #include <pcl/pcl_exports.h>
56 template<
typename NodeData,
typename NodeDataCreator,
typename Scalar =
float>
68 setCenter (
const Scalar *c);
71 setBounds (
const Scalar *b);
80 getBounds (Scalar b[6])
const { memcpy (b, bounds_, 6*
sizeof (Scalar));}
89 setData (
const NodeData& src){ *data_ = src;}
94 inline const NodeData&
104 hasData (){
return static_cast<bool> (data_);}
109 inline const std::set<Node*>&
122 setData (NodeData* data){
if ( data_ )
delete data_; data_ = data;}
130 makeNeighbors (
Node* node);
141 Scalar center_[3], bounds_[6];
158 build (
const Scalar* bounds, Scalar voxel_size, NodeDataCreator* node_data_creator);
166 createLeaf (Scalar x, Scalar y, Scalar z);
171 getFullLeaf (
int i,
int j,
int k);
175 getFullLeaf (Scalar x, Scalar y, Scalar z);
177 inline std::vector<Node*>&
180 inline const std::vector<Node*>&
190 getBounds (Scalar b[6])
const { memcpy (b, bounds_, 6*
sizeof (Scalar));}
197 insertNeighbors (Node* node);
209 #include <pcl/recognition/impl/ransac_based/simple_octree.hpp>
const std::vector< Node * > & getFullLeaves() const
void setData(NodeData *data)
This file defines compatibility wrappers for low level I/O functions.
std::set< Node * > full_leaf_neighbors_
const Scalar * getCenter() const
void setData(const NodeData &src)
Scalar getVoxelSize() const
const Scalar * getBounds() const
const NodeData & getData() const
NodeDataCreator * node_data_creator_
void getBounds(Scalar b[6]) const
void setParent(Node *parent)
const Scalar * getBounds() const
std::vector< Node * > full_leaves_
std::vector< Node * > & getFullLeaves()
const std::set< Node * > & getNeighbors() const
void getBounds(Scalar b[6]) const