24 Index submapStartIndex;
25 Size submapBufferSize;
27 internalIterator_ = std::make_shared<SubmapIterator>(gridMap, submapStartIndex, submapBufferSize);
40 return *(*internalIterator_);
45 ++(*internalIterator_);
76 topLeft = topLeft.array().max(vertex.array());
77 bottomRight = bottomRight.array().min(vertex.array());
PolygonIterator(const grid_map::GridMap &gridMap, const grid_map::Polygon &polygon)
grid_map::Polygon polygon_
Polygon to iterate on.
PolygonIterator & operator++()
const Index & getStartIndex() const
const Size & getSize() const
std::shared_ptr< SubmapIterator > internalIterator_
Grid submap iterator.
bool operator!=(const PolygonIterator &other) const
double getResolution() const
bool getIndexFromPosition(Index &index, const Position &position, const Length &mapLength, const Position &mapPosition, const double &resolution, const Size &bufferSize, const Index &bufferStartIndex=Index::Zero())
Size getSubmapSizeFromCornerIndices(const Index &topLeftIndex, const Index &bottomRightIndex, const Size &bufferSize, const Index &bufferStartIndex)
bool isInside(const Position &point) const
void findSubmapParameters(const grid_map::Polygon &polygon, Index &startIndex, Size &bufferSize) const
bool getPositionFromIndex(Position &position, const Index &index, const Length &mapLength, const Position &mapPosition, const double &resolution, const Size &bufferSize, const Index &bufferStartIndex=Index::Zero())
Length mapLength_
Map information needed to get position from iterator.
void boundPositionToRange(Position &position, const Length &mapLength, const Position &mapPosition)
const Index & operator*() const
bool getPosition(const Index &index, Position &position) const
const std::vector< Position > & getVertices() const
const Length & getLength() const