diff options
author | Roman Kuznetsov <r.kuznetsow@gmail.com> | 2016-07-08 18:21:29 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-08 18:21:29 +0300 |
commit | 55857f993fc2a4641b92bd899bceb09d2f996dd3 (patch) | |
tree | ca84f3370566dddc2c01abe73ede4ff1f2fcd7d6 /map | |
parent | 124f14016768bc03cf807820ba9bd05299aaaad7 (diff) | |
parent | 6c6ff08f9dd685135cff652c966cabb9dcf99879 (diff) |
Merge pull request #3734 from darina/smooth-perspective
Smooth perspective
Diffstat (limited to 'map')
-rw-r--r-- | map/framework.cpp | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/map/framework.cpp b/map/framework.cpp index 018e6cc518..04947678ea 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -111,9 +111,6 @@ char const kAllow3dBuildingsKey[] = "Buildings3d"; double const kDistEqualQuery = 100.0; -double const kRotationAngle = math::pi4; -double const kAngleFOV = math::pi / 3.0; - // TODO! // To adjust GpsTrackFilter was added secret command "?gpstrackaccuracy:xxx;" // where xxx is a new value for horizontal accuracy. @@ -1386,10 +1383,7 @@ void Framework::ShowSearchResult(search::Result const & res) } m2::PointD const center = info.GetMercator(); - if (m_currentModelView.isPerspective()) - CallDrapeFunction(bind(&df::DrapeEngine::SetModelViewCenter, _1, center, scale, true)); - else - ShowRect(df::GetRectForDrawScale(scale, center)); + CallDrapeFunction(bind(&df::DrapeEngine::SetModelViewCenter, _1, center, scale, true)); UserMarkContainer::UserMarkForPoi()->SetPtOrg(center); ActivateMapSelection(false, df::SelectionShape::OBJECT_POI, info); @@ -1611,7 +1605,7 @@ void Framework::CreateDrapeEngine(ref_ptr<dp::OGLContextFactory> contextFactory, { InsertRoute(m_routingSession.GetRoute()); if (allow3d && m_routingSession.IsFollowing()) - m_drapeEngine->EnablePerspective(kRotationAngle, kAngleFOV); + m_drapeEngine->EnablePerspective(); } if (m_connectToGpsTrack) @@ -2294,7 +2288,7 @@ void Framework::FollowRoute() : scales::GetNavigationScale(); int const scale3d = (m_currentRouterType == RouterType::Pedestrian) ? scales::GetPedestrianNavigation3dScale() : scales::GetNavigation3dScale(); - m_drapeEngine->FollowRoute(scale, scale3d, kRotationAngle, kAngleFOV); + m_drapeEngine->FollowRoute(scale, scale3d); m_drapeEngine->SetRoutePoint(m2::PointD(), true /* isStart */, false /* isValid */); } @@ -2537,7 +2531,7 @@ void Framework::SetRouteFinishPoint(m2::PointD const & pt, bool isValid) void Framework::Allow3dMode(bool allow3d, bool allow3dBuildings) { - CallDrapeFunction(bind(&df::DrapeEngine::Allow3dMode, _1, allow3d, allow3dBuildings, kRotationAngle, kAngleFOV)); + CallDrapeFunction(bind(&df::DrapeEngine::Allow3dMode, _1, allow3d, allow3dBuildings)); } void Framework::Save3dMode(bool allow3d, bool allow3dBuildings) |