| 16 | } |
| 17 | |
| 18 | void CalculateMidPoints::operator()(FeatureBuilder const & ft, uint64_t pos) |
| 19 | { |
| 20 | // Reset state. |
| 21 | m_midLoc = m2::PointD::Zero(); |
| 22 | m_locCount = 0; |
| 23 | |
| 24 | ft.ForEachPoint(*this); |
| 25 | CHECK_GREATER(m_locCount, 0, ()); |
| 26 | m_midLoc = m_midLoc / m_locCount; |
| 27 | |
| 28 | uint64_t const pointAsInt64 = PointToInt64Obsolete(m_midLoc, m_coordBits); |
| 29 | int const minScale = m_minDrawableScaleFn(ft); |
| 30 | |
| 31 | /// May be invisible if it's small area object with [0-9] scales. |
| 32 | /// @todo Probably, we need to keep that objects if 9 scale (as we do in 17 scale). |
| 33 | if (minScale != -1) |
| 34 | { |
| 35 | uint64_t const order = (static_cast<uint64_t>(minScale) << 59) | (pointAsInt64 >> 5); |
| 36 | m_vec.emplace_back(order, pos); |
| 37 | } |
| 38 | } |
| 39 | |
| 40 | bool CalculateMidPoints::operator()(m2::PointD const & p) |
| 41 | { |
nothing calls this directly
no test coverage detected