Altus Mapping Engine JavaScript API Reference - v2.0.ut.2153.g60764257e - Tuesday May 16, 2022 SDK Documentation | Builds | BA3 Home
AltusUnified::ListGestureReceiver 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::ListGestureReceiver:
Collaboration diagram for AltusUnified::ListGestureReceiver:

Public Member Functions

 ListGestureReceiver ()
 
void addGestureReceiver (GestureReceiver receiver)
 
bool removeGestureReceiver (GestureReceiver receiver)
 
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...
 
 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...
 

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.

Constructor & Destructor Documentation

AltusUnified::ListGestureReceiver::ListGestureReceiver ( )

Member Function Documentation

void AltusUnified::ListGestureReceiver::addGestureReceiver ( GestureReceiver  receiver)
void AltusUnified::ListGestureReceiver::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::ListGestureReceiver::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::ListGestureReceiver::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::ListGestureReceiver::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::ListGestureReceiver::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
bool AltusUnified::ListGestureReceiver::removeGestureReceiver ( GestureReceiver  receiver)
void AltusUnified::ListGestureReceiver::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::ListGestureReceiver::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::ListGestureReceiver::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::ListGestureReceiver::setMinMaxAltitude ( double  minAltitudeInMeters,
double  maxAltitudeInMeters 
)

Request to sets the min and max altitudes

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

Request to enable or disable panning

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

Request to enable or disable zooming

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

Called once per frame.

void AltusUnified::ListGestureReceiver::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::ListGestureReceiver::zoomInCenter ( double  animationDuration)

Request a zoom in to the center of the screen

Parameters
animationDurationAnimation duration, in seconds
void AltusUnified::ListGestureReceiver::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::ListGestureReceiver::zoomOutCenter ( double  animationDuration)

Request a zoom out to the center of the screen

Parameters
animationDurationAnimation duration, in seconds