93 root_key[0] = root_key[1] = root_key[2] = this->
tree_max_val;
99 unsigned int& min_hits,
100 unsigned int max_depth,
109 for (
unsigned int i=0; i<8; ++i) {
120 node_centers.push_back(this->
keyToCoord(parent_key, depth));
const unsigned int tree_depth
Maximum tree depth is fixed to 16 currently.
bool coordToKeyChecked(const point3d &coord, OcTreeKey &key) const
CountingOcTreeNode * createNodeChild(CountingOcTreeNode *node, unsigned int childIdx)
Creates (allocates) the i-th child of the node.
CountingOcTreeNode * getNodeChild(CountingOcTreeNode *node, unsigned int childIdx) const
CountingOcTree(double resolution)
Default constructor, sets resolution of leafs.
uint8_t computeChildIdx(const OcTreeKey &key, int depth)
generate child index (between 0 and 7) from key at given tree depth
void getCentersMinHits(point3d_list &node_centers, unsigned int min_hits) const
bool nodeHasChildren(const CountingOcTreeNode *node) const
void getCentersMinHitsRecurs(point3d_list &node_centers, unsigned int &min_hits, unsigned int max_depth, CountingOcTreeNode *node, unsigned int depth, const OcTreeKey &parent_key) const
static StaticMemberInitializer countingOcTreeMemberInit
static member to ensure static initialization (only once)
std::list< octomath::Vector3 > point3d_list
This class represents a three-dimensional vector.
void computeChildKey(unsigned int pos, key_type center_offset_key, const OcTreeKey &parent_key, OcTreeKey &child_key)
CountingOcTreeNode()
implementation of CountingOcTreeNode -------------------------------—
virtual CountingOcTreeNode * updateNode(const point3d &value)
CountingOcTreeNode * root
Pointer to the root NODE, NULL for empty tree.
bool nodeChildExists(const CountingOcTreeNode *node, unsigned int childIdx) const
unsigned int getCount() const
const unsigned int tree_max_val
double keyToCoord(key_type key, unsigned depth) const