48 #include <pcl/pcl_exports.h>
57 template<
typename NodeData,
typename NodeDataCreator,
typename Scalar =
float>
69 setCenter (
const Scalar *c);
72 setBounds (
const Scalar *b);
81 getBounds (Scalar b[6])
const { std::copy(bounds_, bounds_ + 6, b); }
90 setData (
const NodeData& src){ *data_ = src;}
95 inline const NodeData&
105 hasData (){
return static_cast<bool> (data_);}
110 inline const std::set<Node*>&
123 setData (NodeData* data){
delete data_; data_ = data;}
131 makeNeighbors (
Node* node);
142 Scalar center_[3], bounds_[6];
159 build (
const Scalar* bounds, Scalar voxel_size, NodeDataCreator* node_data_creator);
167 createLeaf (Scalar x, Scalar y, Scalar z);
172 getFullLeaf (
int i,
int j,
int k);
176 getFullLeaf (Scalar x, Scalar y, Scalar z);
178 inline std::vector<Node*>&
181 inline const std::vector<Node*>&
191 getBounds (Scalar b[6])
const { std::copy(bounds_, bounds_ + 6, b); }
198 insertNeighbors (Node* node);
201 Scalar voxel_size_{0.0f}, bounds_[6]{};
205 NodeDataCreator* node_data_creator_{
nullptr};
210 #include <pcl/recognition/impl/ransac_based/simple_octree.hpp>
std::set< Node * > full_leaf_neighbors_
const Scalar * getBounds() const
const std::set< Node * > & getNeighbors() const
void getBounds(Scalar b[6]) const
void setParent(Node *parent)
void setData(const NodeData &src)
void setData(NodeData *data)
const NodeData & getData() const
const Scalar * getCenter() const
std::vector< Node * > & getFullLeaves()
Scalar getVoxelSize() const
std::vector< Node * > full_leaves_
const Scalar * getBounds() const
const std::vector< Node * > & getFullLeaves() const
void getBounds(Scalar b[6]) const