MCPcopy Create free account
hub / github.com/ANYbotics/grid_map / findSubmapParameters

Method findSubmapParameters

grid_map_core/src/iterators/CircleIterator.cpp:82–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82void CircleIterator::findSubmapParameters(const Position& center, const double radius,
83 Index& startIndex, Size& bufferSize) const
84{
85 Position topLeft = center.array() + radius;
86 Position bottomRight = center.array() - radius;
87 boundPositionToRange(topLeft, mapLength_, mapPosition_);
88 boundPositionToRange(bottomRight, mapLength_, mapPosition_);
89 getIndexFromPosition(startIndex, topLeft, mapLength_, mapPosition_, resolution_, bufferSize_, bufferStartIndex_);
90 Index endIndex;
91 getIndexFromPosition(endIndex, bottomRight, mapLength_, mapPosition_, resolution_, bufferSize_, bufferStartIndex_);
92 bufferSize = getSubmapSizeFromCornerIndeces(startIndex, endIndex, bufferSize_, bufferStartIndex_);
93}
94
95} /* namespace grid_map */
96

Callers

nothing calls this directly

Calls 3

boundPositionToRangeFunction · 0.85
getIndexFromPositionFunction · 0.85

Tested by

no test coverage detected