MapLibre Native Core
|
#include <camera.hpp>
Public Member Functions | |
AnimationOptions ()=default | |
AnimationOptions (Duration d) | |
Public Attributes | |
std::optional< Duration > | duration |
std::optional< double > | velocity |
std::optional< double > | minZoom |
std::optional< mbgl::util::UnitBezier > | easing |
std::function< void(double)> | transitionFrameFn |
std::function< void()> | transitionFinishFn |
Various options for describing a transition between viewpoints with animation. All fields are optional; the default values depend on how this struct is used.
Definition at line 66 of file camera.hpp.
|
default |
Creates an animation with no options specified.
|
inline |
Creates an animation with the specified duration.
Definition at line 97 of file camera.hpp.
std::optional<Duration> mbgl::AnimationOptions::duration |
Time to animate to the viewpoint defined herein.
Definition at line 68 of file camera.hpp.
std::optional<mbgl::util::UnitBezier> mbgl::AnimationOptions::easing |
The easing timing curve of the transition.
Definition at line 82 of file camera.hpp.
std::optional<double> mbgl::AnimationOptions::minZoom |
Zero-based zoom level at the peak of the flyTo() transition’s flight path.
Definition at line 79 of file camera.hpp.
std::function<void()> mbgl::AnimationOptions::transitionFinishFn |
A function that is called once on the last frame of the transition, just before the corresponding screen update.
Definition at line 91 of file camera.hpp.
std::function<void(double)> mbgl::AnimationOptions::transitionFrameFn |
A function that is called on each frame of the transition, just before a screen update, except on the last frame. The first parameter indicates the elapsed time as a percentage of the duration.
Definition at line 87 of file camera.hpp.
std::optional<double> mbgl::AnimationOptions::velocity |
Average velocity of a flyTo() transition, measured in screenfuls per second, assuming a linear timing curve.
A screenful is the visible span in pixels. It does not correspond to a fixed physical distance but rather varies by zoom level.
Definition at line 75 of file camera.hpp.