| 14 | namespace grid_map { |
| 15 | |
| 16 | CircleIterator::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 | |
| 33 | CircleIterator& CircleIterator::operator =(const CircleIterator& other) |
| 34 | { |
nothing calls this directly
no test coverage detected