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

#include <ellipse_iterator.hpp>

List of all members.

Public Member Functions

 EllipseIterator (const CostMap &gridMap, const Position &center, const Length &length, const double rotation=0.0)
bool isPastEnd () const
bool operator!= (const EllipseIterator &other) const
const Indexoperator* () const
EllipseIteratoroperator++ ()
EllipseIteratoroperator= (const EllipseIterator &other)

Private Member Functions

void findSubmapParameters (const Position &center, const Length &length, const double rotation, Index &startIndex, Size &bufferSize) const
bool isInside () const

Private Attributes

Size bufferSize_
Index bufferStartIndex_
Position center_
 Position of the circle center;.
std::shared_ptr< SubmapIteratorinternalIterator_
 Grid submap iterator. // TODO Think of using unique_ptr instead.
Length mapLength_
 Map information needed to get position from iterator.
Position mapPosition_
double resolution_
Eigen::Array2d semiAxisSquare_
 Square length of the semi axis.
Eigen::Matrix2d transformMatrix_
 Sine and cosine values of the rotation angle as transformation matrix.

Detailed Description

Iterator class to iterate through a ellipsoid area of the map. The main axis of the ellipse are aligned with the map frame.

Definition at line 20 of file ellipse_iterator.hpp.


Constructor & Destructor Documentation

cost_map::EllipseIterator::EllipseIterator ( const CostMap gridMap,
const Position center,
const Length length,
const double  rotation = 0.0 
)

Constructor.

Parameters:
gridMapthe grid map to iterate on.
centerthe position of the ellipse center.
lengththe length of the main axis.
anglethe rotation angle of the ellipse (in [rad]).

Definition at line 17 of file src/lib/iterators/ellipse_iterator.cpp.


Member Function Documentation

void cost_map::EllipseIterator::findSubmapParameters ( const Position center,
const Length length,
const double  rotation,
Index startIndex,
Size bufferSize 
) const [private]

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

Parameters:
[in]centerthe position of the ellipse center.
[in]lengththe length of the main axis.
[in]anglethe rotation angle of the ellipse (in [rad]).
[out]startIndexthe start index of the submap.
[out]bufferSizethe buffer size of the submap.

Definition at line 85 of file src/lib/iterators/ellipse_iterator.cpp.

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

Check if current index is inside the ellipse.

Returns:
true if inside, false otherwise.

Definition at line 77 of file src/lib/iterators/ellipse_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 72 of file src/lib/iterators/ellipse_iterator.cpp.

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

Compare to another iterator.

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

Definition at line 50 of file src/lib/iterators/ellipse_iterator.cpp.

const Eigen::Array2i & cost_map::EllipseIterator::operator* ( ) const

Dereference the iterator with const.

Returns:
the value to which the iterator is pointing.

Definition at line 55 of file src/lib/iterators/ellipse_iterator.cpp.

EllipseIterator & cost_map::EllipseIterator::operator++ ( )

Increase the iterator to the next element.

Returns:
a reference to the updated iterator.

Definition at line 60 of file src/lib/iterators/ellipse_iterator.cpp.

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

Assignment operator.

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

Definition at line 36 of file src/lib/iterators/ellipse_iterator.cpp.


Member Data Documentation

Definition at line 99 of file ellipse_iterator.hpp.

Definition at line 100 of file ellipse_iterator.hpp.

Position of the circle center;.

Definition at line 84 of file ellipse_iterator.hpp.

Grid submap iterator. // TODO Think of using unique_ptr instead.

Definition at line 93 of file ellipse_iterator.hpp.

Map information needed to get position from iterator.

Definition at line 96 of file ellipse_iterator.hpp.

Definition at line 97 of file ellipse_iterator.hpp.

Definition at line 98 of file ellipse_iterator.hpp.

Square length of the semi axis.

Definition at line 87 of file ellipse_iterator.hpp.

Sine and cosine values of the rotation angle as transformation matrix.

Definition at line 90 of file ellipse_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