Public Member Functions | Private Member Functions | Private Attributes
cost_map::PolygonIterator Class Reference

#include <polygon_iterator.hpp>

List of all members.

Public Member Functions

bool isPastEnd () const
bool operator!= (const PolygonIterator &other) const
const Indexoperator* () const
PolygonIteratoroperator++ ()
PolygonIteratoroperator= (const PolygonIterator &other)
 PolygonIterator (const cost_map::CostMap &gridMap, const cost_map::Polygon &polygon)

Private Member Functions

void findSubmapParameters (const cost_map::Polygon &polygon, Index &startIndex, Size &bufferSize) const
bool isInside () const

Private Attributes

Size bufferSize_
Index bufferStartIndex_
std::shared_ptr< SubmapIteratorinternalIterator_
 Grid submap iterator.
Length mapLength_
 Map information needed to get position from iterator.
Position mapPosition_
cost_map::Polygon polygon_
 Polygon to iterate on.
double resolution_

Detailed Description

Iterator class to iterate through a polygonal area of the map.

Definition at line 19 of file polygon_iterator.hpp.


Constructor & Destructor Documentation

Constructor.

Parameters:
gridMapthe grid map to iterate on.
polygonthe polygonal area to iterate on.

Definition at line 16 of file src/lib/iterators/polygon_iterator.cpp.


Member Function Documentation

void cost_map::PolygonIterator::findSubmapParameters ( const cost_map::Polygon polygon,
Index startIndex,
Size bufferSize 
) const [private]

Finds the submap that fully contains the polygon and returns the parameters.

Parameters:
[in]polygonthe polygon to get the submap for.
[out]startIndexthe start index of the submap.
[out]bufferSizethe buffer size of the submap.

Definition at line 77 of file src/lib/iterators/polygon_iterator.cpp.

bool cost_map::PolygonIterator::isInside ( ) const [private]

Check if current index is inside polygon.

Returns:
true if inside, false otherwise.

Definition at line 70 of file src/lib/iterators/polygon_iterator.cpp.

Indicates if iterator is past end.

Returns:
true if iterator is out of scope, false if end has not been reached.

Definition at line 65 of file src/lib/iterators/polygon_iterator.cpp.

bool cost_map::PolygonIterator::operator!= ( const PolygonIterator other) const

Compare to another iterator.

Returns:
whether the current iterator points to a different address than the other one.

Definition at line 43 of file src/lib/iterators/polygon_iterator.cpp.

const Index & cost_map::PolygonIterator::operator* ( ) const

Dereference the iterator with const.

Returns:
the value to which the iterator is pointing.

Definition at line 48 of file src/lib/iterators/polygon_iterator.cpp.

PolygonIterator & cost_map::PolygonIterator::operator++ ( )

Increase the iterator to the next element.

Returns:
a reference to the updated iterator.

Definition at line 53 of file src/lib/iterators/polygon_iterator.cpp.

PolygonIterator & cost_map::PolygonIterator::operator= ( const PolygonIterator other)

Assignment operator.

Parameters:
iteratorthe iterator to copy data from.
Returns:
a reference to *this.

Definition at line 31 of file src/lib/iterators/polygon_iterator.cpp.


Member Data Documentation

Definition at line 87 of file polygon_iterator.hpp.

Definition at line 88 of file polygon_iterator.hpp.

Grid submap iterator.

Definition at line 81 of file polygon_iterator.hpp.

Map information needed to get position from iterator.

Definition at line 84 of file polygon_iterator.hpp.

Definition at line 85 of file polygon_iterator.hpp.

Polygon to iterate on.

Definition at line 78 of file polygon_iterator.hpp.

Definition at line 86 of file polygon_iterator.hpp.


The documentation for this class was generated from the following files:


cost_map_core
Author(s): Daniel Stonier
autogenerated on Thu Jun 6 2019 20:27:46