| 201 | } |
| 202 | |
| 203 | void DecodePolylinePrev3(InDeltasT const & deltas, m2::PointU const & basePoint, m2::PointU const & maxPoint, |
| 204 | OutPointsT & points) |
| 205 | { |
| 206 | ASSERT_LESS_OR_EQUAL(basePoint.x, maxPoint.x, (basePoint, maxPoint)); |
| 207 | ASSERT_LESS_OR_EQUAL(basePoint.y, maxPoint.y, (basePoint, maxPoint)); |
| 208 | |
| 209 | size_t const count = deltas.size(); |
| 210 | if (count > 0) |
| 211 | { |
| 212 | points.push_back(DecodePointDeltaFromUint(deltas[0], basePoint)); |
| 213 | if (count > 1) |
| 214 | { |
| 215 | m2::PointU const pt0 = points.back(); |
| 216 | points.push_back(DecodePointDeltaFromUint(deltas[1], pt0)); |
| 217 | if (count > 2) |
| 218 | { |
| 219 | m2::PointD const maxPointD(maxPoint); |
| 220 | points.push_back(DecodePointDeltaFromUint(deltas[2], PredictPointInPolyline(maxPointD, points.back(), pt0))); |
| 221 | for (size_t i = 3; i < count; ++i) |
| 222 | { |
| 223 | size_t const n = points.size(); |
| 224 | m2::PointU const prediction = PredictPointInPolyline(maxPointD, points[n - 1], points[n - 2], points[n - 3]); |
| 225 | points.push_back(DecodePointDeltaFromUint(deltas[i], prediction)); |
| 226 | } |
| 227 | } |
| 228 | } |
| 229 | } |
| 230 | } |
| 231 | |
| 232 | void EncodePolyline(InPointsT const & points, m2::PointU const & basePoint, m2::PointU const & maxPoint, |
| 233 | OutDeltasT & deltas) |
nothing calls this directly
no test coverage detected