|
Voxomap
A C++11 voxel container.
|
#include <Node.hpp>
Public Member Functions | |
| Node (int x, int y, int z, int size) | |
| Constructs Node with its properties. More... | |
| Node (Node const &other) | |
| Copy constructor. More... | |
| virtual | ~Node () |
| Destructor method. More... | |
| int | getSize () const |
| Returns size of node. More... | |
| int | getX () const |
| Returns x position of the node. More... | |
| int | getY () const |
| Returns y position of the node. More... | |
| int | getZ () const |
| Returns z position of the node. More... | |
| int | getNbChildren () const |
| Returns the number of children, [0, 8]. More... | |
| std::array< T_Node *, 8 > const & | getChildren () const |
| Returns the children array. More... | |
| T_Node * | getParent () const |
| Returns the parent node. More... | |
| Octree< T_Node > * | getOctree () const |
| Returns the octree. More... | |
| bool | empty () const |
| Check if node has children. More... | |
| bool | operator== (Node const &other) const |
| Compare coordinate and size of the node. More... | |
| bool | operator!= (Node const &other) const |
| Compare coordinate and size of the node. More... | |
| void | merge (T_Node const &other) |
| Merge method of the node, do nothing. More... | |
| T_Node * | findNode (int x, int y, int z, int size) const |
| Find node. More... | |
| T_Node * | getChild (int x, int y, int z) const |
| Get the child node that can contain the point at coordinate xyz. More... | |
| int | getChildPos (int x, int y, int z) const |
| Get the child node position that can contain the point at coordinate xyz. More... | |
| uint8_t | getChildId () const |
| template<typename T > | |
| bool | isInside (T x, T y, T z, T sx, T sy, T sz) const |
| Check if box is inside the node. More... | |
| template<typename T > | |
| bool | isInside (T x, T y, T z) const |
| Check if point is inside the node. More... | |
| template<typename T > | |
| bool | isInside (T x, T y, T z, T size) const |
| Check if box is inside the node. More... | |
| bool | isInside (T_Node &node) const |
| Check if node is inside the node. More... | |
Protected Member Functions | |
| void | changeOctree (Octree< T_Node > &octree) |
| Change octree of the node and all its children. More... | |
Protected Attributes | |
| std::array< T_Node *, 8 > | _children |
| Array of children. More... | |
| T_Node * | _parent = nullptr |
| Parent node. More... | |
| Octree< T_Node > * | _octree = nullptr |
| Parent octree. More... | |
| int | _x = 0 |
| X coordinate. More... | |
| int | _y = 0 |
| Y coordinate. More... | |
| int | _z = 0 |
| Z coordinate. More... | |
| int | _size = 0 |
| Size of the node. More... | |
| uint8_t | _childId = 0 |
| Child id inside parent's children array. More... | |
| uint8_t | _nbChildren = 0 |
| Number of node inside the children array. More... | |
| friend | Octree< T_Node > |
Basic node of Octree.
| voxomap::Node< T_Node >::Node | ( | int | x, |
| int | y, | ||
| int | z, | ||
| int | size | ||
| ) |
Constructs Node with its properties.
| x | X coordinate |
| y | Y coordinate |
| z | Z coordinate |
| size | Size of the node |
| voxomap::Node< T_Node >::Node | ( | Node< T_Node > const & | other | ) |
Copy constructor.
|
virtual |
Destructor method.
| int voxomap::Node< T_Node >::getSize | ( | ) | const |
Returns size of node.
| int voxomap::Node< T_Node >::getX | ( | ) | const |
Returns x position of the node.
| int voxomap::Node< T_Node >::getY | ( | ) | const |
Returns y position of the node.
| int voxomap::Node< T_Node >::getZ | ( | ) | const |
Returns z position of the node.
| int voxomap::Node< T_Node >::getNbChildren | ( | ) | const |
Returns the number of children, [0, 8].
| std::array<T_Node*, 8> const& voxomap::Node< T_Node >::getChildren | ( | ) | const |
Returns the children array.
| T_Node* voxomap::Node< T_Node >::getParent | ( | ) | const |
Returns the parent node.
| Octree<T_Node>* voxomap::Node< T_Node >::getOctree | ( | ) | const |
Returns the octree.
| bool voxomap::Node< T_Node >::empty | ( | ) | const |
Check if node has children.
| bool voxomap::Node< T_Node >::operator== | ( | Node< T_Node > const & | other | ) | const |
Compare coordinate and size of the node.
| bool voxomap::Node< T_Node >::operator!= | ( | Node< T_Node > const & | other | ) | const |
Compare coordinate and size of the node.
| void voxomap::Node< T_Node >::merge | ( | T_Node< T_Node > const & | other | ) |
Merge method of the node, do nothing.
| T_Node* voxomap::Node< T_Node >::findNode | ( | int | x, |
| int | y, | ||
| int | z, | ||
| int | size | ||
| ) | const |
Find node.
| x | X coordinate |
| y | Y coordinate |
| z | Z coordinate |
| size | Size of the node |
| T_Node* voxomap::Node< T_Node >::getChild | ( | int | x, |
| int | y, | ||
| int | z | ||
| ) | const |
Get the child node that can contain the point at coordinate xyz.
| x | X coordinate |
| y | Y coordinate |
| z | Z coordinate |
| int voxomap::Node< T_Node >::getChildPos | ( | int | x, |
| int | y, | ||
| int | z | ||
| ) | const |
Get the child node position that can contain the point at coordinate xyz.
| x | X coordinate |
| y | Y coordinate |
| z | Z coordinate |
| uint8_t voxomap::Node< T_Node >::getChildId | ( | ) | const |
| bool voxomap::Node< T_Node >::isInside | ( | T | x, |
| T | y, | ||
| T | z, | ||
| T | sx, | ||
| T | sy, | ||
| T | sz | ||
| ) | const |
Check if box is inside the node.
| x | X coordinate of the box |
| y | Y coordinate of the box |
| z | Z coordinate of the box |
| sx | Size on x axis of the box |
| sy | Size on y axis of the box |
| sz | Size on z axis of the box |
| bool voxomap::Node< T_Node >::isInside | ( | T | x, |
| T | y, | ||
| T | z | ||
| ) | const |
Check if point is inside the node.
| x | X coordinate |
| y | Y coordinate |
| z | Z coordinate |
| bool voxomap::Node< T_Node >::isInside | ( | T | x, |
| T | y, | ||
| T | z, | ||
| T | size | ||
| ) | const |
Check if box is inside the node.
| x | X coordinate |
| y | Y coordinate |
| z | Z coordinate |
| size | Size of the box |
| bool voxomap::Node< T_Node >::isInside | ( | T_Node< T_Node > & | node | ) | const |
Check if node is inside the node.
| node | The node |
|
protected |
Change octree of the node and all its children.
| octree | Reference to the octree |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |