 |
Voxomap
A C++11 voxel container.
|
Go to the documentation of this file. 1 #ifndef _VOXOMAP_OCTREE_HPP_
2 #define _VOXOMAP_OCTREE_HPP_
21 template <
class T_Node>
60 virtual T_Node*
push(T_Node& node);
65 virtual std::unique_ptr<T_Node>
pop(T_Node& node);
74 T_Node*
findNode(
int x,
int y,
int z,
int size)
const;
109 void setChild(T_Node& parent, T_Node& child, uint8_t childId);
133 T_Node*
push(T_Node& parent, T_Node& node);
141 T_Node*
push(T_Node& parent, T_Node& child, uint8_t childId);
151 void merge(T_Node& currentNode, T_Node& newNode);
158 #include "Octree.ipp"
160 #endif // _VOXOMAP_OCTREE_HPP_
T_Node * removeChild(T_Node &parent, uint8_t id)
Remove the child with id from the parent node.
uint8_t findNodeNb(T_Node const &node) const
Method use to find the index of node inside the root node.
void insertNode(T_Node &child, T_Node &newChild)
Create parent node that can contain child and newChild and push it into octree.
T_Node * getRootNode() const
Getter of the root node.
void removeParent(T_Node &child)
Remove the parent node of child from the octree.
virtual std::unique_ptr< T_Node > pop(T_Node &node)
Removes node from the octree.
virtual void clear()
Clear the octree Removes all nodes and all elements.
Octree()
Default constructor.
void merge(T_Node ¤tNode, T_Node &newNode)
Merge two nodes.
T_Node * findParentNode(T_Node &parent, T_Node &node, uint8_t &childId) const
Find node inside parent that can contain node.
T_Node * push(T_Node &parent, T_Node &child, uint8_t childId)
Push node inside parent.
virtual ~Octree()=default
Default virtual destructor.
Octree & operator=(Octree const &other)
Assignement operator.
T_Node * push(T_Node &parent, T_Node &node)
Push node inside parent.
void setChild(T_Node &parent, T_Node &child)
Set child as child of parent.
T_Node * findNode(int x, int y, int z, int size) const
Search the node that corresponds to the parameters.
Octree(Octree const &other)
Copy constructor.
std::unique_ptr< T_Node > _rootNode
Main node of the octree.
void setChild(T_Node &parent, T_Node &child, uint8_t childId)
Set child as child of parent.
virtual T_Node * push(T_Node &node)
Pushes node into the octree.
Octree(Octree &&other)
Move constructor.
Octree & operator=(Octree &&other)
Assignement move operator.