Files
MapLibreParticleLab/include/mbgl/map/camera.hpp
Minh Nguyễn e1854f0f26 [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.
2015-12-15 12:52:13 -08:00

30 lines
752 B
C++

#ifndef MBGL_MAP_CAMERA
#define MBGL_MAP_CAMERA
#include <mapbox/optional.hpp>
#include <mbgl/util/geo.hpp>
#include <mbgl/util/chrono.hpp>
#include <mbgl/util/unitbezier.hpp>
#include <functional>
namespace mbgl {
struct CameraOptions {
mapbox::util::optional<LatLng> center;
mapbox::util::optional<double> zoom;
mapbox::util::optional<double> angle;
mapbox::util::optional<double> pitch;
mapbox::util::optional<Duration> duration;
mapbox::util::optional<double> speed;
mapbox::util::optional<double> curve;
mapbox::util::optional<mbgl::util::UnitBezier> easing;
std::function<void(double)> transitionFrameFn;
std::function<void()> transitionFinishFn;
};
} // namespace mbgl
#endif /* MBGL_MAP_CAMERA */