Loading...
Searching...
No Matches
pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT > Class Template Reference
Module octree

Octree double buffer class More...

`#include <pcl/octree/octree2buf_base.h>`

## Public Types

using | OctreeT = Octree2BufBase<LeafContainerT, BranchContainerT>
using | BranchNode = BufferedBranchNode<BranchContainerT>
using | LeafNode = OctreeLeafNode<LeafContainerT>
using | BranchContainer = BranchContainerT
using | LeafContainer = LeafContainerT
using | Iterator = OctreeDepthFirstIterator<OctreeT>
using | ConstIterator = const OctreeDepthFirstIterator<OctreeT>
using | LeafNodeIterator = OctreeLeafNodeDepthFirstIterator<OctreeT>
using | ConstLeafNodeIterator = const OctreeLeafNodeDepthFirstIterator<OctreeT>
using | LeafNodeDepthFirstIterator = OctreeLeafNodeDepthFirstIterator<OctreeT>
using | ConstLeafNodeDepthFirstIterator
using | DepthFirstIterator = OctreeDepthFirstIterator<OctreeT>
using | ConstDepthFirstIterator = const OctreeDepthFirstIterator<OctreeT>
using | BreadthFirstIterator = OctreeBreadthFirstIterator<OctreeT>
using | ConstBreadthFirstIterator = const OctreeBreadthFirstIterator<OctreeT>
using | LeafNodeBreadthIterator = OctreeLeafNodeBreadthFirstIterator<OctreeT>
using | ConstLeafNodeBreadthIterator

## Public Member Functions

Iterator | begin (uindex_t max_depth_arg=0)
const Iterator | end ()
LeafNodeDepthFirstIterator | leaf_depth_begin (uindex_t max_depth_arg=0)
const LeafNodeDepthFirstIterator | leaf_depth_end ()
DepthFirstIterator | depth_begin (uindex_t maxDepth_arg=0)
const DepthFirstIterator | depth_end ()
BreadthFirstIterator | breadth_begin (uindex_t max_depth_arg=0)
const BreadthFirstIterator | breadth_end ()
LeafNodeBreadthIterator | leaf_breadth_begin (uindex_t max_depth_arg=0u)
const LeafNodeBreadthIterator | leaf_breadth_end ()
| Octree2BufBase ()
| Empty constructor.
virtual | ~Octree2BufBase ()
| Empty deconstructor.
| Octree2BufBase (const Octree2BufBase &source)
| Copy constructor.
Octree2BufBase & | operator= (const Octree2BufBase &source)
| Copy constructor.
void | setMaxVoxelIndex (uindex_t max_voxel_index_arg)
| Set the maximum amount of voxels per dimension.
void | setTreeDepth (uindex_t depth_arg)
| Set the maximum depth of the octree.
uindex_t | getTreeDepth () const
| Get the maximum depth of the octree.
LeafContainerT * | createLeaf (uindex_t idx_x_arg, uindex_t idx_y_arg, uindex_t idx_z_arg)
| Create new leaf node at (idx_x_arg, idx_y_arg, idx_z_arg).
LeafContainerT * | findLeaf (uindex_t idx_x_arg, uindex_t idx_y_arg, uindex_t idx_z_arg)
| Find leaf node at (idx_x_arg, idx_y_arg, idx_z_arg).
bool | existLeaf (uindex_t idx_x_arg, uindex_t idx_y_arg, uindex_t idx_z_arg) const
| Check for the existence of leaf node at (idx_x_arg, idx_y_arg, idx_z_arg).
void | removeLeaf (uindex_t idx_x_arg, uindex_t idx_y_arg, uindex_t idx_z_arg)
| Remove leaf node at (idx_x_arg, idx_y_arg, idx_z_arg).
std::size_t | getLeafCount () const
| Return the amount of existing leafs in the octree.
std::size_t | getBranchCount () const
| Return the amount of existing branches in the octree.
void | deleteTree ()
| Delete the octree structure and its leaf nodes.
void | deletePreviousBuffer ()
| Delete octree structure of previous buffer.
void | deleteCurrentBuffer ()
| Delete the octree structure in the current buffer.
void | switchBuffers ()
| Switch buffers and reset current octree structure.
void | serializeTree (std::vector< char > &binary_tree_out_arg, bool do_XOR_encoding_arg=false)
| Serialize octree into a binary output vector describing its branch node structure.
void | serializeTree (std::vector< char > &binary_tree_out_arg, std::vector< LeafContainerT * > &leaf_container_vector_arg, bool do_XOR_encoding_arg=false)
| Serialize octree into a binary output vector describing its branch node structure and and push all DataT elements stored in the octree to a vector.
void | serializeLeafs (std::vector< LeafContainerT * > &leaf_container_vector_arg)
| Outputs a vector of all DataT elements that are stored within the octree leaf nodes.
void | serializeNewLeafs (std::vector< LeafContainerT * > &leaf_container_vector_arg)
| Outputs a vector of all DataT elements from leaf nodes, that do not exist in the previous octree buffer.
void | deserializeTree (std::vector< char > &binary_tree_in_arg, bool do_XOR_decoding_arg=false)
| Deserialize a binary octree description vector and create a corresponding octree structure.
void | deserializeTree (std::vector< char > &binary_tree_in_arg, std::vector< LeafContainerT * > &leaf_container_vector_arg, bool do_XOR_decoding_arg=false)
| Deserialize a binary octree description and create a corresponding octree structure.

## Protected Member Functions

