Classes | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
grid_map::signed_distance_field::Gridmap3dLookup Struct Reference

#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...
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ Gridmap3dLookup() [1/2]

grid_map::signed_distance_field::Gridmap3dLookup::Gridmap3dLookup ( )
default

Default constructor: creates an empty grid

◆ Gridmap3dLookup() [2/2]

grid_map::signed_distance_field::Gridmap3dLookup::Gridmap3dLookup ( const size_t_3d gridsize,
const Position3 gridOrigin,
double  resolution 
)
inline

Constructor

Parameters
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.

Member Function Documentation

◆ getNearestPositiveInteger()

static size_t grid_map::signed_distance_field::Gridmap3dLookup::getNearestPositiveInteger ( double  val,
double  max 
)
inlinestaticnoexcept

rounds subindex value and clamps it to [0, max]

Definition at line 98 of file Gridmap3dLookup.hpp.

◆ linearIndex()

size_t grid_map::signed_distance_field::Gridmap3dLookup::linearIndex ( const size_t_3d index) const
inlinenoexcept

Returns the linear node index from a 3d node index

Definition at line 87 of file Gridmap3dLookup.hpp.

◆ linearSize()

size_t grid_map::signed_distance_field::Gridmap3dLookup::linearSize ( ) const
inlinenoexcept

Linear size

Definition at line 95 of file Gridmap3dLookup.hpp.

◆ nearestNode()

size_t_3d grid_map::signed_distance_field::Gridmap3dLookup::nearestNode ( const Position3 position) const
inlinenoexcept

Returns the 3d index of the grid node closest to the query position

Definition at line 69 of file Gridmap3dLookup.hpp.

◆ nodePosition()

Position3 grid_map::signed_distance_field::Gridmap3dLookup::nodePosition ( const size_t_3d index) const
inlinenoexcept

Returns the 3d node position from a 3d index

Definition at line 79 of file Gridmap3dLookup.hpp.

Member Data Documentation

◆ gridMaxIndexAsDouble_

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.

◆ gridOrigin_

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.

◆ gridsize_

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.

◆ resolution_

double grid_map::signed_distance_field::Gridmap3dLookup::resolution_ {1.0}

Grid resolution.

Definition at line 45 of file Gridmap3dLookup.hpp.


The documentation for this struct was generated from the following file:


grid_map_sdf
Author(s): Takahiro Miki , Péter Fankhauser
autogenerated on Wed Jul 5 2023 02:23:42