polygon_iterator.hpp
Go to the documentation of this file.
1 
5 #pragma once
6 
7 #include "../common.hpp"
8 
9 // unique_ptr
10 #include <memory>
11 #include "../iterators/submap_iterator.hpp"
12 #include "../cost_map.hpp"
13 
14 namespace cost_map {
15 
20 {
21 public:
22 
28  PolygonIterator(const cost_map::CostMap& gridMap, const cost_map::Polygon& polygon);
29 
36 
41  bool operator !=(const PolygonIterator& other) const;
42 
47  const Index& operator *() const;
48 
54 
59  bool isPastEnd() const;
60 
61 private:
62 
67  bool isInside() const;
68 
75  void findSubmapParameters(const cost_map::Polygon& polygon, Index& startIndex, Size& bufferSize) const;
76 
79 
81  std::shared_ptr<SubmapIterator> internalIterator_;
82 
86  double resolution_;
89 };
90 
91 } /* namespace */
Length mapLength_
Map information needed to get position from iterator.
PolygonIterator(const cost_map::CostMap &gridMap, const cost_map::Polygon &polygon)
grid_map::Size Size
Definition: common.hpp:46
void findSubmapParameters(const cost_map::Polygon &polygon, Index &startIndex, Size &bufferSize) const
cost_map::Polygon polygon_
Polygon to iterate on.
grid_map::Index Index
Definition: common.hpp:45
bool operator!=(const PolygonIterator &other) const
grid_map::Position Position
Definition: common.hpp:41
PolygonIterator & operator=(const PolygonIterator &other)
std::shared_ptr< SubmapIterator > internalIterator_
Grid submap iterator.
grid_map::Length Length
Definition: common.hpp:47


cost_map_core
Author(s): Daniel Stonier
autogenerated on Mon Jun 10 2019 13:03:41