OctreeNode * | getRootNode () const
| Retrieve root node.
LeafContainerT * | findLeaf (const OctreeKey &key_arg) const
| Find leaf node.
LeafContainerT * | createLeaf (const OctreeKey &key_arg)
| Create a leaf node.
bool | existLeaf (const OctreeKey &key_arg) const
| Check if leaf doesn't exist in the octree.
void | removeLeaf (const OctreeKey &key_arg)
| Remove leaf node from octree.
bool | branchHasChild (const BranchNode &branch_arg, unsigned char child_idx_arg) const
| Check if branch is pointing to a particular child node.
OctreeNode * | getBranchChildPtr (const BranchNode &branch_arg, unsigned char child_idx_arg) const
| Retrieve a child node pointer for child node at child_idx.
void | setBranchChildPtr (BranchNode &branch_arg, unsigned char child_idx_arg, OctreeNode *new_child_arg)
| Assign new child node to branch.
char | getBranchBitPattern (const BranchNode &branch_arg) const
| Generate bit pattern reflecting the existence of child node pointers for current buffer.
char | getBranchBitPattern (const BranchNode &branch_arg, unsigned char bufferSelector_arg) const
| Generate bit pattern reflecting the existence of child node pointers in specific buffer.
char | getBranchXORBitPattern (const BranchNode &branch_arg) const
| Generate XOR bit pattern reflecting differences between the two octree buffers.
bool | hasBranchChanges (const BranchNode &branch_arg) const
| Test if branch changed between previous and current buffer.
void | deleteBranchChild (BranchNode &branch_arg, unsigned char buffer_selector_arg, unsigned char child_idx_arg)
| Delete child node and all its subchilds from octree in specific buffer.
void | deleteBranchChild (BranchNode &branch_arg, unsigned char child_idx_arg)
| Delete child node and all its subchilds from octree in current buffer.
void | deleteBranch (BranchNode &branch_arg)
| Delete branch and all its subchilds from octree (both buffers).
BranchNode * | createBranchChild (BranchNode &branch_arg, unsigned char child_idx_arg)
| Fetch and add a new branch child to a branch class in current buffer.
LeafNode * | createLeafChild (BranchNode &branch_arg, unsigned char child_idx_arg)
| Fetch and add a new leaf child to a branch class.
uindex_t | createLeafRecursive (const OctreeKey &key_arg, uindex_t depth_mask_arg, BranchNode *branch_arg, LeafNode *&return_leaf_arg, BranchNode *&parent_of_leaf_arg, bool branch_reset_arg=false)
| Create a leaf node at octree key.
void | findLeafRecursive (const OctreeKey &key_arg, uindex_t depth_mask_arg, BranchNode *branch_arg, LeafContainerT *&result_arg) const
| Recursively search for a given leaf node and return a pointer.
bool | deleteLeafRecursive (const OctreeKey &key_arg, uindex_t depth_mask_arg, BranchNode *branch_arg)
| Recursively search and delete leaf node.
void | serializeTreeRecursive (BranchNode *branch_arg, OctreeKey &key_arg, std::vector< char > *binary_tree_out_arg, typename std::vector< LeafContainerT * > *leaf_container_vector_arg, bool do_XOR_encoding_arg=false, bool new_leafs_filter_arg=false)
| Recursively explore the octree and output binary octree description together with a vector of leaf node DataT content.

void

deserializeTreeRecursive (BranchNode *branch_arg, uindex_t depth_mask_arg, OctreeKey &key_arg, typename std::vector< char >::const_iterator &binary_tree_in_it_arg, typename std::vector< char >::const_iterator &binary_tree_in_it_end_arg, typename std::vector< LeafContainerT * >::const_iterator *leaf_container_vector_it_arg, typename std::vector< LeafContainerT * >::const_iterator *leaf_container_vector_it_end_arg, bool branch_reset_arg=false, bool do_XOR_decoding_arg=false)

| Rebuild an octree based on binary XOR octree description and DataT objects for leaf node initialization.
virtual void | serializeTreeCallback (LeafContainerT &, const OctreeKey &)
| Callback executed for every leaf node data during serialization.
virtual void | deserializeTreeCallback (LeafContainerT &, const OctreeKey &)
| Callback executed for every leaf node data during deserialization.
void | treeCleanUpRecursive (BranchNode *branch_arg)
| Recursively explore the octree and remove unused branch and leaf nodes.
bool | octreeCanResize ()
| Test if octree is able to dynamically change its depth.
void | printBinary (char data_arg)
| Prints binary representation of a byte - used for debugging.

## Protected Attributes

std::size_t | leaf_count_ {0}
| Amount of leaf nodes.
std::size_t | branch_count_ {1}
| Amount of branch nodes.
BranchNode * | root_node_
| Pointer to root branch node of octree.
uindex_t | depth_mask_ {0}
| Depth mask based on octree depth.
OctreeKey | max_key_
| key range
unsigned char | buffer_selector_ {0}
| Currently active octree buffer.
bool | tree_dirty_flag_ {false}
| flags indicating if unused branches and leafs might exist in previous buffer
uindex_t | octree_depth_ {0}
| Octree depth.
bool | dynamic_depth_enabled_ {false}
| Enable dynamic_depth.

## Friends

class | OctreeIteratorBase< OctreeT >
class | OctreeDepthFirstIterator< OctreeT >
class | OctreeBreadthFirstIterator< OctreeT >
class | OctreeLeafNodeDepthFirstIterator< OctreeT >
class | OctreeLeafNodeBreadthFirstIterator< OctreeT >

## Detailed Description

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>
class pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >

Octree double buffer class

This octree implementation keeps two separate octree structures in memory which allows for differentially comparison of the octree structures (change detection, differential encoding).

Note
  The tree depth defines the maximum amount of octree voxels / leaf nodes (should be initially defined).
  All leaf nodes are addressed by integer indices.
  The tree depth equates to the bit length of the voxel indices.

Author
  Julius Kammerl (juliu.nosp@m.s@ka.nosp@m.mmerl.nosp@m..de)

Definition at line 222 of file octree2buf_base.h.

## Member Typedef Documentation

## BranchContainer

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

using pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::BranchContainer = BranchContainerT

Definition at line 237 of file octree2buf_base.h.

## BranchNode

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

using pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::BranchNode = BufferedBranchNode<BranchContainerT>

Definition at line 234 of file octree2buf_base.h.

## BreadthFirstIterator

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

using pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::BreadthFirstIterator = OctreeBreadthFirstIterator<OctreeT>

Definition at line 292 of file octree2buf_base.h.

## ConstBreadthFirstIterator

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

using pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::ConstBreadthFirstIterator = const OctreeBreadthFirstIterator<OctreeT>

Definition at line 293 of file octree2buf_base.h.

## ConstDepthFirstIterator

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

using pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::ConstDepthFirstIterator = const OctreeDepthFirstIterator<OctreeT>

Definition at line 279 of file octree2buf_base.h.

## ConstIterator

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

using pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::ConstIterator = const OctreeDepthFirstIterator<OctreeT>

Definition at line 242 of file octree2buf_base.h.

## ConstLeafNodeBreadthIterator

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

using pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::ConstLeafNodeBreadthIterator

Initial value:
const OctreeLeafNodeBreadthFirstIterator<OctreeT>
pcl::octree::OctreeLeafNodeBreadthFirstIterator
Octree leaf node iterator class.
Definition octree_iterator.h:775

Definition at line 307 of file octree2buf_base.h.

## ConstLeafNodeDepthFirstIterator

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

using pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::ConstLeafNodeDepthFirstIterator

Initial value:
const OctreeLeafNodeDepthFirstIterator<OctreeT>
pcl::octree::OctreeLeafNodeDepthFirstIterator
Octree leaf node iterator class.
Definition octree_iterator.h:673

Definition at line 263 of file octree2buf_base.h.

## ConstLeafNodeIterator

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

using pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::ConstLeafNodeIterator = const OctreeLeafNodeDepthFirstIterator<OctreeT>

Definition at line 259 of file octree2buf_base.h.

## DepthFirstIterator

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

using pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::DepthFirstIterator = OctreeDepthFirstIterator<OctreeT>

Definition at line 278 of file octree2buf_base.h.

## Iterator

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

using pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::Iterator = OctreeDepthFirstIterator<OctreeT>

Definition at line 241 of file octree2buf_base.h.

## LeafContainer

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

using pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::LeafContainer = LeafContainerT

Definition at line 238 of file octree2buf_base.h.

## LeafNode

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

using pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::LeafNode = OctreeLeafNode<LeafContainerT>

Definition at line 235 of file octree2buf_base.h.

## LeafNodeBreadthIterator

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

using pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::LeafNodeBreadthIterator = OctreeLeafNodeBreadthFirstIterator<OctreeT>

Definition at line 306 of file octree2buf_base.h.

## LeafNodeDepthFirstIterator

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

using pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::LeafNodeDepthFirstIterator = OctreeLeafNodeDepthFirstIterator<OctreeT>

Definition at line 262 of file octree2buf_base.h.

## LeafNodeIterator

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

using pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::LeafNodeIterator = OctreeLeafNodeDepthFirstIterator<OctreeT>

Definition at line 258 of file octree2buf_base.h.

## OctreeT

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

using pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::OctreeT = Octree2BufBase<LeafContainerT, BranchContainerT>

Definition at line 225 of file octree2buf_base.h.

## Constructor & Destructor Documentation

## Octree2BufBase() [1/2]

template<typename LeafContainerT, typename BranchContainerT>

pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::Octree2BufBase | ( |  | ) |

Empty constructor.

Definition at line 46 of file octree2buf_base.hpp.

References root_node_.

## ~Octree2BufBase()

template<typename LeafContainerT, typename BranchContainerT>

pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::~Octree2BufBase | ( |  | ) |

virtual

Empty deconstructor.

Definition at line 52 of file octree2buf_base.hpp.

References deleteTree(), and root_node_.

## Octree2BufBase() [2/2]

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::Octree2BufBase | ( | const Octree2BufBase< LeafContainerT, BranchContainerT > & | source | ) |

inline

Copy constructor.

Definition at line 330 of file octree2buf_base.h.

## Member Function Documentation

## begin()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

Iterator pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::begin | ( | uindex_t | max_depth_arg = 0 | ) |

inline

Definition at line 244 of file octree2buf_base.h.

## branchHasChild()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

bool pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::branchHasChild | ( | const BranchNode & | branch_arg,
|  | unsigned char | child_idx_arg ) const

inline protected

Check if branch is pointing to a particular child node.

Parameters

  branch_arg | reference to octree branch class
  child_idx_arg | index to child node

Returns
  "true" if pointer to child node exists; "false" otherwise

Definition at line 606 of file octree2buf_base.h.

## breadth_begin()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

BreadthFirstIterator pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::breadth_begin | ( | uindex_t | max_depth_arg = 0 | ) |

inline

Definition at line 295 of file octree2buf_base.h.

## breadth_end()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

const BreadthFirstIterator pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::breadth_end | ( |  | ) |

inline

Definition at line 300 of file octree2buf_base.h.

## createBranchChild()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

BranchNode * pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::createBranchChild | ( | BranchNode & | branch_arg,
|  | unsigned char | child_idx_arg )

inline protected

Fetch and add a new branch child to a branch class in current buffer.

Parameters

  branch_arg | reference to octree branch class
  child_idx_arg | index to child node

Returns
  pointer of new branch child to this reference

Definition at line 791 of file octree2buf_base.h.

Referenced by deserializeTreeRecursive().

## createLeaf() [1/2]

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

LeafContainerT * pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::createLeaf | ( | const OctreeKey & | key_arg | ) |

inline protected

Create a leaf node.

Note
  If the leaf node at the given octree node does not exist, it will be created and added to the tree.

Parameters

  key_arg | octree key addressing a leaf node.

Returns
  pointer to an existing or created leaf container.

Definition at line 559 of file octree2buf_base.h.

## createLeaf() [2/2]

template<typename LeafContainerT, typename BranchContainerT>

