| 112 | using namespace internal; |
| 113 | |
| 114 | bool getPositionFromIndex(Position& position, |
| 115 | const Index& index, |
| 116 | const Length& mapLength, |
| 117 | const Position& mapPosition, |
| 118 | const double& resolution, |
| 119 | const Size& bufferSize, |
| 120 | const Index& bufferStartIndex) |
| 121 | { |
| 122 | if (!checkIfIndexInRange(index, bufferSize)) return false; |
| 123 | Vector offset; |
| 124 | getVectorToFirstCell(offset, mapLength, resolution); |
| 125 | position = mapPosition + offset + resolution * getIndexVectorFromIndex(index, bufferSize, bufferStartIndex); |
| 126 | return true; |
| 127 | } |
| 128 | |
| 129 | bool getIndexFromPosition(Index& index, |
| 130 | const Position& position, |