EllipseIterator.hpp
Go to the documentation of this file.
1 /*
2  * EllipseIterator.hpp
3  *
4  * Created on: Dec 2, 2015
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 
25 {
26 public:
27 
35  EllipseIterator(const GridMap& gridMap, const Position& center, const Length& length, double rotation = 0.0);
36 
41  bool operator !=(const EllipseIterator& other) const;
42 
47  const Index& operator *() const;
48 
54 
59  bool isPastEnd() const;
60 
65  const Size& getSubmapSize() const;
66 
67 private:
68 
73  bool isInside() const;
74 
83  void findSubmapParameters(const Position& center, const Length& length, double rotation,
84  Index& startIndex, Size& bufferSize) const;
85 
88 
90  Eigen::Array2d semiAxisSquare_;
91 
93  Eigen::Matrix2d transformMatrix_;
94 
96  std::shared_ptr<SubmapIterator> internalIterator_;
97 
101  double resolution_;
104 
105  public:
106  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
107 };
108 
109 } // namespace grid_map
110 
Length mapLength_
Map information needed to get position from iterator.
const Index & operator*() const
void findSubmapParameters(const Position &center, const Length &length, double rotation, Index &startIndex, Size &bufferSize) const
Position center_
Position of the circle center;.
EllipseIterator & operator++()
EllipseIterator(const GridMap &gridMap, const Position &center, const Length &length, double rotation=0.0)
Eigen::Matrix2d transformMatrix_
Sine and cosine values of the rotation angle as transformation matrix.
std::shared_ptr< SubmapIterator > internalIterator_
Grid submap iterator. // TODO Think of using unique_ptr instead.
Eigen::Vector2d Position
Definition: TypeDefs.hpp:18
const Size & getSubmapSize() const
Eigen::Array2i Index
Definition: TypeDefs.hpp:22
Eigen::Array2i Size
Definition: TypeDefs.hpp:23
bool operator!=(const EllipseIterator &other) const
Eigen::Array2d Length
Definition: TypeDefs.hpp:24
Eigen::Array2d semiAxisSquare_
Square length of the semi axis.


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