LeafContainerT * pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::createLeaf | ( | uindex_t | idx_x_arg,
|  | uindex_t | idx_y_arg,
|  | uindex_t | idx_z_arg )

Create new leaf node at (idx_x_arg, idx_y_arg, idx_z_arg).

Note
  If leaf node already exist, this method returns the existing node

Parameters

  idx_x_arg | index of leaf node in the X axis.
  idx_y_arg | index of leaf node in the Y axis.
  idx_z_arg | index of leaf node in the Z axis.

Returns
  pointer to new leaf node container.

Definition at line 123 of file octree2buf_base.hpp.

References createLeaf().

Referenced by createLeaf().

## createLeafChild()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

LeafNode * pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::createLeafChild | ( | BranchNode & | branch_arg,
|  | unsigned char | child_idx_arg )

inline protected

Fetch and add a new leaf child to a branch class.

Parameters

  branch_arg | reference to octree branch class
  child_idx_arg | index to child node

Returns
  pointer of new leaf child to this reference

Definition at line 807 of file octree2buf_base.h.

Referenced by deserializeTreeRecursive().

## createLeafRecursive()

template<typename LeafContainerT, typename BranchContainerT>

uindex_t pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::createLeafRecursive | ( | const OctreeKey & | key_arg,
|  | uindex_t | depth_mask_arg,
|  | BranchNode * | branch_arg,
|  | LeafNode *& | return_leaf_arg,
|  | BranchNode *& | parent_of_leaf_arg,
|  | bool | branch_reset_arg = false )

protected

Create a leaf node at octree key.

If leaf node does already exist, it is returned.

Parameters

  key_arg | reference to an octree key
  depth_mask_arg | depth mask used for octree key analysis and for branch depth indicator
  branch_arg | current branch node
  return_leaf_arg | return pointer to leaf container
  parent_of_leaf_arg | return pointer to parent of leaf node
  branch_reset_arg | Reset pointer array of current branch

Returns
  depth mask at which leaf node was created/found

Definition at line 358 of file octree2buf_base.hpp.

Referenced by createLeaf().

## deleteBranch()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::deleteBranch | ( | BranchNode & | branch_arg | ) |

inline protected

Delete branch and all its subchilds from octree (both buffers).

Parameters

  branch_arg | reference to octree branch class

Definition at line 765 of file octree2buf_base.h.

Referenced by deleteBranchChild(), and deleteTree().

## deleteBranchChild() [1/2]

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::deleteBranchChild | ( | BranchNode & | branch_arg,
|  | unsigned char | buffer_selector_arg,
|  | unsigned char | child_idx_arg )

inline protected

Delete child node and all its subchilds from octree in specific buffer.

Parameters

  branch_arg | reference to octree branch class
  buffer_selector_arg | buffer selector
  child_idx_arg | index to child node

Definition at line 719 of file octree2buf_base.h.

Referenced by deleteBranch(), deleteBranchChild(), deserializeTreeRecursive(), serializeTreeRecursive(), and treeCleanUpRecursive().

## deleteBranchChild() [2/2]

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::deleteBranchChild | ( | BranchNode & | branch_arg,
|  | unsigned char | child_idx_arg )

inline protected

Delete child node and all its subchilds from octree in current buffer.

Parameters

  branch_arg | reference to octree branch class
  child_idx_arg | index to child node

Definition at line 756 of file octree2buf_base.h.

## deleteCurrentBuffer()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::deleteCurrentBuffer | ( |  | ) |

inline

Delete the octree structure in the current buffer.

Definition at line 448 of file octree2buf_base.h.

## deleteLeafRecursive()

template<typename LeafContainerT, typename BranchContainerT>

bool pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::deleteLeafRecursive | ( | const OctreeKey & | key_arg,
|  | uindex_t | depth_mask_arg,
|  | BranchNode * | branch_arg )

protected

Recursively search and delete leaf node.

Parameters

  key_arg | reference to an octree key
  depth_mask_arg | depth mask used for octree key analysis and branch depth indicator
  branch_arg | current branch node

Returns
  "true" if branch does not contain any childs; "false" otherwise. This indicates if current branch can be deleted.

Definition at line 505 of file octree2buf_base.hpp.

Referenced by removeLeaf().

## deletePreviousBuffer()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::deletePreviousBuffer | ( |  | ) |

inline

Delete octree structure of previous buffer.

Definition at line 441 of file octree2buf_base.h.

## deleteTree()

template<typename LeafContainerT, typename BranchContainerT>

void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::deleteTree | ( |  | ) |

Delete the octree structure and its leaf nodes.

Definition at line 165 of file octree2buf_base.hpp.

References branch_count_, deleteBranch(), depth_mask_, leaf_count_, octree_depth_, root_node_, and tree_dirty_flag_.

Referenced by ~Octree2BufBase().

## depth_begin()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

DepthFirstIterator pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::depth_begin | ( | uindex_t | maxDepth_arg = 0 | ) |

inline

Definition at line 281 of file octree2buf_base.h.

## depth_end()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

const DepthFirstIterator pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::depth_end | ( |  | ) |

inline

Definition at line 286 of file octree2buf_base.h.

## deserializeTree() [1/2]

template<typename LeafContainerT, typename BranchContainerT>

void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::deserializeTree | ( | std::vector< char > & | binary_tree_in_arg,
|  | bool | do_XOR_decoding_arg = false )

Deserialize a binary octree description vector and create a corresponding octree structure.

Leaf nodes are initialized with getDataTByKey(..).

Parameters

  binary_tree_in_arg | reference to input vector for reading binary tree structure.
  do_XOR_decoding_arg | select if binary tree structure is based on current octree (false) of based on a XOR comparison between current and previous octree

Definition at line 273 of file octree2buf_base.hpp.

References depth_mask_, deserializeTreeRecursive(), leaf_count_, root_node_, and tree_dirty_flag_.

