|
EasyNav Plugins
|
Class to be used to set and get values of a cell of the Grid. More...
#include <bonxai.hpp>


Public Member Functions | |
| Accessor (VoxelGrid &grid) | |
| LeafGrid * | getLeafGrid (const CoordT &coord, bool create_if_missing=false) |
| getLeafGrid gets the pointer to the LeafGrid containing the cell. | |
| bool | setCellOff (const CoordT &coord) |
| setCellOff will disable a cell without deleting its content. | |
| bool | setCellOn (const CoordT &coord, const DataT &default_value=DataT()) |
| setCellOn is similar to setValue, but the value is changed only if the cell has been created, otherwise, the previous value is used. | |
| bool | setValue (const CoordT &coord, const DataT &value) |
| setValue of a cell. | |
| DataT * | value (const CoordT &coord, bool create_if_missing=false) |
| value getter. | |
| Public Member Functions inherited from VoxelGrid< DataT >::ConstAccessor | |
| ConstAccessor (const VoxelGrid &grid) | |
| const LeafGrid * | getLeafGrid (const CoordT &coord) const |
| bool | isCellOn (const CoordT &coord) const |
| isCellOn only check if a cell is in "On" state | |
| const InnerGrid * | lastInnerGrid () const |
| lastInnerGrid returns the pointer to the InnerGrid in the cache. | |
| const LeafGrid * | lastLeafGrid () const |
| lastLeafGrid returns the pointer to the LeafGrid in the cache. | |
| const DataT * | value (const CoordT &coord) const |
| value getter. | |
Additional Inherited Members | |
| Protected Attributes inherited from VoxelGrid< DataT >::ConstAccessor | |
| const VoxelGrid & | grid_ |
| CoordT | prev_inner_coord_ = {std::numeric_limits<int32_t>::max(), 0, 0} |
| const InnerGrid * | prev_inner_ptr_ = nullptr |
| const LeafGrid * | prev_leaf_ptr_ = nullptr |
| CoordT | prev_root_coord_ = {std::numeric_limits<int32_t>::max(), 0, 0} |
Class to be used to set and get values of a cell of the Grid.
It uses caching to speed up computation.
Create an instance of this object with the method VoxelGrid::createAccessor()
| Accessor | ( | VoxelGrid & | grid | ) |
|
nodiscard |
getLeafGrid gets the pointer to the LeafGrid containing the cell.
It is the basic class used by setValue() and value().
| coord | Coordinate of the cell. |
| create_if_missing | if true, create the Root, Inner and Leaf, if not present. |
| bool setCellOff | ( | const CoordT & | coord | ) |
setCellOff will disable a cell without deleting its content.
| coord | coordinate of the cell. |
| bool setCellOn | ( | const CoordT & | coord, |
| const DataT & | default_value = DataT() ) |
setCellOn is similar to setValue, but the value is changed only if the cell has been created, otherwise, the previous value is used.
| coord | coordinate of the cell. |
| default_value | default value of the cell. Use only if the cell did not exist before. |
| bool setValue | ( | const CoordT & | coord, |
| const DataT & | value ) |
setValue of a cell.
If the cell did not exist, it is created.
| coord | coordinate of the cell |
| value | value to set. |
|
nodiscard |
value getter.
| coord | coordinate of the cell. |