| 90 | } |
| 91 | |
| 92 | void EllipseIterator::findSubmapParameters(const Position& center, const Length& length, const double rotation, |
| 93 | Index& startIndex, Size& bufferSize) const |
| 94 | { |
| 95 | const Eigen::Rotation2Dd rotationMatrix(rotation); |
| 96 | Eigen::Vector2d u = rotationMatrix * Eigen::Vector2d(length(0), 0.0); |
| 97 | Eigen::Vector2d v = rotationMatrix * Eigen::Vector2d(0.0, length(1)); |
| 98 | const Length boundingBoxHalfLength = (u.cwiseAbs2() + v.cwiseAbs2()).array().sqrt(); |
| 99 | Position topLeft = center.array() + boundingBoxHalfLength; |
| 100 | Position bottomRight = center.array() - boundingBoxHalfLength; |
| 101 | boundPositionToRange(topLeft, mapLength_, mapPosition_); |
| 102 | boundPositionToRange(bottomRight, mapLength_, mapPosition_); |
| 103 | getIndexFromPosition(startIndex, topLeft, mapLength_, mapPosition_, resolution_, bufferSize_, bufferStartIndex_); |
| 104 | Index endIndex; |
| 105 | getIndexFromPosition(endIndex, bottomRight, mapLength_, mapPosition_, resolution_, bufferSize_, bufferStartIndex_); |
| 106 | bufferSize = getSubmapSizeFromCornerIndeces(startIndex, endIndex, bufferSize_, bufferStartIndex_); |
| 107 | } |
| 108 | |
| 109 | } /* namespace grid_map */ |
| 110 |
nothing calls this directly
no test coverage detected