Altus Mapping Engine JavaScript API Reference - v2.0.ut.2153.g60764257e - Tuesday May 16, 2022 | SDK Documentation | Builds | BA3 Home |
An extendible class that allows a developer to handle Altus gestures (such as panning and zooming) in a unique way. There is also an existing sub-class, ClassicGestureReceiver, that handles gestures in the classic Altus 2.0 way. Gesture events are generated by Altus from the raw stream of finger/pointer events. If you would like access to the raw stream of finger/pointer events without Altus gesture generation, please see RawInputHandler. More...
Public Member Functions | |
LongPressGestureReceiver (Scene scene, LongPressDelegate del, GestureReceiver nextGestureReceiver) | |
Constructor More... | |
void | setLongPressDuration (float durationInSeconds) |
void | update (TimeStamp timeStamp) |
Called once per frame. More... | |
void | click (uint button, float x, float y) |
Callback for click More... | |
void | doubleClick (uint button, float x, float y) |
Callback for double click More... | |
void | panBegin (float x, float y) |
Callback when a pan action begins More... | |
void | panUpdate (float x, float y) |
Callback for a pan motion continues to move More... | |
void | panEnd (float x, float y, float vx, float vy) |
Callback when pan motion ends (perhaps when the pointer is lifted) More... | |
void | zoomIn (float x, float y, double animationDuration) |
Request a zoom in animation More... | |
void | zoomOut (float x, float y, double animationDuration) |
Request a zoom out animation More... | |
void | zoomInCenter (double animationDuration) |
Request a zoom in to the center of the screen More... | |
void | zoomOutCenter (double animationDuration) |
Request a zoom out to the center of the screen More... | |
void | rotationZoomBegin (float x, float y, uint touchCount) |
Callback for the start of a rotate/zoom/pan action (for example, when someone uses two fingers to adjust the scene). More... | |
void | rotationZoom (float origX, float origY, float curX, float curY, uint touchCount, float deltaRotAmount, float deltaZoomAmount) |
Callback for rotation zoom More... | |
void | rotationZoomEnd (float origX, float origY, float curX, float curY, uint touchCount) |
Callback for end of a of a rotate/zoom/pan action. More... | |
void | setMinMaxAltitude (double minAltitudeInMeters, double maxAltitudeInMeters) |
Request to sets the min and max altitudes More... | |
void | setPanEnabled (bool enabled) |
Request to enable or disable panning More... | |
void | setZoomEnabled (bool enabled) |
Request to enable or disable zooming More... | |
Public Member Functions inherited from AltusUnified::IGestureReceiver | |
void | click (uint button, float x, float y) |
Callback for click More... | |
void | doubleClick (uint button, float x, float y) |
Callback for double click More... | |
void | panBegin (float x, float y) |
Callback when a pan action begins More... | |
void | panUpdate (float x, float y) |
Callback for a pan motion continues to move More... | |
void | panEnd (float x, float y, float vx, float vy) |
Callback when pan motion ends (perhaps when the pointer is lifted) More... | |
void | zoomIn (float x, float y, double animationDuration) |
Request a zoom in animation More... | |
void | zoomOut (float x, float y, double animationDuration) |
Request a zoom out animation More... | |
void | zoomInCenter (double animationDuration) |
Request a zoom in to the center of the screen More... | |
void | zoomOutCenter (double animationDuration) |
Request a zoom out to the center of the screen More... | |
void | rotationZoomBegin (float x, float y, uint touchCount) |
Callback for the start of a rotate/zoom/pan action (for example, when someone uses two fingers to adjust the scene). More... | |
void | rotationZoom (float origX, float origY, float curX, float curY, uint touchCount, float deltaRotAmount, float deltaZoomAmount) |
Callback for rotation zoom More... | |
void | rotationZoomEnd (float origX, float origY, float curX, float curY, uint touchCount) |
Callback for end of a of a rotate/zoom/pan action. More... | |
void | setMinMaxAltitude (double minAltitudeInMeters, double maxAltitudeInMeters) |
Request to sets the min and max altitudes More... | |
void | setPanEnabled (bool enabled) |
Request to enable or disable panning More... | |
void | setZoomEnabled (bool enabled) |
Request to enable or disable zooming More... | |
void | update (TimeStamp timeStamp) |
Called once per frame. More... | |
An extendible class that allows a developer to handle Altus gestures (such as panning and zooming) in a unique way. There is also an existing sub-class, ClassicGestureReceiver, that handles gestures in the classic Altus 2.0 way. Gesture events are generated by Altus from the raw stream of finger/pointer events. If you would like access to the raw stream of finger/pointer events without Altus gesture generation, please see RawInputHandler.
AltusUnified::LongPressGestureReceiver::LongPressGestureReceiver | ( | Scene | scene, |
LongPressDelegate | del, | ||
GestureReceiver | nextGestureReceiver | ||
) |
Constructor
scene | The scene to effect |
del | A LongPressDelegate for receiving LongPress events |
nextGestureReceiver | A GestureReceiver that receives events that are not long presses. This effetively creates a chain of GestureReceivers. |
void AltusUnified::LongPressGestureReceiver::click | ( | uint | button, |
float | x, | ||
float | y | ||
) |
Callback for click
button | Button index (left, middle, right) |
x | The x screen position, in points |
y | The y screen position, in points |
void AltusUnified::LongPressGestureReceiver::doubleClick | ( | uint | button, |
float | x, | ||
float | y | ||
) |
Callback for double click
button | Button index (left, middle, right) |
x | The x screen position, in points |
y | The y screen position, in points |
void AltusUnified::LongPressGestureReceiver::panBegin | ( | float | x, |
float | y | ||
) |
Callback when a pan action begins
x | The x screen position, in points |
y | The y screen position, in points |
void AltusUnified::LongPressGestureReceiver::panEnd | ( | float | x, |
float | y, | ||
float | vx, | ||
float | vy | ||
) |
Callback when pan motion ends (perhaps when the pointer is lifted)
x | The final x screen position, in points |
y | The final y screen position, in points |
vx | Final x velocity, which can be used to decelerate motion. |
vy | Final y velocity, which can be used to decelerate motion. |
void AltusUnified::LongPressGestureReceiver::panUpdate | ( | float | x, |
float | y | ||
) |
Callback for a pan motion continues to move
x | The new x screen position, in points |
y | The new y screen position, in points |
void AltusUnified::LongPressGestureReceiver::rotationZoom | ( | float | origX, |
float | origY, | ||
float | curX, | ||
float | curY, | ||
uint | touchCount, | ||
float | deltaRotAmount, | ||
float | deltaZoomAmount | ||
) |
Callback for rotation zoom
origX | The x screen position of the center of the gesture when the gesture started, in points |
origY | The y screen position of the center of the gesture when the gesture started, in points |
curX | The current x screen position of the center of the gesture, in points |
curY | The current y screen position of the center of the gesture, in points |
touchCount | The number of fingers invovled |
deltaRotAmount | change in rotation amount |
deltaZoomAmount | change in zoom amount |
void AltusUnified::LongPressGestureReceiver::rotationZoomBegin | ( | float | x, |
float | y, | ||
uint | touchCount | ||
) |
Callback for the start of a rotate/zoom/pan action (for example, when someone uses two fingers to adjust the scene).
x | The x screen position of the center of the gesture, in points |
y | The y screen position of the center of the gesture, in points |
touchCount | The number of fingers invovled |
void AltusUnified::LongPressGestureReceiver::rotationZoomEnd | ( | float | origX, |
float | origY, | ||
float | curX, | ||
float | curY, | ||
uint | touchCount | ||
) |
Callback for end of a of a rotate/zoom/pan action.
origX | The x screen position of the center of the gesture when the gesture started, in points |
origY | The y screen position of the center of the gesture when the gesture started, in points |
curX | The current x screen position of the center of the gesture, in points |
curY | The current y screen position of the center of the gesture, in points |
touchCount | The number of fingers invovled |
void AltusUnified::LongPressGestureReceiver::setLongPressDuration | ( | float | durationInSeconds | ) |
void AltusUnified::LongPressGestureReceiver::setMinMaxAltitude | ( | double | minAltitudeInMeters, |
double | maxAltitudeInMeters | ||
) |
Request to sets the min and max altitudes
void AltusUnified::LongPressGestureReceiver::setPanEnabled | ( | bool | enabled | ) |
Request to enable or disable panning
void AltusUnified::LongPressGestureReceiver::setZoomEnabled | ( | bool | enabled | ) |
Request to enable or disable zooming
void AltusUnified::LongPressGestureReceiver::update | ( | TimeStamp | timeStamp | ) |
Called once per frame.
void AltusUnified::LongPressGestureReceiver::zoomIn | ( | float | x, |
float | y, | ||
double | animationDuration | ||
) |
Request a zoom in animation
x | The x screen position, in points |
y | The y screen position, in points |
animationDuration | Animation duration, in seconds |
void AltusUnified::LongPressGestureReceiver::zoomInCenter | ( | double | animationDuration | ) |
Request a zoom in to the center of the screen
animationDuration | Animation duration, in seconds |
void AltusUnified::LongPressGestureReceiver::zoomOut | ( | float | x, |
float | y, | ||
double | animationDuration | ||
) |
Request a zoom out animation
x | The x screen position, in points |
y | The y screen position, in points |
animationDuration | Animation duration, in seconds |
void AltusUnified::LongPressGestureReceiver::zoomOutCenter | ( | double | animationDuration | ) |
Request a zoom out to the center of the screen
animationDuration | Animation duration, in seconds |