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

Function EncodePolylinePrev1

libs/coding/geometry_coding.cpp:106–118  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

104}
105
106void EncodePolylinePrev1(InPointsT const & points, m2::PointU const & basePoint, m2::PointU const & maxPoint,
107 OutDeltasT & deltas)
108{
109 size_t const count = points.size();
110 if (count > 0)
111 {
112 deltas.push_back(EncodePointDeltaAsUint(points[0], basePoint));
113 for (size_t i = 1; i < count; ++i)
114 deltas.push_back(EncodePointDeltaAsUint(points[i], points[i - 1]));
115 }
116
117 ASSERT(TestDecoding(points, basePoint, maxPoint, deltas, &DecodePolylinePrev1), ());
118}
119
120void DecodePolylinePrev1(InDeltasT const & deltas, m2::PointU const & basePoint, m2::PointU const & /*maxPoint*/,
121 OutPointsT & points)

Callers

nothing calls this directly

Calls 5

EncodePointDeltaAsUintFunction · 0.85
ASSERTFunction · 0.85
TestDecodingFunction · 0.85
sizeMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected