circle_iterator.hpp
Go to the documentation of this file.
1 
5 #pragma once
6 
7 #include <Eigen/Core>
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 
29  CircleIterator(const CostMap& gridMap, const Position& center, const double radius);
30 
37 
42  bool operator !=(const CircleIterator& other) const;
43 
48  const Index& operator *() const;
49 
55 
60  bool isPastEnd() const;
61 
62 private:
63 
68  bool isInside() const;
69 
77  void findSubmapParameters(const Position& center, const double radius,
78  Index& startIndex, Size& bufferSize) const;
79 
82 
84  double radius_;
85 
87  double radiusSquare_;
88 
90  std::shared_ptr<SubmapIterator> internalIterator_;
91 
95  double resolution_;
98 };
99 
100 } /* namespace */
CircleIterator(const CostMap &gridMap, const Position &center, const double radius)
Length mapLength_
Map information needed to get position from iterator.
const Index & operator*() const
grid_map::Size Size
Definition: common.hpp:46
CircleIterator & operator++()
double radiusSquare_
Square of the radius for efficiency.
void findSubmapParameters(const Position &center, const double radius, Index &startIndex, Size &bufferSize) const
std::shared_ptr< SubmapIterator > internalIterator_
Grid submap iterator.
grid_map::Index Index
Definition: common.hpp:45
Position center_
Position of the circle center;.
grid_map::Position Position
Definition: common.hpp:41
bool operator!=(const CircleIterator &other) const
CircleIterator & operator=(const CircleIterator &other)
grid_map::Length Length
Definition: common.hpp:47
double radius_
Radius of the circle.


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