## deserializeTree() [2/2]

template<typename LeafContainerT, typename BranchContainerT>

void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::deserializeTree | ( | std::vector< char > & | binary_tree_in_arg,
|  | std::vector< LeafContainerT * > & | leaf_container_vector_arg,
|  | bool | do_XOR_decoding_arg = false )

Deserialize a binary octree description and create a corresponding octree structure.

Leaf nodes are initialized with DataT elements from the dataVector.

Parameters

  binary_tree_in_arg | reference to inpvectoream for reading binary tree structure.
  leaf_container_vector_arg | vector of pointers to all LeafContainerT objects in the octree
  do_XOR_decoding_arg | select if binary tree structure is based on current octree (false) of based on a XOR comparison between current and previous octree

Definition at line 302 of file octree2buf_base.hpp.

References depth_mask_, deserializeTreeRecursive(), leaf_count_, and root_node_.

## deserializeTreeCallback()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

virtual void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::deserializeTreeCallback | ( | LeafContainerT & | ,
|  | const OctreeKey & | )

inline protected virtual

Callback executed for every leaf node data during deserialization.

Definition at line 931 of file octree2buf_base.h.

Referenced by deserializeTreeRecursive().

## deserializeTreeRecursive()

template<typename LeafContainerT, typename BranchContainerT>

void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::deserializeTreeRecursive | ( | BranchNode * | branch_arg,
|  | uindex_t | depth_mask_arg,
|  | OctreeKey & | key_arg,
|  | typename std::vector< char >::const_iterator & | binary_tree_in_it_arg,
|  | typename std::vector< char >::const_iterator & | binary_tree_in_it_end_arg,
|  | typename std::vector< LeafContainerT * >::const_iterator * | leaf_container_vector_it_arg,
|  | typename std::vector< LeafContainerT * >::const_iterator * | leaf_container_vector_it_end_arg,
|  | bool | branch_reset_arg = false,
|  | bool | do_XOR_decoding_arg = false )

protected

Rebuild an octree based on binary XOR octree description and DataT objects for leaf node initialization.

Parameters

  branch_arg | current branch node
  depth_mask_arg | depth mask used for octree key analysis and branch depth indicator
  key_arg | reference to an octree key
  binary_tree_in_it_arg | iterator of binary input data
  binary_tree_in_it_end_arg |
  leaf_container_vector_it_arg | iterator pointing to leaf container pointers to be added to a leaf node
  leaf_container_vector_it_end_arg | iterator pointing to leaf container pointers pointing to last object in input container.
  branch_reset_arg | Reset pointer array of current branch
  do_XOR_decoding_arg | select if binary tree structure is based on current octree (false) of based on a XOR comparison between current and previous octree

Definition at line 642 of file octree2buf_base.hpp.

References branch_count_, pcl::octree::BRANCH_NODE, buffer_selector_, createBranchChild(), createLeafChild(), deleteBranchChild(), deserializeTreeCallback(), deserializeTreeRecursive(), getBranchBitPattern(), pcl::octree::BufferedBranchNode< ContainerT >::getChildPtr(), pcl::octree::OctreeNode::getNodeType(), pcl::octree::BufferedBranchNode< ContainerT >::hasChild(), leaf_count_, pcl::octree::LEAF_NODE, pcl::octree::OctreeKey::popBranch(), pcl::octree::OctreeKey::pushBranch(), and pcl::octree::BufferedBranchNode< ContainerT >::setChildPtr().

Referenced by deserializeTree(), deserializeTree(), and deserializeTreeRecursive().

## end()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

const Iterator pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::end | ( |  | ) |

inline

Definition at line 249 of file octree2buf_base.h.

## existLeaf() [1/2]

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

bool pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::existLeaf | ( | const OctreeKey & | key_arg | ) | const

inline protected

Check if leaf doesn't exist in the octree.

Parameters

  key_arg | octree key addressing a leaf node.

Returns
  "true" if leaf node is found; "false" otherwise

Definition at line 577 of file octree2buf_base.h.

## existLeaf() [2/2]

template<typename LeafContainerT, typename BranchContainerT>

bool pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::existLeaf | ( | uindex_t | idx_x_arg,
|  | uindex_t | idx_y_arg,
|  | uindex_t | idx_z_arg ) const

Check for the existence of leaf node at (idx_x_arg, idx_y_arg, idx_z_arg).

Parameters

  idx_x_arg | index of leaf node in the X axis.
  idx_y_arg | index of leaf node in the Y axis.
  idx_z_arg | index of leaf node in the Z axis.

Returns
  "true" if leaf node search is successful, otherwise it returns "false".

Definition at line 137 of file octree2buf_base.hpp.

References existLeaf().

Referenced by existLeaf().

## findLeaf() [1/2]

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

LeafContainerT * pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::findLeaf | ( | const OctreeKey & | key_arg | ) | const

inline protected

Find leaf node.

Parameters

  key_arg | octree key addressing a leaf node.

Returns
  pointer to leaf container. If leaf node is not found, this pointer returns 0.

Definition at line 545 of file octree2buf_base.h.

## findLeaf() [2/2]

template<typename LeafContainerT, typename BranchContainerT>

LeafContainerT * pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::findLeaf | ( | uindex_t | idx_x_arg,
|  | uindex_t | idx_y_arg,
|  | uindex_t | idx_z_arg )

Find leaf node at (idx_x_arg, idx_y_arg, idx_z_arg).

Note
  If leaf node already exist, this method returns the existing node

Parameters

  idx_x_arg | index of leaf node in the X axis.
  idx_y_arg | index of leaf node in the Y axis.
  idx_z_arg | index of leaf node in the Z axis.

Returns
  pointer to leaf node container if found, null pointer otherwise.

Definition at line 109 of file octree2buf_base.hpp.

References findLeaf().

Referenced by existLeaf(), and findLeaf().

