n-Dimensional Fast Methods  0.7
 All Classes Functions Variables Typedefs Pages
GridPoints Class Reference

Auxiliar class which helps to select initial and goal points in a 2D grid. More...

#include <gridpoints.hpp>

Static Public Member Functions

template<class T , size_t ndims>
static void selectMapPoints (nDGridMap< T, ndims > &grid, std::array< unsigned int, ndims > &coords_init, std::array< unsigned int, ndims > &coords_goal, const bool flipY=1)
 Plots the binary map of a given grid and allows the user to select a couple of points (start and goal coordinates). More...
 

Private Types

typedef std::array< unsigned
int, 2 > 
Coord2D
 
typedef std::array< double, 2 > Point2D
 
typedef std::vector< Point2D > Path2D
 
typedef std::vector< Path2D > Paths2D
 

Detailed Description

It is based on the CImg library, therefore it has to be accessible. Copyright (C) 2014 Javier V. Gomez and Jose Pardeiro www.javiervgomez.com

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition at line 34 of file gridpoints.hpp.

Member Function Documentation

template<class T , size_t ndims>
static void GridPoints::selectMapPoints ( nDGridMap< T, ndims > &  grid,
std::array< unsigned int, ndims > &  coords_init,
std::array< unsigned int, ndims > &  coords_goal,
const bool  flipY = 1 
)
inlinestatic

It is based on the nDGridMap::getOccupancy(). This function has to be overloaded in another occupancy type is being used.

Should be used only in 2D grids.

The Y dimension flipping is because nDGridMap works in X-Y coordinates, not in image indices as CImg.

IMPORTANT NOTE: no type-checkings are done. T type has to be Cell or any class with bool getOccupancy() method.

Definition at line 55 of file gridpoints.hpp.


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