Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvng <viktor.govako@gmail.com>2011-02-04 11:34:56 +0300
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:11:36 +0300
commitf0b2633d2ff765c71196a2d9eddb213525e5ce3e (patch)
treec291535b33634c37cbd4278a2bfaf85f4ad21baf /indexer/geometry_coding.hpp
parent85b38d169af2d3d2a46363fb9c9dd1e3b2ad1320 (diff)
Fix PredictPointInTriangle. Add more comments.
Diffstat (limited to 'indexer/geometry_coding.hpp')
-rw-r--r--indexer/geometry_coding.hpp29
1 files changed, 13 insertions, 16 deletions
diff --git a/indexer/geometry_coding.hpp b/indexer/geometry_coding.hpp
index 373cd5199c..215c8aeca5 100644
--- a/indexer/geometry_coding.hpp
+++ b/indexer/geometry_coding.hpp
@@ -7,6 +7,8 @@
#include "../std/vector.hpp"
#include "../std/tuple.hpp"
+
+//@{
inline uint64_t EncodeDelta(m2::PointU const & actual, m2::PointU const & prediction)
{
return bits::BitwiseMerge(
@@ -20,18 +22,27 @@ inline m2::PointU DecodeDelta(uint64_t delta, m2::PointU const & prediction)
bits::BitwiseSplit(delta, x, y);
return m2::PointU(prediction.x + bits::ZigZagDecode(x), prediction.y + bits::ZigZagDecode(y));
}
+//@}
+
-// Predict point p0 given previous (p1, p2).
+/// Predict point p0 given previous (p1, p2).
m2::PointU PredictPointInPolyline(m2::PointU const & maxPoint,
m2::PointU const & p1,
m2::PointU const & p2);
-// Predict point p0 given previous (p1, p2, p3).
+/// Predict point p0 given previous (p1, p2, p3).
m2::PointU PredictPointInPolyline(m2::PointU const & maxPoint,
m2::PointU const & p1,
m2::PointU const & p2,
m2::PointU const & p3);
+/// Predict point p0 given previous (p1, p2, p3).
+m2::PointU PredictPointInTriangle(m2::PointU const & maxPoint,
+ m2::PointU const & p1,
+ m2::PointU const & p2,
+ m2::PointU const & p3);
+
+/// Geometry Coding-Decoding functions.
namespace geo_coding
{
typedef vector<m2::PointU> InPointsT;
@@ -84,20 +95,6 @@ inline void DecodePolyline(DeltasT const & deltas,
DecodePolylinePrev2(deltas, basePoint, maxPoint, points);
}
-typedef vector<tuple<uint32_t, uint32_t, uint32_t> > TrianglesT;
-
-void EncodeTriangles(InPointsT const & points,
- TrianglesT const & triangles,
- m2::PointU const & basePoint,
- m2::PointU const & maxPoint,
- DeltasT & deltas);
-
-void DecodeTriangles(DeltasT const & deltas,
- m2::PointU const & basePoint,
- m2::PointU const & maxPoint,
- OutPointsT & points,
- TrianglesT & triangles);
-
void EncodeTriangleStrip(InPointsT const & points,
m2::PointU const & basePoint,
m2::PointU const & maxPoint,