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

Function IsPanningAndRotate

libs/geometry/screenbase.cpp:295–309  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

293}
294
295bool IsPanningAndRotate(ScreenBase const & s1, ScreenBase const & s2)
296{
297 m2::RectD const & r1 = s1.GlobalRect().GetLocalRect();
298 m2::RectD const & r2 = s2.GlobalRect().GetLocalRect();
299
300 m2::PointD c1 = r1.Center();
301 m2::PointD c2 = r2.Center();
302
303 m2::PointD globPt(c1.x - r1.minX(), c1.y - r1.minY());
304
305 m2::PointD p1 = s1.GtoP(s1.GlobalRect().ConvertFrom(c1)) - s1.GtoP(s1.GlobalRect().ConvertFrom(c1 + globPt));
306 m2::PointD p2 = s2.GtoP(s2.GlobalRect().ConvertFrom(c2)) - s2.GtoP(s2.GlobalRect().ConvertFrom(c2 + globPt));
307
308 return p1.EqualDxDy(p2, 0.00001);
309}
310
311void ScreenBase::ExtractGtoPParams(MatrixT const & m, double & a, double & s, double & dx, double & dy)
312{

Callers

nothing calls this directly

Calls 6

minXMethod · 0.80
minYMethod · 0.80
ConvertFromMethod · 0.80
CenterMethod · 0.45
GtoPMethod · 0.45
EqualDxDyMethod · 0.45

Tested by

no test coverage detected