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

Method EllipseIterator

grid_map_core/src/iterators/EllipseIterator.cpp:19–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17namespace grid_map {
18
19EllipseIterator::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
38EllipseIterator& EllipseIterator::operator =(const EllipseIterator& other)
39{

Callers

nothing calls this directly

Calls 2

getPositionMethod · 0.80
getResolutionMethod · 0.45

Tested by

no test coverage detected