MCPcopy Create free account
hub / github.com/ANYbotics/grid_map / CircleIterator

Method CircleIterator

grid_map_core/src/iterators/CircleIterator.cpp:16–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14namespace grid_map {
15
16CircleIterator::CircleIterator(const GridMap& gridMap, const Position& center, const double radius)
17 : center_(center),
18 radius_(radius)
19{
20 radiusSquare_ = pow(radius_, 2);
21 mapLength_ = gridMap.getLength();
22 mapPosition_ = gridMap.getPosition();
23 resolution_ = gridMap.getResolution();
24 bufferSize_ = gridMap.getSize();
25 bufferStartIndex_ = gridMap.getStartIndex();
26 Index submapStartIndex;
27 Index submapBufferSize;
28 findSubmapParameters(center, radius, submapStartIndex, submapBufferSize);
29 internalIterator_ = std::shared_ptr<SubmapIterator>(new SubmapIterator(gridMap, submapStartIndex, submapBufferSize));
30 if(!isInside()) ++(*this);
31}
32
33CircleIterator& CircleIterator::operator =(const CircleIterator& other)
34{

Callers

nothing calls this directly

Calls 2

getPositionMethod · 0.80
getResolutionMethod · 0.45

Tested by

no test coverage detected