CircleIterator.hpp
Go to the documentation of this file.
1 /*
2  * CircleIterator.hpp
3  *
4  * Created on: Nov 13, 2014
5  * Author: Péter Fankhauser
6  * Institute: ETH Zurich, ANYbotics
7  */
8 
9 #pragma once
10 
13 
14 #include <Eigen/Core>
15 
16 #include <memory>
17 
18 namespace grid_map {
19 
24 {
25 public:
26 
33  CircleIterator(const GridMap& gridMap, const Position& center, const double radius);
34 
41 
46  bool operator !=(const CircleIterator& other) const;
47 
52  const Index& operator *() const;
53 
59 
64  bool isPastEnd() const;
65 
66 private:
67 
72  bool isInside() const;
73 
81  void findSubmapParameters(const Position& center, const double radius,
82  Index& startIndex, Size& bufferSize) const;
83 
86 
88  double radius_;
89 
91  double radiusSquare_;
92 
94  std::shared_ptr<SubmapIterator> internalIterator_;
95 
99  double resolution_;
102 
103  public:
104  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
105 };
106 
107 } /* namespace */
Eigen::Array2i Index
Definition: TypeDefs.hpp:22
double radiusSquare_
Square of the radius (for efficiency).
bool operator!=(const CircleIterator &other) const
double radius_
Radius of the circle.
Position center_
Position of the circle center;.
const Index & operator*() const
Eigen::Array2i Size
Definition: TypeDefs.hpp:23
CircleIterator & operator++()
void findSubmapParameters(const Position &center, const double radius, Index &startIndex, Size &bufferSize) const
Eigen::Vector2d Position
Definition: TypeDefs.hpp:18
CircleIterator & operator=(const CircleIterator &other)
CircleIterator(const GridMap &gridMap, const Position &center, const double radius)
Length mapLength_
Map information needed to get position from iterator.
std::shared_ptr< SubmapIterator > internalIterator_
Grid submap iterator. // TODO Think of using unique_ptr instead.
Eigen::Array2d Length
Definition: TypeDefs.hpp:24


grid_map_core
Author(s): Péter Fankhauser
autogenerated on Tue Jun 25 2019 20:02:08