Calc delta of 'from'->'to' graph edge.
| 151 | |
| 152 | /// Calc delta of 'from'->'to' graph edge. |
| 153 | uint64_t TrianglesInfo::ListInfo::CalcDelta(PointsInfo const & points, Triangle const & from, Triangle const & to) const |
| 154 | { |
| 155 | std::pair<int, int> const p = CommonEdge(to, from); |
| 156 | |
| 157 | m2::PointU const prediction = coding::PredictPointInTriangle(points.m_max, |
| 158 | // common edge with 'to' |
| 159 | points.m_points[from.m_p[(p.second + 1) % 3]], |
| 160 | points.m_points[from.m_p[(p.second)]], |
| 161 | // diagonal point of 'from' |
| 162 | points.m_points[from.m_p[(p.second + 2) % 3]]); |
| 163 | |
| 164 | // delta from prediction to diagonal point of 'to' |
| 165 | return coding::EncodePointDeltaAsUint(points.m_points[to.m_p[(p.first + 2) % 3]], prediction); |
| 166 | } |
| 167 | |
| 168 | template <class TPopOrder> |
| 169 | void TrianglesInfo::ListInfo::MakeTrianglesChainImpl(PointsInfo const & points, TIterator start, |
nothing calls this directly
no test coverage detected