| 94 | } |
| 95 | |
| 96 | bool LineIterator::getIndexLimitedToMapRange(const grid_map::GridMap& gridMap, |
| 97 | const Position& start, const Position& end, |
| 98 | Index& index) |
| 99 | { |
| 100 | Position newStart = start; |
| 101 | Vector direction = (end - start).normalized(); |
| 102 | while (!gridMap.getIndex(newStart, index)) { |
| 103 | newStart += (gridMap.getResolution() - std::numeric_limits<double>::epsilon()) * direction; |
| 104 | if ((end - newStart).norm() < gridMap.getResolution() - std::numeric_limits<double>::epsilon()) |
| 105 | return false; |
| 106 | } |
| 107 | return true; |
| 108 | } |
| 109 | |
| 110 | void LineIterator::initializeIterationParameters() |
| 111 | { |
nothing calls this directly
no test coverage detected