39 #ifndef PCL_OCTREE_NODE_H
40 #define PCL_OCTREE_NODE_H
49 #include <pcl/pcl_macros.h>
51 #include "octree_container.h"
83 getNodeType ()
const = 0;
87 deepCopy ()
const = 0;
97 template<
typename ContainerT>
200 template<
typename ContainerT>
221 for (i = 0; i < 8; ++i)
234 for (i = 0; i < 8; ++i)
260 assert(child_idx_arg < 8);
271 assert(child_idx_arg < 8);
289 inline bool hasChild (
unsigned char child_idx_arg)
const
virtual ~OctreeLeafNode()
Empty deconstructor.
const ContainerT * operator->() const
Get const pointer to container.
virtual ~OctreeBranchNode()
Empty deconstructor.
OctreeLeafNode(const OctreeLeafNode &source)
Copy constructor.
OctreeNode * child_node_array_[8]
ContainerT & getContainer()
Get reference to container.
virtual OctreeBranchNode * deepCopy() const
Octree deep copy method.
virtual OctreeNode * deepCopy() const =0
Pure virtual method to perform a deep copy of the octree.
const ContainerT * operator->() const
Get const pointer to container.
const ContainerT * getContainerPtr() const
Get const pointer to container.
Abstract octree leaf class
OctreeBranchNode()
Empty constructor.
const ContainerT & getContainer() const
Get const reference to container.
Abstract octree branch class
OctreeBranchNode & operator=(const OctreeBranchNode &source)
Copy operator.
ContainerT * getContainerPtr()
Get pointer to container.
bool hasChild(unsigned char child_idx_arg) const
Check if branch is pointing to a particular child node.
const ContainerT * getContainerPtr() const
Get const pointer to container.
OctreeNode * getChildPtr(unsigned char child_idx_arg) const
Get pointer to child.
Abstract octree node class
const ContainerT & operator*() const
Get const reference to container.
ContainerT & getContainer()
Get reference to container.
virtual node_type_t getNodeType() const
Get the type of octree node.
virtual OctreeLeafNode< ContainerT > * deepCopy() const
Method to perform a deep copy of the octree.
ContainerT * getContainerPtr()
Get pointer to container.
OctreeBranchNode(const OctreeBranchNode &source)
Empty constructor.
const ContainerT & operator*() const
Get const reference to container.
OctreeNode *& operator[](unsigned char child_idx_arg)
Access operator.
void setChildPtr(OctreeNode *child, unsigned char index)
Get pointer to child.
virtual node_type_t getNodeType() const
Check if branch can be pruned.
OctreeLeafNode()
Empty constructor.
const ContainerT & getContainer() const
Get const reference to container.