MIRA
Public Types | Public Member Functions | List of all members
VoxelMap< T > Class Template Reference

#include <maps/VoxelMap.h>

Public Types

typedef boost::multi_array< T, 3 > Array
 
typedef boost::multi_array::extent_range Range
 

Public Member Functions

 VoxelMap (float cellSize=0.1f)
 
 VoxelMap (const Size3i &size, float cellSize, const Point3i &offset=Point3i(0, 0, 0))
 
 VoxelMap (const Box3f &region, float cellSize)
 Creates a new voxel map that covers the specified region. More...
 
 VoxelMap (const Box3i &region, float cellSize)
 
 ~VoxelMap ()
 
float getCellSize () const
 Returns the size of each cell in meter. More...
 
Point3i getOffset () const
 Returns the offset of the map, e.g. the index of the cell that is located in the origin. More...
 
VoxelMapoperator= (const T &value)
 Set all voxel cells to the specified value. More...
 
Box3f getRegion () const
 Retuns the region that is covered by the GridMap. More...
 
Box3i getMapRegion () const
 Retuns the region that is covered by the GridMap in grid cells. More...
 
Arraydata ()
 
const Arraydata () const
 
T & operator() (const Point3i &idx)
 
const T & operator() (const Point3i &idx) const
 
Point3i world2map (const Point3f &p) const
 Convert a given point to map coordinates. More...
 
Point3f map2world (const Point3i &p) const
 Convert a given point to world coordinates. More...
 
void clip (const Box3i &region, const T &valueForNewCells)
 

Member Typedef Documentation

◆ Array

typedef boost::multi_array<T,3> Array

◆ Range

typedef boost::multi_array::extent_range Range

Constructor & Destructor Documentation

◆ VoxelMap() [1/4]

VoxelMap ( float  cellSize = 0.1f)
inline

◆ VoxelMap() [2/4]

VoxelMap ( const Size3i size,
float  cellSize,
const Point3i offset = Point3i(0, 0, 0) 
)
inline

◆ VoxelMap() [3/4]

VoxelMap ( const Box3f region,
float  cellSize 
)
inline

Creates a new voxel map that covers the specified region.

The created map is guaranteed to cover the whole specified region. Note that the dimensions of the created map may differ, if the width, height or depth of the specified region is not a multiple of the specified cellSize. The width and height will be increased to the next multiple of the cellSize.

◆ VoxelMap() [4/4]

VoxelMap ( const Box3i region,
float  cellSize 
)
inline

◆ ~VoxelMap()

~VoxelMap ( )
inline

Member Function Documentation

◆ getCellSize()

float getCellSize ( ) const
inline

Returns the size of each cell in meter.

◆ getOffset()

Point3i getOffset ( ) const
inline

Returns the offset of the map, e.g. the index of the cell that is located in the origin.

◆ operator=()

VoxelMap& operator= ( const T &  value)
inline

Set all voxel cells to the specified value.

◆ getRegion()

Box3f getRegion ( ) const
inline

Retuns the region that is covered by the GridMap.

◆ getMapRegion()

Box3i getMapRegion ( ) const
inline

Retuns the region that is covered by the GridMap in grid cells.

◆ data() [1/2]

Array& data ( )
inline

◆ data() [2/2]

const Array& data ( ) const
inline

◆ operator()() [1/2]

T& operator() ( const Point3i idx)
inline

◆ operator()() [2/2]

const T& operator() ( const Point3i idx) const
inline

◆ world2map()

Point3i world2map ( const Point3f p) const
inline

Convert a given point to map coordinates.

Parameters
[in]pPoint in world coordinates
Returns
Point in map coordinates
Note
The point is not checked if it exceeds the boundaries of the map

◆ map2world()

Point3f map2world ( const Point3i p) const
inline

Convert a given point to world coordinates.

Parameters
[in]pPoint in map coordinates
Returns
Point in world coordinates

◆ clip()

void clip ( const Box3i region,
const T &  valueForNewCells 
)
inline

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