| 17 | namespace grid_map { |
| 18 | |
| 19 | EllipseIterator::EllipseIterator(const GridMap& gridMap, const Position& center, const Length& length, const double rotation) |
| 20 | : center_(center) |
| 21 | { |
| 22 | semiAxisSquare_ = (0.5 * length).square(); |
| 23 | double sinRotation = sin(rotation); |
| 24 | double cosRotation = cos(rotation); |
| 25 | transformMatrix_ << cosRotation, sinRotation, sinRotation, -cosRotation; |
| 26 | mapLength_ = gridMap.getLength(); |
| 27 | mapPosition_ = gridMap.getPosition(); |
| 28 | resolution_ = gridMap.getResolution(); |
| 29 | bufferSize_ = gridMap.getSize(); |
| 30 | bufferStartIndex_ = gridMap.getStartIndex(); |
| 31 | Index submapStartIndex; |
| 32 | Index submapBufferSize; |
| 33 | findSubmapParameters(center, length, rotation, submapStartIndex, submapBufferSize); |
| 34 | internalIterator_ = std::shared_ptr<SubmapIterator>(new SubmapIterator(gridMap, submapStartIndex, submapBufferSize)); |
| 35 | if(!isInside()) ++(*this); |
| 36 | } |
| 37 | |
| 38 | EllipseIterator& EllipseIterator::operator =(const EllipseIterator& other) |
| 39 | { |
nothing calls this directly
no test coverage detected