| 77 | } |
| 78 | |
| 79 | std::pair<m2::PointD, bool> MergedFeatureBuilder::GetKeyPoint(size_t i) const |
| 80 | { |
| 81 | // 1. check first rounds |
| 82 | size_t sz = m_roundBounds[0].size(); |
| 83 | if (i < sz) |
| 84 | return std::make_pair(m_roundBounds[0][i], false); |
| 85 | i -= sz; |
| 86 | |
| 87 | // 2. check first point |
| 88 | if (i == 0) |
| 89 | return std::make_pair(FirstPoint(), false); |
| 90 | |
| 91 | // 3. check last rounds |
| 92 | --i; |
| 93 | sz = m_roundBounds[1].size(); |
| 94 | if (i < sz) |
| 95 | return std::make_pair(m_roundBounds[1][i], true); |
| 96 | i -= sz; |
| 97 | |
| 98 | // 4. return last point |
| 99 | ASSERT_EQUAL(i, 0, ()); |
| 100 | return std::make_pair(LastPoint(), true); |
| 101 | } |
| 102 | |
| 103 | size_t MergedFeatureBuilder::GetKeyPointsCount() const |
| 104 | { |
no test coverage detected