LineIterator.hpp
Go to the documentation of this file.
00001 /*
00002  * LineIterator.hpp
00003  *
00004  *  Created on: Nov 13, 2014
00005  *      Author: Péter Fankhauser
00006  *   Institute: ETH Zurich, Autonomous Systems Lab
00007  */
00008 
00009 #pragma once
00010 
00011 #include "grid_map_core/GridMap.hpp"
00012 #include "grid_map_core/iterators/SubmapIterator.hpp"
00013 
00014 #include <Eigen/Core>
00015 
00016 namespace grid_map {
00017 
00022 class LineIterator
00023 {
00024 public:
00025 
00032   LineIterator(const grid_map::GridMap& gridMap, const Position& start, const Position& end);
00033 
00040   LineIterator(const grid_map::GridMap& gridMap, const Index& start, const Index& end);
00041 
00047   LineIterator& operator =(const LineIterator& other);
00048 
00053   bool operator !=(const LineIterator& other) const;
00054 
00059   const Index& operator *() const;
00060 
00065   LineIterator& operator ++();
00066 
00071   bool isPastEnd() const;
00072 
00073 private:
00074 
00075 
00083   bool initialize(const grid_map::GridMap& gridMap, const Index& start, const Index& end);
00084 
00088   void initializeIterationParameters();
00089 
00098   bool getIndexLimitedToMapRange(const grid_map::GridMap& gridMap, const Position& start,
00099                                  const Position& end, Index& index);
00100 
00102   Index index_;
00103 
00105   Index start_;
00106 
00108   Index end_;
00109 
00111   unsigned int iCell_;
00112 
00114   unsigned int nCells_;
00115 
00117   Size increment1_, increment2_;
00118   int denominator_, numerator_, numeratorAdd_;
00119 
00121   Length mapLength_;
00122   Position mapPosition_;
00123   double resolution_;
00124   Size bufferSize_;
00125   Index bufferStartIndex_;
00126 
00127  public:
00128   EIGEN_MAKE_ALIGNED_OPERATOR_NEW
00129 };
00130 
00131 } /* namespace */


grid_map_core
Author(s): Péter Fankhauser
autogenerated on Mon Oct 9 2017 03:09:16