cost_map_iterator.cpp
Go to the documentation of this file.
1 
4 /*****************************************************************************
5 ** Includes
6 *****************************************************************************/
7 
10 
11 
12 namespace cost_map {
13 
15 {
16  size_ = gridMap.getSize();
17  startIndex_ = gridMap.getStartIndex();
18  endIndex_ = startIndex_ + gridMap.getSize() - Eigen::Array2i::Ones();
21  isPastEnd_ = false;
22 }
23 
25 {
26  size_ = other->size_;
27  startIndex_ = other->startIndex_;
28  endIndex_ = other->endIndex_;
29  index_ = other->index_;
30  isPastEnd_ = other->isPastEnd_;
31 }
32 
34 {
35  size_ = other.size_;
36  startIndex_ = other.startIndex_;
37  endIndex_ = other.endIndex_;
38  index_ = other.index_;
39  isPastEnd_ = other.isPastEnd_;
40  return *this;
41 }
42 
44 {
45  return (index_ != other.index_).any();
46 }
47 
49 {
50  return index_;
51 }
52 
54 {
56 }
57 
59 {
61  return *this;
62 }
63 
65 {
66  CostMapIterator res(this);
67  res.index_ = endIndex_;
68  return res;
69 }
70 
72 {
73  return isPastEnd_;
74 }
75 
76 } /* namespace cost_map */
const Size & getSize() const
Index getIndexFromBufferIndex(const Index &bufferIndex, const Size &bufferSize, const Index &bufferStartIndex)
Size size_
Size of the buffer.
Index endIndex_
End index of the circular buffer.
CostMapIterator & operator=(const CostMapIterator &other)
Index startIndex_
Start index of the circular buffer.
bool incrementIndex(Index &index, const Size &bufferSize, const Index &bufferStartIndex=Index::Zero())
CostMapIterator & operator++()
CostMapIterator(const cost_map::CostMap &gridMap)
grid_map::Index Index
Definition: common.hpp:45
void boundIndexToRange(Index &index, const Size &bufferSize)
CostMapIterator end() const
bool operator!=(const CostMapIterator &other) const
bool isPastEnd_
Is iterator out of scope.
const Index & getStartIndex() const
Index index_
Current index.
const Index & operator*() const
const Index getUnwrappedIndex() const


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