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 
37  bool operator !=(const PolygonIterator& other) const;
38 
43  const Index& operator *() const;
44 
50 
55  bool isPastEnd() const;
56 
57 private:
58 
63  bool isInside() const;
64 
71  void findSubmapParameters(const grid_map::Polygon& polygon, Index& startIndex,Size& bufferSize) const;
72 
75 
77  std::shared_ptr<SubmapIterator> internalIterator_;
78 
82  double resolution_;
85 
86  public:
87  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
88 };
89 
90 } // namespace grid_map
91 
PolygonIterator(const grid_map::GridMap &gridMap, const grid_map::Polygon &polygon)
grid_map::Polygon polygon_
Polygon to iterate on.
PolygonIterator & operator++()
std::shared_ptr< SubmapIterator > internalIterator_
Grid submap iterator.
bool operator!=(const PolygonIterator &other) const
Eigen::Vector2d Position
Definition: TypeDefs.hpp:18
Eigen::Array2i Index
Definition: TypeDefs.hpp:22
Eigen::Array2i Size
Definition: TypeDefs.hpp:23
Eigen::Array2d Length
Definition: TypeDefs.hpp:24
void findSubmapParameters(const grid_map::Polygon &polygon, Index &startIndex, Size &bufferSize) const
Length mapLength_
Map information needed to get position from iterator.
const Index & operator*() const


grid_map_core
Author(s): Péter Fankhauser
autogenerated on Wed Jul 5 2023 02:23:35