## findLeafRecursive()

template<typename LeafContainerT, typename BranchContainerT>

void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::findLeafRecursive | ( | const OctreeKey & | key_arg,
|  | uindex_t | depth_mask_arg,
|  | BranchNode * | branch_arg,
|  | LeafContainerT *& | result_arg ) const

protected

Recursively search for a given leaf node and return a pointer.

Note
  If leaf node does not exist, a 0 pointer is returned.

Parameters

  key_arg | reference to an octree key
  depth_mask_arg | depth mask used for octree key analysis and for branch depth indicator
  branch_arg | current branch node
  result_arg | pointer to leaf container class

Definition at line 469 of file octree2buf_base.hpp.

References buffer_selector_, findLeafRecursive(), pcl::octree::OctreeKey::getChildIdxWithDepthMask(), and pcl::octree::BufferedBranchNode< ContainerT >::getChildPtr().

Referenced by findLeaf(), and findLeafRecursive().

## getBranchBitPattern() [1/2]

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

char pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::getBranchBitPattern | ( | const BranchNode & | branch_arg | ) | const

inline protected

Generate bit pattern reflecting the existence of child node pointers for current buffer.

Parameters

  branch_arg | reference to octree branch class

Returns
  a single byte with 8 bits of child node information

Definition at line 642 of file octree2buf_base.h.

Referenced by deserializeTreeRecursive(), serializeTreeRecursive(), and treeCleanUpRecursive().

## getBranchBitPattern() [2/2]

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

char pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::getBranchBitPattern | ( | const BranchNode & | branch_arg,
|  | unsigned char | bufferSelector_arg ) const

inline protected

Generate bit pattern reflecting the existence of child node pointers in specific buffer.

Parameters

  branch_arg | reference to octree branch class
  bufferSelector_arg | buffer selector

Returns
  a single byte with 8 bits of child node information

Definition at line 663 of file octree2buf_base.h.

## getBranchChildPtr()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

OctreeNode * pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::getBranchChildPtr | ( | const BranchNode & | branch_arg,
|  | unsigned char | child_idx_arg ) const

inline protected

Retrieve a child node pointer for child node at child_idx.

Parameters

  branch_arg | reference to octree branch class
  child_idx_arg | index to child node

Returns
  pointer to octree child node class

Definition at line 618 of file octree2buf_base.h.

## getBranchCount()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

std::size_t pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::getBranchCount | ( |  | ) | const

inline

Return the amount of existing branches in the octree.

Returns
  amount of branch nodes.

Definition at line 429 of file octree2buf_base.h.

## getBranchXORBitPattern()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

char pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::getBranchXORBitPattern | ( | const BranchNode & | branch_arg | ) | const

inline protected

Generate XOR bit pattern reflecting differences between the two octree buffers.

Parameters

  branch_arg | reference to octree branch class

Returns
  a single byte with 8 bits of child node XOR difference information

Definition at line 684 of file octree2buf_base.h.

Referenced by hasBranchChanges(), and treeCleanUpRecursive().

## getLeafCount()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

std::size_t pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::getLeafCount | ( |  | ) | const

inline

Return the amount of existing leafs in the octree.

Returns
  amount of registered leaf nodes.

Definition at line 420 of file octree2buf_base.h.

## getRootNode()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

OctreeNode * pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::getRootNode | ( |  | ) | const

inline protected

Retrieve root node.

Definition at line 534 of file octree2buf_base.h.

## getTreeDepth()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

uindex_t pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::getTreeDepth | ( |  | ) | const

inline

Get the maximum depth of the octree.

Returns
  depth_arg: maximum depth of octree

Definition at line 374 of file octree2buf_base.h.

## hasBranchChanges()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

bool pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::hasBranchChanges | ( | const BranchNode & | branch_arg | ) | const

inline protected

Test if branch changed between previous and current buffer.

Parameters

  branch_arg | reference to octree branch class

Returns
  "true", if child node information differs between current and previous octree buffer

Definition at line 708 of file octree2buf_base.h.

## leaf_breadth_begin()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

LeafNodeBreadthIterator pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::leaf_breadth_begin | ( | uindex_t | max_depth_arg = 0u | ) |

inline

Definition at line 311 of file octree2buf_base.h.

## leaf_breadth_end()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

const LeafNodeBreadthIterator pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::leaf_breadth_end | ( |  | ) |

inline

Definition at line 318 of file octree2buf_base.h.

## leaf_depth_begin()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

LeafNodeDepthFirstIterator pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::leaf_depth_begin | ( | uindex_t | max_depth_arg = 0 | ) |

inline

Definition at line 266 of file octree2buf_base.h.

## leaf_depth_end()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

const LeafNodeDepthFirstIterator pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::leaf_depth_end | ( |  | ) |

inline

Definition at line 272 of file octree2buf_base.h.

## octreeCanResize()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

bool pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::octreeCanResize | ( |  | ) |

inline protected

Test if octree is able to dynamically change its depth.

This is required for adaptive bounding box adjustment.

Returns
  "false" - not resizeable due to XOR serialization

Definition at line 949 of file octree2buf_base.h.

## operator=()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

Octree2BufBase & pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::operator= | ( | const Octree2BufBase< LeafContainerT, BranchContainerT > & | source | ) |

inline

Copy constructor.

Definition at line 344 of file octree2buf_base.h.

## printBinary()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::printBinary | ( | char | data_arg | ) |

inline protected

Prints binary representation of a byte - used for debugging.

Parameters

  data_arg | - byte to be printed to stdout

Definition at line 958 of file octree2buf_base.h.

## removeLeaf() [1/2]

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::removeLeaf | ( | const OctreeKey & | key_arg | ) |

inline protected

Remove leaf node from octree.

Parameters

  key_arg | octree key addressing a leaf node.

Definition at line 586 of file octree2buf_base.h.

## removeLeaf() [2/2]

