41 #include <pcl/octree/octree_container.h>
80 template <
typename ContainerT>
178 template <
typename ContainerT>
187 for (
unsigned char i = 0; i < 8; ++i)
199 for (
unsigned char i = 0; i < 8; ++i) {
225 assert(child_idx_arg < 8);
236 assert(child_idx_arg < 8);
Abstract octree branch class
bool hasChild(unsigned char child_idx_arg) const
Check if branch is pointing to a particular child node.
const ContainerT & getContainer() const
Get const reference to container.
const ContainerT * getContainerPtr() const
Get const pointer to container.
OctreeBranchNode * deepCopy() const override
Octree deep copy method.
~OctreeBranchNode() override=default
Empty deconstructor.
ContainerT & operator*()
Get reference to container.
ContainerT * getContainerPtr()
Get pointer to container.
ContainerT & getContainer()
Get reference to container.
const ContainerT & operator*() const
Get const reference to container.
const ContainerT * operator->() const
Get const pointer to container.
OctreeBranchNode & operator=(const OctreeBranchNode &source)
Copy operator.
OctreeBranchNode()
Empty constructor.
OctreeBranchNode(const OctreeBranchNode &source)
Copy constructor.
ContainerT * operator->()
Get pointer to container.
OctreeNode *& operator[](unsigned char child_idx_arg)
Access operator.
OctreeNode * getChildPtr(unsigned char child_idx_arg) const
Get pointer to child.
node_type_t getNodeType() const override
Check if branch can be pruned.
void setChildPtr(OctreeNode *child, unsigned char index)
Get pointer to child.
std::array< OctreeNode *, 8 > child_node_array_
Abstract octree leaf class
node_type_t getNodeType() const override
Get the type of octree node.
const ContainerT & operator*() const
Get const reference to container.
OctreeLeafNode(const OctreeLeafNode &source)
Copy constructor.
const ContainerT * operator->() const
Get const pointer to container.
const ContainerT & getContainer() const
Get const reference to container.
const ContainerT * getContainerPtr() const
Get const pointer to container.
~OctreeLeafNode() override=default
Empty deconstructor.
ContainerT & getContainer()
Get reference to container.
OctreeLeafNode< ContainerT > * deepCopy() const override
Method to perform a deep copy of the octree.
ContainerT * operator->()
Get pointer to container.
ContainerT * getContainerPtr()
Get pointer to container.
ContainerT & operator*()
Get reference to container.
OctreeLeafNode()
Empty constructor.
Abstract octree node class
virtual node_type_t getNodeType() const =0
Pure virtual method for retrieving the type of octree node (branch or leaf)
virtual ~OctreeNode()=default
virtual OctreeNode * deepCopy() const =0
Pure virtual method to perform a deep copy of the octree.
#define PCL_MAKE_ALIGNED_OPERATOR_NEW
Macro to signal a class requires a custom allocator.
Defines functions, macros and traits for allocating and using memory.
Defines all the PCL and non-PCL macros used.