Loading...
Searching...
No Matches
pcl::octree::OctreeBranchNode< ContainerT > Class Template Reference

Abstract octree branch class More...

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

Inheritance diagram for pcl::octree::OctreeBranchNode< ContainerT >:

## Public Member Functions

| OctreeBranchNode ()
| Empty constructor.
| OctreeBranchNode (const OctreeBranchNode &source)
| Copy constructor.
OctreeBranchNode & | operator= (const OctreeBranchNode &source)
| Copy operator.
OctreeBranchNode * | deepCopy () const override
| Octree deep copy method.
| ~OctreeBranchNode () override=default
| Empty deconstructor.
OctreeNode *& | operator[] (unsigned char child_idx_arg)
| Access operator.
OctreeNode * | getChildPtr (unsigned char child_idx_arg) const
| Get pointer to child.
void | setChildPtr (OctreeNode *child, unsigned char index)
| Get pointer to child.
bool | hasChild (unsigned char child_idx_arg) const
| Check if branch is pointing to a particular child node.
node_type_t | getNodeType () const override
| Check if branch can be pruned.
void | reset ()
const ContainerT * | operator-> () const
| Get const pointer to container.
ContainerT * | operator-> ()
| Get pointer to container.
const ContainerT & | operator* () const
| Get const reference to container.
ContainerT & | operator* ()
| Get reference to container.
const ContainerT & | getContainer () const
| Get const reference to container.
ContainerT & | getContainer ()
| Get reference to container.
const ContainerT * | getContainerPtr () const
| Get const pointer to container.
ContainerT * | getContainerPtr ()
| Get pointer to container.
Public Member Functions inherited from pcl::octree::OctreeNode
| OctreeNode ()=default
virtual | ~OctreeNode ()=default

## Protected Attributes

std::array< OctreeNode *, 8 > | child_node_array_ {}
ContainerT | container_

## Detailed Description

template<typename ContainerT>
class pcl::octree::OctreeBranchNode< ContainerT >

Abstract octree branch class

Note
  Octree branch classes may collect data of type DataT

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

Definition at line 179 of file octree_nodes.h.

## Constructor & Destructor Documentation

## OctreeBranchNode() [1/2]

template<typename ContainerT >

pcl::octree::OctreeBranchNode< ContainerT >::OctreeBranchNode | ( |  | ) |

inline

Empty constructor.

Definition at line 182 of file octree_nodes.h.

## OctreeBranchNode() [2/2]

template<typename ContainerT >

pcl::octree::OctreeBranchNode< ContainerT >::OctreeBranchNode | ( | const OctreeBranchNode< ContainerT > & | source | ) |

inline

Copy constructor.

Definition at line 185 of file octree_nodes.h.

References pcl::octree::OctreeBranchNode< ContainerT >::child_node_array_.

## ~OctreeBranchNode()

template<typename ContainerT >

pcl::octree::OctreeBranchNode< ContainerT >::~OctreeBranchNode | ( |  | ) |

override default

Empty deconstructor.

## Member Function Documentation

## deepCopy()

template<typename ContainerT >

OctreeBranchNode * pcl::octree::OctreeBranchNode< ContainerT >::deepCopy | ( |  | ) | const

inline override virtual

Octree deep copy method.

Implements pcl::octree::OctreeNode.

Definition at line 209 of file octree_nodes.h.

## getChildPtr()

template<typename ContainerT >

OctreeNode * pcl::octree::OctreeBranchNode< ContainerT >::getChildPtr | ( | unsigned char | child_idx_arg | ) | const

inline

Get pointer to child.

Parameters

  child_idx_arg | index to child node, must be less than 8

Returns
  OctreeNode pointer

Definition at line 234 of file octree_nodes.h.

References pcl::octree::OctreeBranchNode< ContainerT >::child_node_array_.

Referenced by pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::branchHasChild(), pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::getBranchBitPattern(), and pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::getBranchChildPtr().

## getContainer() [1/2]

template<typename ContainerT >

ContainerT & pcl::octree::OctreeBranchNode< ContainerT >::getContainer | ( |  | ) |

inline

Get reference to container.

Definition at line 337 of file octree_nodes.h.

References pcl::octree::OctreeBranchNode< ContainerT >::container_.

## getContainer() [2/2]

template<typename ContainerT >

const ContainerT & pcl::octree::OctreeBranchNode< ContainerT >::getContainer | ( |  | ) | const

inline

Get const reference to container.

Definition at line 330 of file octree_nodes.h.

References pcl::octree::OctreeBranchNode< ContainerT >::container_.

## getContainerPtr() [1/2]

template<typename ContainerT >

ContainerT * pcl::octree::OctreeBranchNode< ContainerT >::getContainerPtr | ( |  | ) |

inline

Get pointer to container.

Definition at line 351 of file octree_nodes.h.

References pcl::octree::OctreeBranchNode< ContainerT >::container_.

## getContainerPtr() [2/2]

template<typename ContainerT >

const ContainerT * pcl::octree::OctreeBranchNode< ContainerT >::getContainerPtr | ( |  | ) | const

inline

Get const pointer to container.

Definition at line 344 of file octree_nodes.h.

References pcl::octree::OctreeBranchNode< ContainerT >::container_.

## getNodeType()

template<typename ContainerT >

node_type_t pcl::octree::OctreeBranchNode< ContainerT >::getNodeType | ( |  | ) | const

inline override virtual

Check if branch can be pruned.

Note
  if all children are leaf nodes AND contain identical containers, branch can be pruned

