Public Member Functions | Private Member Functions | Private Attributes | List of all members
grid_map::SpiralIterator Class Reference

#include <SpiralIterator.hpp>

Public Member Functions

double getCurrentRadius () const
bool isPastEnd () const
bool operator!= (const SpiralIterator &other) const
const Eigen::Array2i & operator* () const
SpiralIteratoroperator++ ()
SpiralIteratoroperator= (const SpiralIterator &other)
 SpiralIterator (const grid_map::GridMap &gridMap, const Eigen::Vector2d &center, const double radius)

Private Member Functions

void generateRing ()
bool isInside (const Index index) const
int signum (const int val)

Private Attributes

Size bufferSize_
Position center_
 Position of the circle center;. More...
unsigned int distance_
Index indexCenter_
Length mapLength_
 Map information needed to get position from iterator. More...
Position mapPosition_
unsigned int nRings_
 Number of rings into the circle is divided. More...
std::vector< IndexpointsRing_
double radius_
 Radius of the circle. More...
double radiusSquare_
 Square of the radius for efficiency. More...
double resolution_

Detailed Description

Iterator class to iterate through a circular area of the map with a spiral.

Definition at line 22 of file SpiralIterator.hpp.

Constructor & Destructor Documentation

grid_map::SpiralIterator::SpiralIterator ( const grid_map::GridMap gridMap,
const Eigen::Vector2d &  center,
const double  radius 


gridMapthe grid map to iterate on.
centerthe position of the circle center.
radiusthe radius of the circle.

Definition at line 18 of file SpiralIterator.cpp.

Member Function Documentation

void grid_map::SpiralIterator::generateRing ( )

Uses the current distance to get the points of a ring around the center.

Definition at line 84 of file SpiralIterator.cpp.

double grid_map::SpiralIterator::getCurrentRadius ( ) const

Gets the radius of current ring that is iterated through.

radius of the current ring that is used for iteration.

Definition at line 116 of file SpiralIterator.cpp.

bool grid_map::SpiralIterator::isInside ( const Index  index) const

Check if index is inside the circle.

true if inside, false otherwise.

Definition at line 76 of file SpiralIterator.cpp.

bool grid_map::SpiralIterator::isPastEnd ( ) const

Indicates if iterator is past end.

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

Definition at line 71 of file SpiralIterator.cpp.

bool grid_map::SpiralIterator::operator!= ( const SpiralIterator other) const

Compare to another iterator.

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

Definition at line 54 of file SpiralIterator.cpp.

const Eigen::Array2i & grid_map::SpiralIterator::operator* ( ) const

Dereference the iterator with const.

the value to which the iterator is pointing.

Definition at line 59 of file SpiralIterator.cpp.

SpiralIterator & grid_map::SpiralIterator::operator++ ( )

Increase the iterator to the next element.

a reference to the updated iterator.

Definition at line 64 of file SpiralIterator.cpp.

SpiralIterator & grid_map::SpiralIterator::operator= ( const SpiralIterator other)

Assignment operator.

iteratorthe iterator to copy data from.
a reference to *this.

Definition at line 38 of file SpiralIterator.cpp.

int grid_map::SpiralIterator::signum ( const int  val)

Definition at line 85 of file SpiralIterator.hpp.

Member Data Documentation

Size grid_map::SpiralIterator::bufferSize_

Definition at line 109 of file SpiralIterator.hpp.

Position grid_map::SpiralIterator::center_

Position of the circle center;.

Definition at line 90 of file SpiralIterator.hpp.

unsigned int grid_map::SpiralIterator::distance_

Definition at line 102 of file SpiralIterator.hpp.

Index grid_map::SpiralIterator::indexCenter_

Definition at line 91 of file SpiralIterator.hpp.

Length grid_map::SpiralIterator::mapLength_

Map information needed to get position from iterator.

Definition at line 106 of file SpiralIterator.hpp.

Position grid_map::SpiralIterator::mapPosition_

Definition at line 107 of file SpiralIterator.hpp.

unsigned int grid_map::SpiralIterator::nRings_

Number of rings into the circle is divided.

Definition at line 101 of file SpiralIterator.hpp.

std::vector<Index> grid_map::SpiralIterator::pointsRing_

Definition at line 103 of file SpiralIterator.hpp.

double grid_map::SpiralIterator::radius_

Radius of the circle.

Definition at line 95 of file SpiralIterator.hpp.

double grid_map::SpiralIterator::radiusSquare_

Square of the radius for efficiency.

Definition at line 98 of file SpiralIterator.hpp.

double grid_map::SpiralIterator::resolution_

Definition at line 108 of file SpiralIterator.hpp.

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

Author(s): P├ęter Fankhauser
autogenerated on Tue Jun 25 2019 20:02:08