MCPcopy Create free account
hub / github.com/comaps/comaps / DecodeTriangleStrip

Function DecodeTriangleStrip

libs/coding/geometry_coding.cpp:265–285  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

263}
264
265void 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
288namespace serial

Callers

nothing calls this directly

Calls 5

DecodePointDeltaFromUintFunction · 0.85
PredictPointInTriangleFunction · 0.85
backMethod · 0.80
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected