#include <Gridmap3dLookup.hpp>
Classes | |
struct | size_t_3d |
size_t in 3 dimensions More... | |
Public Member Functions | |
Gridmap3dLookup ()=default | |
Gridmap3dLookup (const size_t_3d &gridsize, const Position3 &gridOrigin, double resolution) | |
size_t | linearIndex (const size_t_3d &index) const noexcept |
size_t | linearSize () const noexcept |
size_t_3d | nearestNode (const Position3 &position) const noexcept |
Position3 | nodePosition (const size_t_3d &index) const noexcept |
Static Public Member Functions | |
static size_t | getNearestPositiveInteger (double val, double max) noexcept |
Public Attributes | |
Position3 | gridMaxIndexAsDouble_ {0.0, 0.0, 0.0} |
Maximum index per dimension stored as double. More... | |
Position3 | gridOrigin_ {0.0, 0.0, 0.0} |
Origin position of the grid. More... | |
size_t_3d | gridsize_ {0, 0, 0} |
3D size of the grid More... | |
double | resolution_ {1.0} |
Grid resolution. More... | |
Stores 3 dimensional grid information and provides methods to convert between position - 3d Index - linear index.
As with the 2D GridMap, the X-Y position is opposite to the row-col-index: (X,Y) is highest at (0,0) and lowest at (n, m). The z-position is increasing with the layer-index.
Definition at line 22 of file Gridmap3dLookup.hpp.
|
default |
Default constructor: creates an empty grid
|
inline |
Constructor
gridsize | : x, y, z size of the grid |
gridOrigin | : position at x=y=z=0 |
resolution | : (>0.0) size of 1 voxel |
Definition at line 56 of file Gridmap3dLookup.hpp.
|
inlinestaticnoexcept |
rounds subindex value and clamps it to [0, max]
Definition at line 98 of file Gridmap3dLookup.hpp.
|
inlinenoexcept |
Returns the linear node index from a 3d node index
Definition at line 87 of file Gridmap3dLookup.hpp.
|
inlinenoexcept |
Linear size
Definition at line 95 of file Gridmap3dLookup.hpp.
|
inlinenoexcept |
Returns the 3d index of the grid node closest to the query position
Definition at line 69 of file Gridmap3dLookup.hpp.
|
inlinenoexcept |
Returns the 3d node position from a 3d index
Definition at line 79 of file Gridmap3dLookup.hpp.
Position3 grid_map::signed_distance_field::Gridmap3dLookup::gridMaxIndexAsDouble_ {0.0, 0.0, 0.0} |
Maximum index per dimension stored as double.
Definition at line 42 of file Gridmap3dLookup.hpp.
Position3 grid_map::signed_distance_field::Gridmap3dLookup::gridOrigin_ {0.0, 0.0, 0.0} |
Origin position of the grid.
Definition at line 39 of file Gridmap3dLookup.hpp.
size_t_3d grid_map::signed_distance_field::Gridmap3dLookup::gridsize_ {0, 0, 0} |
3D size of the grid
Definition at line 36 of file Gridmap3dLookup.hpp.
double grid_map::signed_distance_field::Gridmap3dLookup::resolution_ {1.0} |
Grid resolution.
Definition at line 45 of file Gridmap3dLookup.hpp.