PolygonIterator.hpp
Go to the documentation of this file.
1 /*
2  * PolygonIterator.hpp
3  *
4  * Created on: Sep 19, 2014
5  * Author: Péter Fankhauser
6  * Institute: ETH Zurich, ANYbotics
7  */
8 
9 #pragma once
10 
14 
15 #include <memory>
16 
17 namespace grid_map {
18 
23 {
24 public:
25 
31  PolygonIterator(const grid_map::GridMap& gridMap, const grid_map::Polygon& polygon);
32 
39 
44  bool operator !=(const PolygonIterator& other) const;
45 
50  const Index& operator *() const;
51 
57 
62  bool isPastEnd() const;
63 
64 private:
65 
70  bool isInside() const;
71 
78  void findSubmapParameters(const grid_map::Polygon& polygon, Index& startIndex,Size& bufferSize) const;
79 
82 
84  std::shared_ptr<SubmapIterator> internalIterator_;
85 
89  double resolution_;
92 
93  public:
94  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
95 };
96 
97 } /* namespace */
PolygonIterator(const grid_map::GridMap &gridMap, const grid_map::Polygon &polygon)
grid_map::Polygon polygon_
Polygon to iterate on.
Eigen::Array2i Index
Definition: TypeDefs.hpp:22
PolygonIterator & operator++()
Eigen::Array2i Size
Definition: TypeDefs.hpp:23
std::shared_ptr< SubmapIterator > internalIterator_
Grid submap iterator.
Eigen::Vector2d Position
Definition: TypeDefs.hpp:18
PolygonIterator & operator=(const PolygonIterator &other)
const Index & operator*() const
Length mapLength_
Map information needed to get position from iterator.
void findSubmapParameters(const grid_map::Polygon &polygon, Index &startIndex, Size &bufferSize) const
bool operator!=(const PolygonIterator &other) const
Eigen::Array2d Length
Definition: TypeDefs.hpp:24


grid_map_core
Author(s): Péter Fankhauser
autogenerated on Sun Sep 13 2020 03:15:22