26 Index submapStartIndex;
27 Index submapBufferSize;
29 internalIterator_ = std::make_shared<SubmapIterator>(gridMap, submapStartIndex, submapBufferSize);
42 return *(*internalIterator_);
47 ++(*internalIterator_);
70 double squareNorm = (position -
center_).array().square().sum();
75 Index& startIndex,
Size& bufferSize)
const 77 Position topLeft = center.array() + radius;
78 Position bottomRight = center.array() - radius;
double radiusSquare_
Square of the radius (for efficiency).
void findSubmapParameters(const Position ¢er, double radius, Index &startIndex, Size &bufferSize) const
double radius_
Radius of the circle.
Position center_
Position of the circle center;.
const Index & getStartIndex() const
const Size & getSize() const
CircleIterator & operator++()
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)
CircleIterator(const GridMap &gridMap, const Position ¢er, double radius)
bool operator!=(const CircleIterator &other) 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())
void boundPositionToRange(Position &position, const Length &mapLength, const Position &mapPosition)
Length mapLength_
Map information needed to get position from iterator.
const Index & operator*() const
bool getPosition(const Index &index, Position &position) const
std::shared_ptr< SubmapIterator > internalIterator_
Grid submap iterator. // TODO Think of using unique_ptr instead.
const Length & getLength() const