20         this->
resize(-1.0,1.0,-1.0,1.0,0.5);
    24         this->resize(xmin,xmax,ymin,ymax,resolution);
    29         const double def = .0;
    30         if (m_grid.getResolution()==resolution)
    31              m_grid.resize(xmin,xmax,ymin,ymax, def, .0);
    32         else m_grid.setSize(xmin, xmax, ymin, ymax, resolution, &def);
    34         const size_t nx = m_grid.getSizeX(), 
ny = m_grid.getSizeY();
    36         std::vector<double> idx2x(
nx), idx2y(
ny);
    38         for (
size_t ix = 0;ix<
nx; ix++) idx2x[ix] = m_grid.idx2x(ix);
    39         for (
size_t iy = 0;iy<
ny; iy++) idx2y[iy] = m_grid.idx2y(iy);
    41         for (
size_t ix = 0;ix<
nx; ix++) 
    43                 const double x = idx2x[ix];
    44                 for (
size_t iy = 0;iy<
ny; iy++)
    46                         const double y = idx2y[iy];
    47                         double *cp = m_grid.cellByIndex(ix,iy);
    48                         if(cp) *cp =::atan2(
y,
x);
    55         const double *cp = m_grid.cellByPos(
x,
y);
    56         if (!cp) 
return false;
    68         resize(lst_resolutions2extensions);
    74         for (
const auto &it : lst_resolutions2extensions)
    76                 const double res = it.first;
    77                 const double exten = it.second;
    82                 std::vector<double> idx2x(
nx), idx2y(
ny);
    84                 for (
size_t ix = 0;ix<
nx; ix++) idx2x[ix] = dg.
idx2x(ix);
    85                 for (
size_t iy = 0;iy<
ny; iy++) idx2y[iy] = dg.
idx2y(iy);
    87                 for (
size_t ix = 0;ix<
nx; ix++) 
    89                         const double x = idx2x[ix];
    90                         for (
size_t iy = 0;iy<
ny; iy++)
    92                                 const double y = idx2y[iy];
    94                                 if(cp) *cp =::atan2(
y,
x);
   102         for (
const auto & it : m_grids)
   104                 const double exten = it.first;
   107                 if (std::abs(
x)>exten || std::abs(
y)>exten)
 bool atan2(double y, double x, double &out_atan2) const MRPT_NO_THROWS
Returns the precomputed value for atan2(y,x). 
 
#define MRPT_NO_THROWS
C++11 noexcept: Used after member declarations. 
 
void resize(double xmin, double xmax, double ymin, double ymax, double resolution) MRPT_NO_THROWS
 
size_t getSizeY() const
Returns the vertical size of grid map in cells count. 
 
CAtan2LookUpTable() MRPT_NO_THROWS
 
T * cellByPos(double x, double y)
Returns a pointer to the contents of a cell given by its coordinates, or NULL if it is out of the map...
 
double idx2y(int cy) const
 
This base provides a set of functions for maths stuff. 
 
size_t getSizeX() const
Returns the horizontal size of grid map in cells count. 
 
void resize(const std::map< double, double > &lst_resolutions2extensions) MRPT_NO_THROWS
See CAtan2LookUpTableMultiRes for a discussion of the parameters. 
 
bool atan2(double y, double x, double &out_atan2) const MRPT_NO_THROWS
Returns the precomputed value for atan2(y,x). 
 
T * cellByIndex(unsigned int cx, unsigned int cy)
Returns a pointer to the contents of a cell given by its cell indexes, or NULL if it is out of the ma...
 
double idx2x(int cx) const
Transform a cell index into a coordinate value of the cell central point. 
 
GLfloat GLfloat GLfloat GLfloat nx
 
CAtan2LookUpTableMultiRes() MRPT_NO_THROWS