| 263 | } |
| 264 | |
| 265 | void DecodeTriangleStrip(InDeltasT const & deltas, m2::PointU const & basePoint, m2::PointU const & maxPoint, |
| 266 | OutPointsT & points) |
| 267 | { |
| 268 | size_t const count = deltas.size(); |
| 269 | if (count > 0) |
| 270 | { |
| 271 | ASSERT_GREATER(count, 2, ()); |
| 272 | |
| 273 | points.push_back(DecodePointDeltaFromUint(deltas[0], basePoint)); |
| 274 | points.push_back(DecodePointDeltaFromUint(deltas[1], points.back())); |
| 275 | points.push_back(DecodePointDeltaFromUint(deltas[2], points.back())); |
| 276 | |
| 277 | m2::PointD const maxPointD(maxPoint); |
| 278 | for (size_t i = 3; i < count; ++i) |
| 279 | { |
| 280 | size_t const n = points.size(); |
| 281 | m2::PointU const prediction = PredictPointInTriangle(maxPointD, points[n - 1], points[n - 2], points[n - 3]); |
| 282 | points.push_back(DecodePointDeltaFromUint(deltas[i], prediction)); |
| 283 | } |
| 284 | } |
| 285 | } |
| 286 | } // namespace coding |
| 287 | |
| 288 | namespace serial |
nothing calls this directly
no test coverage detected