[core] Corrected flying trajectory; pitched flight

Corrected some fairly opaque code that was incorrectly ported from GL JS the first time around in #3171, causing the trajectory to extend far into the Earth’s orbit. Also transition pitch while flying, call transition frame/finish callback functions, and recognize the same “speed” and “curve” parameters that GL JS does.

Fixes #3296, fixes #3297.
This commit is contained in:
Minh Nguyễn
2015-12-14 23:11:37 -08:00
committed by Minh Nguyễn
parent b75c6edbf7
commit e1854f0f26
5 changed files with 69 additions and 41 deletions

View File

@@ -243,6 +243,10 @@ double TransformState::zoomScale(double zoom) const {
return std::pow(2.0f, zoom);
}
double TransformState::scaleZoom(double s) const {
return std::log2(s);
}
float TransformState::worldSize() const {
return util::tileSize * scale;
}