| 14 | namespace grid_map { |
| 15 | |
| 16 | PolygonIterator::PolygonIterator(const grid_map::GridMap& gridMap, const grid_map::Polygon& polygon) |
| 17 | : polygon_(polygon) |
| 18 | { |
| 19 | mapLength_ = gridMap.getLength(); |
| 20 | mapPosition_ = gridMap.getPosition(); |
| 21 | resolution_ = gridMap.getResolution(); |
| 22 | bufferSize_ = gridMap.getSize(); |
| 23 | bufferStartIndex_ = gridMap.getStartIndex(); |
| 24 | Index submapStartIndex; |
| 25 | Size submapBufferSize; |
| 26 | findSubmapParameters(polygon, submapStartIndex, submapBufferSize); |
| 27 | internalIterator_ = std::shared_ptr<SubmapIterator>(new SubmapIterator(gridMap, submapStartIndex, submapBufferSize)); |
| 28 | if(!isInside()) ++(*this); |
| 29 | } |
| 30 | |
| 31 | PolygonIterator& PolygonIterator::operator =(const PolygonIterator& other) |
| 32 | { |
nothing calls this directly
no test coverage detected