Octree container.
More...
#include <Octree.hpp>
|
uint8_t | findNodeNb (T_Node const &node) const |
| Method use to find the index of node inside the root node. More...
|
|
void | setChild (T_Node &parent, T_Node &child) |
| Set child as child of parent. More...
|
|
void | setChild (T_Node &parent, T_Node &child, uint8_t childId) |
| Set child as child of parent. More...
|
|
void | removeParent (T_Node &child) |
| Remove the parent node of child from the octree. More...
|
|
T_Node * | removeChild (T_Node &parent, uint8_t id) |
| Remove the child with id from the parent node. More...
|
|
T_Node * | findParentNode (T_Node &parent, T_Node &node, uint8_t &childId) const |
| Find node inside parent that can contain node. More...
|
|
T_Node * | push (T_Node &parent, T_Node &node) |
| Push node inside parent. More...
|
|
T_Node * | push (T_Node &parent, T_Node &child, uint8_t childId) |
| Push node inside parent. More...
|
|
void | insertNode (T_Node &child, T_Node &newChild) |
| Create parent node that can contain child and newChild and push it into octree. More...
|
|
void | merge (T_Node ¤tNode, T_Node &newNode) |
| Merge two nodes. More...
|
|
template<class T_Node>
class voxomap::Octree< T_Node >
Octree container.
Definition at line 22 of file Octree.hpp.
◆ Node
◆ Octree() [1/3]
◆ Octree() [2/3]
◆ Octree() [3/3]
◆ ~Octree()
Default virtual destructor.
◆ operator=() [1/2]
Assignement operator.
- Parameters
-
- Returns
- Reference to this
◆ operator=() [2/2]
Assignement move operator.
- Parameters
-
- Returns
- Reference to this
◆ push() [1/3]
Pushes node into the octree.
- Parameters
-
◆ pop()
template<class T_Node >
virtual std::unique_ptr<T_Node> voxomap::Octree< T_Node >::pop |
( |
T_Node & |
node | ) |
|
|
virtual |
Removes node from the octree.
- Returns
◆ findNode()
template<class T_Node >
T_Node* voxomap::Octree< T_Node >::findNode |
( |
int |
x, |
|
|
int |
y, |
|
|
int |
z, |
|
|
int |
size |
|
) |
| const |
Search the node that corresponds to the parameters.
- Parameters
-
x | X coordinate of the node |
y | Y coordinate of the node |
z | Z coordinate of the node |
size | Size of the node |
- Returns
- Pointer to the node if it exists otherwise nullptr
◆ clear()
Clear the octree Removes all nodes and all elements.
◆ getRootNode()
Getter of the root node.
- Returns
- The root node
◆ findNodeNb()
Method use to find the index of node inside the root node.
- Parameters
-
- Returns
- The index
◆ setChild() [1/2]
template<class T_Node >
void voxomap::Octree< T_Node >::setChild |
( |
T_Node & |
parent, |
|
|
T_Node & |
child |
|
) |
| |
|
protected |
Set child as child of parent.
- Parameters
-
parent | Parent node |
child | Child node |
◆ setChild() [2/2]
template<class T_Node >
void voxomap::Octree< T_Node >::setChild |
( |
T_Node & |
parent, |
|
|
T_Node & |
child, |
|
|
uint8_t |
childId |
|
) |
| |
|
protected |
Set child as child of parent.
- Parameters
-
parent | Parent node |
child | Child node |
childId | Id of the child inside parent's children array |
◆ removeParent()
Remove the parent node of child from the octree.
◆ removeChild()
template<class T_Node >
T_Node* voxomap::Octree< T_Node >::removeChild |
( |
T_Node & |
parent, |
|
|
uint8_t |
id |
|
) |
| |
|
protected |
Remove the child with id from the parent node.
- Returns
- The removed node
◆ findParentNode()
template<class T_Node >
T_Node* voxomap::Octree< T_Node >::findParentNode |
( |
T_Node & |
parent, |
|
|
T_Node & |
node, |
|
|
uint8_t & |
childId |
|
) |
| const |
|
protected |
Find node inside parent that can contain node.
- Parameters
-
parent | Parent node |
node | The new node |
childId | Id of the node inside the found parent |
- Returns
- The found parent node, nullptr if not exist
◆ push() [2/3]
Push node inside parent.
- Parameters
-
parent | Parent node |
node | Node to push |
- Returns
- Node added, can be different than node if a similar node already exist
◆ push() [3/3]
template<class T_Node >
T_Node* voxomap::Octree< T_Node >::push |
( |
T_Node & |
parent, |
|
|
T_Node & |
child, |
|
|
uint8_t |
childId |
|
) |
| |
|
protected |
Push node inside parent.
- Parameters
-
parent | Parent node |
child | Child node |
childId | Id of the child inside parent's children array |
- Returns
- Node added, can be different than node if a similar node already exist
◆ insertNode()
template<class T_Node >
void voxomap::Octree< T_Node >::insertNode |
( |
T_Node & |
child, |
|
|
T_Node & |
newChild |
|
) |
| |
|
protected |
Create parent node that can contain child and newChild and push it into octree.
◆ merge()
template<class T_Node >
void voxomap::Octree< T_Node >::merge |
( |
T_Node & |
currentNode, |
|
|
T_Node & |
newNode |
|
) |
| |
|
protected |
Merge two nodes.
- Parameters
-
currentNode | Node already present in the octree |
newNode | Node to merge inside |
◆ _rootNode
Main node of the octree.
Definition at line 153 of file Octree.hpp.
The documentation for this class was generated from the following files:
- C:/Users/micce/projects/voxomap/octree/Node.hpp
- C:/Users/micce/projects/voxomap/octree/Octree.hpp