Class

MaplibreNativeFfiGestureMomentum

Description [src]

final class MaplibreNativeFfi.GestureMomentum : GObject.Object
{
  /* No available fields */
}

How a gesture keeps moving the camera after the user lets go.

A part moves only when its velocity is set, and each part slows on its own. Every part defaults to MAPLIBRE_NATIVE_FFI_MOMENTUM_DECAY_MODEL_FRICTION with a half-life of 140 ms, and these other defaults:

  • Pan stops at 10 logical pixels per second, needs a release of at least 200, and counts a release faster than 10000 as 10000.
  • Zoom stops at 0.01 levels per second and moves at most 2.5 levels. Its snap settles on the nearest whole level.
  • Bearing stops at 1 degree per second and needs a release of at least 60. Its snap settles on north within 7 degrees.
  • Pitch stops at 1 degree per second and needs a release of at least 5. Its snap settles flat within 7 degrees.

See mln_gesture_momentum in the C API reference.

Ancestors

Constructors

maplibre_native_ffi_gesture_momentum_new

Creates a MaplibreNativeFfiGestureMomentum whose members are zero or empty.

Instance methods

maplibre_native_ffi_gesture_momentum_get_bearing

Gets MaplibreNativeFfiGestureMomentum:bearing.

maplibre_native_ffi_gesture_momentum_get_pan

Gets MaplibreNativeFfiGestureMomentum:pan.

maplibre_native_ffi_gesture_momentum_get_pitch

Gets MaplibreNativeFfiGestureMomentum:pitch.

maplibre_native_ffi_gesture_momentum_get_zoom

Gets MaplibreNativeFfiGestureMomentum:zoom.

maplibre_native_ffi_gesture_momentum_set_bearing

Sets MaplibreNativeFfiGestureMomentum:bearing.

maplibre_native_ffi_gesture_momentum_set_pan

Sets MaplibreNativeFfiGestureMomentum:pan.

maplibre_native_ffi_gesture_momentum_set_pitch

Sets MaplibreNativeFfiGestureMomentum:pitch.

maplibre_native_ffi_gesture_momentum_set_zoom

Sets MaplibreNativeFfiGestureMomentum:zoom.

Methods inherited from GObject (43)

Please see GObject for a full list of methods.

Signals

Signals inherited from GObject (1)
GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

Class structure

struct MaplibreNativeFfiGestureMomentumClass {
  GObjectClass parent_class;
  
}

No description available.

Class members
parent_class: GObjectClass

No description available.