Returns
  "true" if branch can be pruned; "false" otherwise

Get the type of octree node. Returns LEAVE_NODE type

Implements pcl::octree::OctreeNode.

Definition at line 287 of file octree_nodes.h.

References pcl::octree::BRANCH_NODE.

## hasChild()

template<typename ContainerT >

bool pcl::octree::OctreeBranchNode< ContainerT >::hasChild | ( | unsigned char | child_idx_arg | ) | const

inline

Check if branch is pointing to a particular child node.

Parameters

  child_idx_arg | index to child node, must be less than 8

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

Definition at line 256 of file octree_nodes.h.

References pcl::octree::OctreeBranchNode< ContainerT >::child_node_array_.

Referenced by pcl::octree::OctreeBase< LeafContainerT, BranchContainerT >::deleteBranchChild(), and pcl::octree::OctreeBase< OctreeContainerPointIndices, OctreeContainerEmpty >::deserializeTree().

## operator*() [1/2]

template<typename ContainerT >

ContainerT & pcl::octree::OctreeBranchNode< ContainerT >::operator* | ( |  | ) |

inline

Get reference to container.

Definition at line 323 of file octree_nodes.h.

References pcl::octree::OctreeBranchNode< ContainerT >::container_.

## operator*() [2/2]

template<typename ContainerT >

const ContainerT & pcl::octree::OctreeBranchNode< ContainerT >::operator* | ( |  | ) | const

inline

Get const reference to container.

Definition at line 316 of file octree_nodes.h.

References pcl::octree::OctreeBranchNode< ContainerT >::container_.

## operator->() [1/2]

template<typename ContainerT >

ContainerT * pcl::octree::OctreeBranchNode< ContainerT >::operator-> | ( |  | ) |

inline

Get pointer to container.

Definition at line 309 of file octree_nodes.h.

References pcl::octree::OctreeBranchNode< ContainerT >::container_.

## operator->() [2/2]

template<typename ContainerT >

const ContainerT * pcl::octree::OctreeBranchNode< ContainerT >::operator-> | ( |  | ) | const

inline

Get const pointer to container.

Definition at line 302 of file octree_nodes.h.

References pcl::octree::OctreeBranchNode< ContainerT >::container_.

## operator=()

template<typename ContainerT >

OctreeBranchNode & pcl::octree::OctreeBranchNode< ContainerT >::operator= | ( | const OctreeBranchNode< ContainerT > & | source | ) |

inline

Copy operator.

Definition at line 195 of file octree_nodes.h.

References pcl::octree::OctreeBranchNode< ContainerT >::child_node_array_.

## operator[]()

template<typename ContainerT >

OctreeNode *& pcl::octree::OctreeBranchNode< ContainerT >::operator[] | ( | unsigned char | child_idx_arg | ) |

inline

Access operator.

Parameters

  child_idx_arg | index to child node, must be less than 8

Returns
  OctreeNode pointer

Definition at line 223 of file octree_nodes.h.

References pcl::octree::OctreeBranchNode< ContainerT >::child_node_array_.

## reset()

template<typename ContainerT >

void pcl::octree::OctreeBranchNode< ContainerT >::reset | ( |  | ) |

inline

Definition at line 294 of file octree_nodes.h.

References pcl::octree::OctreeBranchNode< ContainerT >::child_node_array_, and pcl::octree::OctreeBranchNode< ContainerT >::container_.

## setChildPtr()

template<typename ContainerT >

void pcl::octree::OctreeBranchNode< ContainerT >::setChildPtr | ( | OctreeNode * | child,
|  | unsigned char | index
| ) |  |

inline

Get pointer to child.

Parameters

  index | index to child node, must be less than 8

Returns
  OctreeNode pointer

Definition at line 245 of file octree_nodes.h.

References pcl::octree::OctreeBranchNode< ContainerT >::child_node_array_.

## Member Data Documentation

## child_node_array_

template<typename ContainerT >

std::array<OctreeNode*, 8> pcl::octree::OctreeBranchNode< ContainerT >::child_node_array_ {}

protected

Definition at line 357 of file octree_nodes.h.

Referenced by pcl::octree::OctreeBranchNode< ContainerT >::getChildPtr(), pcl::octree::OctreeBranchNode< ContainerT >::hasChild(), pcl::octree::OctreeBranchNode< ContainerT >::OctreeBranchNode(), pcl::octree::OctreeBranchNode< ContainerT >::operator=(), pcl::octree::OctreeBranchNode< ContainerT >::operator[](), pcl::octree::OctreeBranchNode< ContainerT >::reset(), and pcl::octree::OctreeBranchNode< ContainerT >::setChildPtr().

## container_

template<typename ContainerT >

ContainerT pcl::octree::OctreeBranchNode< ContainerT >::container_

protected

Definition at line 359 of file octree_nodes.h.

Referenced by pcl::octree::OctreeBranchNode< ContainerT >::getContainer(), pcl::octree::OctreeBranchNode< ContainerT >::getContainer(), pcl::octree::OctreeBranchNode< ContainerT >::getContainerPtr(), pcl::octree::OctreeBranchNode< ContainerT >::getContainerPtr(), pcl::octree::OctreeBranchNode< ContainerT >::operator*(), pcl::octree::OctreeBranchNode< ContainerT >::operator*(), pcl::octree::OctreeBranchNode< ContainerT >::operator->(), pcl::octree::OctreeBranchNode< ContainerT >::operator->(), and pcl::octree::OctreeBranchNode< ContainerT >::reset().

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

- pcl/octree/octree_nodes.h