template<typename LeafContainerT, typename BranchContainerT>

void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::removeLeaf | ( | uindex_t | idx_x_arg,
|  | uindex_t | idx_y_arg,
|  | uindex_t | idx_z_arg )

Remove leaf node at (idx_x_arg, idx_y_arg, idx_z_arg).

Parameters

  idx_x_arg | index of leaf node in the X axis.
  idx_y_arg | index of leaf node in the Y axis.
  idx_z_arg | index of leaf node in the Z axis.

Definition at line 151 of file octree2buf_base.hpp.

References removeLeaf().

Referenced by removeLeaf().

## serializeLeafs()

template<typename LeafContainerT, typename BranchContainerT>

void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::serializeLeafs | ( | std::vector< LeafContainerT * > & | leaf_container_vector_arg | ) |

Outputs a vector of all DataT elements that are stored within the octree leaf nodes.

Parameters

  leaf_container_vector_arg | vector of pointers to all LeafContainerT objects in the octree

Definition at line 253 of file octree2buf_base.hpp.

References leaf_count_, root_node_, serializeTreeRecursive(), and tree_dirty_flag_.

## serializeNewLeafs()

template<typename LeafContainerT, typename BranchContainerT>

void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::serializeNewLeafs | ( | std::vector< LeafContainerT * > & | leaf_container_vector_arg | ) |

Outputs a vector of all DataT elements from leaf nodes, that do not exist in the previous octree buffer.

Parameters

  leaf_container_vector_arg | vector of pointers to all LeafContainerT objects in the octree

Definition at line 339 of file octree2buf_base.hpp.

References leaf_count_, root_node_, serializeTreeRecursive(), and tree_dirty_flag_.

## serializeTree() [1/2]

template<typename LeafContainerT, typename BranchContainerT>

void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::serializeTree | ( | std::vector< char > & | binary_tree_out_arg,
|  | bool | do_XOR_encoding_arg = false )

Serialize octree into a binary output vector describing its branch node structure.

Parameters

  binary_tree_out_arg | reference to output vector for writing binary tree structure.
  do_XOR_encoding_arg | select if binary tree structure should be generated based on current octree (false) of based on a XOR comparison between current and previous octree

Definition at line 206 of file octree2buf_base.hpp.

References branch_count_, root_node_, serializeTreeRecursive(), and tree_dirty_flag_.

## serializeTree() [2/2]

template<typename LeafContainerT, typename BranchContainerT>

void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::serializeTree | ( | std::vector< char > & | binary_tree_out_arg,
|  | std::vector< LeafContainerT * > & | leaf_container_vector_arg,
|  | bool | do_XOR_encoding_arg = false )

Serialize octree into a binary output vector describing its branch node structure and and push all DataT elements stored in the octree to a vector.

Parameters

  binary_tree_out_arg | reference to output vector for writing binary tree structure.
  leaf_container_vector_arg | pointer to all LeafContainerT objects in the octree
  do_XOR_encoding_arg | select if binary tree structure should be generated based on current octree (false) of based on a XOR comparison between current and previous octree

Definition at line 225 of file octree2buf_base.hpp.

References branch_count_, leaf_count_, root_node_, serializeTreeRecursive(), and tree_dirty_flag_.

## serializeTreeCallback()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

virtual void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::serializeTreeCallback | ( | LeafContainerT & | ,
|  | const OctreeKey & | )

inline protected virtual

Callback executed for every leaf node data during serialization.

Definition at line 925 of file octree2buf_base.h.

Referenced by serializeTreeRecursive().

## serializeTreeRecursive()

template<typename LeafContainerT, typename BranchContainerT>

void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::serializeTreeRecursive | ( | BranchNode * | branch_arg,
|  | OctreeKey & | key_arg,
|  | std::vector< char > * | binary_tree_out_arg,
|  | typename std::vector< LeafContainerT * > * | leaf_container_vector_arg,
|  | bool | do_XOR_encoding_arg = false,
|  | bool | new_leafs_filter_arg = false )

protected

Recursively explore the octree and output binary octree description together with a vector of leaf node DataT content.

Parameters

  branch_arg | current branch node
  key_arg | reference to an octree key
  binary_tree_out_arg | binary output vector
  leaf_container_vector_arg | vector to return pointers to all leaf container in the tree.
  do_XOR_encoding_arg | select if binary tree structure should be generated based on current octree (false) of based on a XOR comparison between current and previous octree
  new_leafs_filter_arg | execute callback only for leaf nodes that did not exist in preceding buffer

Definition at line 557 of file octree2buf_base.hpp.

References pcl::octree::BRANCH_NODE, buffer_selector_, deleteBranchChild(), getBranchBitPattern(), pcl::octree::BufferedBranchNode< ContainerT >::getChildPtr(), pcl::octree::OctreeNode::getNodeType(), pcl::octree::BufferedBranchNode< ContainerT >::hasChild(), pcl::octree::LEAF_NODE, pcl::octree::OctreeKey::popBranch(), pcl::octree::OctreeKey::pushBranch(), serializeTreeCallback(), and serializeTreeRecursive().

Referenced by serializeLeafs(), serializeNewLeafs(), serializeTree(), serializeTree(), and serializeTreeRecursive().

## setBranchChildPtr()

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::setBranchChildPtr | ( | BranchNode & | branch_arg,
|  | unsigned char | child_idx_arg,
|  | OctreeNode * | new_child_arg )

inline protected

Assign new child node to branch.

Parameters

  branch_arg | reference to octree branch class
  child_idx_arg | index to child node
  new_child_arg | pointer to new child node

Definition at line 629 of file octree2buf_base.h.

## setMaxVoxelIndex()

template<typename LeafContainerT, typename BranchContainerT>

void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::setMaxVoxelIndex | ( | uindex_t | max_voxel_index_arg | ) |

Set the maximum amount of voxels per dimension.

