Altus Mapping Engine JavaScript API Reference - v2.0.ut.2153.g60764257e - Tuesday May 16, 2022 SDK Documentation | Builds | BA3 Home
AltusUnified::IGestureReceiver Class Reference

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...

Inheritance diagram for AltusUnified::IGestureReceiver:

Public Member Functions

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...
 

Detailed Description

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.

Member Function Documentation

void AltusUnified::IGestureReceiver::click ( uint  button,
float  x,
float  y 
)

Callback for click

Parameters
buttonButton index (left, middle, right)
xThe x screen position, in points
yThe y screen position, in points
void AltusUnified::IGestureReceiver::doubleClick ( uint  button,
float  x,
float  y 
)

Callback for double click

Parameters
buttonButton index (left, middle, right)
xThe x screen position, in points
yThe y screen position, in points
void AltusUnified::IGestureReceiver::panBegin ( float  x,
float  y 
)

Callback when a pan action begins

Parameters
xThe x screen position, in points
yThe y screen position, in points
void AltusUnified::IGestureReceiver::panEnd ( float  x,
float  y,
float  vx,
float  vy 
)

Callback when pan motion ends (perhaps when the pointer is lifted)

Parameters
xThe final x screen position, in points
yThe final y screen position, in points
vxFinal x velocity, which can be used to decelerate motion.
vyFinal y velocity, which can be used to decelerate motion.
void AltusUnified::IGestureReceiver::panUpdate ( float  x,
float  y 
)

Callback for a pan motion continues to move

Parameters
xThe new x screen position, in points
yThe new y screen position, in points
void AltusUnified::IGestureReceiver::rotationZoom ( float  origX,
float  origY,
float  curX,
float  curY,
uint  touchCount,
float  deltaRotAmount,
float  deltaZoomAmount 
)

Callback for rotation zoom

Parameters
origXThe x screen position of the center of the gesture when the gesture started, in points
origYThe y screen position of the center of the gesture when the gesture started, in points
curXThe current x screen position of the center of the gesture, in points
curYThe current y screen position of the center of the gesture, in points
touchCountThe number of fingers invovled
deltaRotAmountchange in rotation amount
deltaZoomAmountchange in zoom amount
void AltusUnified::IGestureReceiver::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).

Parameters
xThe x screen position of the center of the gesture, in points
yThe y screen position of the center of the gesture, in points
touchCountThe number of fingers invovled
void AltusUnified::IGestureReceiver::rotationZoomEnd ( float  origX,
float  origY,
float  curX,
float  curY,
uint  touchCount 
)

Callback for end of a of a rotate/zoom/pan action.

Parameters
origXThe x screen position of the center of the gesture when the gesture started, in points
origYThe y screen position of the center of the gesture when the gesture started, in points
curXThe current x screen position of the center of the gesture, in points
curYThe current y screen position of the center of the gesture, in points
touchCountThe number of fingers invovled
void AltusUnified::IGestureReceiver::setMinMaxAltitude ( double  minAltitudeInMeters,
double  maxAltitudeInMeters 
)

Request to sets the min and max altitudes

void AltusUnified::IGestureReceiver::setPanEnabled ( bool  enabled)

Request to enable or disable panning

void AltusUnified::IGestureReceiver::setZoomEnabled ( bool  enabled)

Request to enable or disable zooming

void AltusUnified::IGestureReceiver::update ( TimeStamp  timeStamp)

Called once per frame.

void AltusUnified::IGestureReceiver::zoomIn ( float  x,
float  y,
double  animationDuration 
)

Request a zoom in animation

Parameters
xThe x screen position, in points
yThe y screen position, in points
animationDurationAnimation duration, in seconds
void AltusUnified::IGestureReceiver::zoomInCenter ( double  animationDuration)

Request a zoom in to the center of the screen

Parameters
animationDurationAnimation duration, in seconds
void AltusUnified::IGestureReceiver::zoomOut ( float  x,
float  y,
double  animationDuration 
)

Request a zoom out animation

Parameters
xThe x screen position, in points
yThe y screen position, in points
animationDurationAnimation duration, in seconds
void AltusUnified::IGestureReceiver::zoomOutCenter ( double  animationDuration)

Request a zoom out to the center of the screen

Parameters
animationDurationAnimation duration, in seconds