Parameters

  max_voxel_index_arg | maximum amount of voxels per dimension

Definition at line 62 of file octree2buf_base.hpp.

References depth_mask_, and pcl::octree::OctreeKey::maxDepth.

## setTreeDepth()

template<typename LeafContainerT, typename BranchContainerT>

void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::setTreeDepth | ( | uindex_t | depth_arg | ) |

Set the maximum depth of the octree.

Parameters

  depth_arg | maximum depth of octree

Definition at line 87 of file octree2buf_base.hpp.

References depth_mask_, max_key_, and octree_depth_.

## switchBuffers()

template<typename LeafContainerT, typename BranchContainerT>

void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::switchBuffers | ( |  | ) |

Switch buffers and reset current octree structure.

Definition at line 182 of file octree2buf_base.hpp.

References branch_count_, buffer_selector_, leaf_count_, root_node_, tree_dirty_flag_, and treeCleanUpRecursive().

## treeCleanUpRecursive()

template<typename LeafContainerT, typename BranchContainerT>

void pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::treeCleanUpRecursive | ( | BranchNode * | branch_arg | ) |

protected

Recursively explore the octree and remove unused branch and leaf nodes.

Parameters

  branch_arg | current branch node

Definition at line 790 of file octree2buf_base.hpp.

References pcl::octree::BRANCH_NODE, buffer_selector_, deleteBranchChild(), getBranchBitPattern(), getBranchXORBitPattern(), pcl::octree::BufferedBranchNode< ContainerT >::getChildPtr(), pcl::octree::OctreeNode::getNodeType(), pcl::octree::BufferedBranchNode< ContainerT >::hasChild(), pcl::octree::LEAF_NODE, and treeCleanUpRecursive().

Referenced by deleteCurrentBuffer(), deletePreviousBuffer(), switchBuffers(), and treeCleanUpRecursive().

## Friends And Related Symbol Documentation

## OctreeBreadthFirstIterator< OctreeT >

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

friend class OctreeBreadthFirstIterator< OctreeT >

friend

Definition at line 205 of file octree2buf_base.h.

## OctreeDepthFirstIterator< OctreeT >

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

friend class OctreeDepthFirstIterator< OctreeT >

friend

Definition at line 205 of file octree2buf_base.h.

## OctreeIteratorBase< OctreeT >

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

friend class OctreeIteratorBase< OctreeT >

friend

Definition at line 205 of file octree2buf_base.h.

## OctreeLeafNodeBreadthFirstIterator< OctreeT >

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

friend class OctreeLeafNodeBreadthFirstIterator< OctreeT >

friend

Definition at line 205 of file octree2buf_base.h.

## OctreeLeafNodeDepthFirstIterator< OctreeT >

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

friend class OctreeLeafNodeDepthFirstIterator< OctreeT >

friend

Definition at line 205 of file octree2buf_base.h.

## Member Data Documentation

## branch_count_

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

std::size_t pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::branch_count_ {1}

protected

Amount of branch nodes.

Definition at line 978 of file octree2buf_base.h.

Referenced by deleteTree(), deserializeTreeRecursive(), operator=(), serializeTree(), serializeTree(), and switchBuffers().

## buffer_selector_

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

unsigned char pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::buffer_selector_ {0}

protected

Currently active octree buffer.

Definition at line 990 of file octree2buf_base.h.

Referenced by deserializeTreeRecursive(), findLeafRecursive(), operator=(), serializeTreeRecursive(), switchBuffers(), and treeCleanUpRecursive().

## depth_mask_

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

uindex_t pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::depth_mask_ {0}

protected

Depth mask based on octree depth.

Definition at line 984 of file octree2buf_base.h.

Referenced by deleteTree(), deserializeTree(), deserializeTree(), operator=(), setMaxVoxelIndex(), and setTreeDepth().

## dynamic_depth_enabled_

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

bool pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::dynamic_depth_enabled_ {false}

protected

Enable dynamic_depth.

Note
  Note that this parameter is ignored in octree2buf!

Definition at line 1001 of file octree2buf_base.h.

Referenced by operator=().

## leaf_count_

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

std::size_t pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::leaf_count_ {0}

protected

Amount of leaf nodes.

Definition at line 975 of file octree2buf_base.h.

Referenced by deleteTree(), deserializeTree(), deserializeTree(), deserializeTreeRecursive(), operator=(), serializeLeafs(), serializeNewLeafs(), serializeTree(), and switchBuffers().

## max_key_

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

OctreeKey pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::max_key_

protected

key range

Definition at line 987 of file octree2buf_base.h.

Referenced by operator=(), and setTreeDepth().

## octree_depth_

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

uindex_t pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::octree_depth_ {0}

protected

Octree depth.

Definition at line 997 of file octree2buf_base.h.

Referenced by deleteTree(), operator=(), and setTreeDepth().

## root_node_

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

BranchNode* pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::root_node_

protected

Pointer to root branch node of octree.

Definition at line 981 of file octree2buf_base.h.

Referenced by deleteTree(), deserializeTree(), deserializeTree(), Octree2BufBase(), operator=(), serializeLeafs(), serializeNewLeafs(), serializeTree(), serializeTree(), switchBuffers(), and ~Octree2BufBase().

## tree_dirty_flag_

template<typename LeafContainerT = index_t, typename BranchContainerT = OctreeContainerEmpty>

bool pcl::octree::Octree2BufBase< LeafContainerT, BranchContainerT >::tree_dirty_flag_ {false}

protected

flags indicating if unused branches and leafs might exist in previous buffer

Definition at line 994 of file octree2buf_base.h.

Referenced by deleteTree(), deserializeTree(), operator=(), serializeLeafs(), serializeNewLeafs(), serializeTree(), serializeTree(), and switchBuffers().

The documentation for this class was generated from the following files:

- pcl/octree/octree2buf_base.h
- pcl/octree/impl/octree2buf_base.hpp