HERE Android SDK Developer's Guide

ARController

The class ARController is a member of com.here.android.mpa.ar .

Class Summary

public final class ARController

extends java.lang.Object

The ARController class serves as a facade for LiveSight functionality.

[For complete information, see the section Class Details]

Nested Class Summary

Table 1. Nested Classes in ARController
Nested Classes

public static final class ARController.CameraParams

Encapsulates parameters which affect the device camera.

public final class ARController.DownViewParams

Encapsulates parameters which affect the Down view.

public static final enumeration ARController.Error

AR Error codes

public final class ARController.ExternalSensors

Encapsulates functionality to replace integrated sensors(all or selected) data feeds with external ones.

public final class ARController.FilterParams

Encapsulates parameters which affect data filtering.

public final class ARController.IconParams

Encapsulates parameters which affect the icons of an ARObject.

public final class ARController.InfoParams

Encapsulates parameters which affect the info of an ARObject.

public static final enumeration ARController.IntroAnimationMode

Intro animation mode.

public final class ARController.IntroAnimationParams

Encapsulates parameters which affect the Intro Animation.

public static abstract interface ARController.OnCameraEnteredListener

Listener for Camera view entered event.

public static abstract interface ARController.OnCameraExitedListener

Listener for Camera view exited event.

public static abstract interface ARController.OnCompassCalibrationChangedListener

Listener for compass calibration changed event.

public static abstract interface ARController.OnLivesightStatusListener

Monitor overall livesight status.

public static abstract interface ARController.OnMapEnteredListener

Listener for Map view entered event.

public static abstract interface ARController.OnMapExitedListener

Listener for Map view exited event.

public static abstract interface ARController.OnObjectTappedListener

Listener for object tap events.

public static abstract interface ARController.OnPanListener

Listener for pan events.

public static abstract interface ARController.OnPitchFunction

Pitch function interface.

public static abstract interface ARController.OnPoseListener

Listener for pose update events.

public static abstract interface ARController.OnPostPresentListener

Listener for the post draw event.

public static abstract interface ARController.OnPreDrawListener

Listener for the livesight frame pre draw event.

public static abstract interface ARController.OnPreDrawMapListener

Listener for the map pre draw event.

public static abstract interface ARController.OnPrePresentListener

Listener for the pre present event.

public static abstract interface ARController.OnProjectionCameraUpdatedListener

Monitor livesight projection camera.

public static abstract interface ARController.OnRadarUpdateListener

Listener for radar update events.

public static abstract interface ARController.OnSensorCalibrationChangedListener

Listener for sensor calibration events.

public static abstract interface ARController.OnTapListener

Listener for tap events.

public static abstract interface ARController.OnTouchDownListener

Listener for touch down events.

public static abstract interface ARController.OnTouchUpListener

Listener for touch up events.

public static final enumeration ARController.ProjectionType

Type of the projection used by the LiveSight engine while displaying ARObjects in the camera/UP view.

public final class ARController.SelectedItemParams

Encapsulates parameters which affect ARObjects which are in the selected or non selected states.

public static final enumeration ARController.SensorType

Type of sensors used by the LiveSight engine.

public final class ARController.UpViewParams

Encapsulates parameters which affect the Up view.

public final class ARController.UpViewTransitionParams

Encapsulates parameters which affect the Up view transition.

public static final enumeration ARController.ViewType

List of all views available in LiveSight

Field Summary

Table 2. Fields in ARController
Fields

public static final CameraParams CameraParams

Accessor for ARController.CameraParams instance.

public final DownViewParams DownViewParams

Accessor for ARController.DownViewParams instance.

public final ExternalSensors ExternalSensors

ARController external sensors interface

public final FilterParams HeadingFilterParams

Accessor for ARController.FilterParams instance which affects Heading.

public final IconParams IconParams

Accessor for ARController.IconParams instance.

public final InfoParams InfoParams

Accessor for ARController.InfoParams instance.

public final IntroAnimationParams IntroParams

Accessor for ARController.IntroAnimationParams instance.

public final FilterParams PitchFilterParams

Accessor for ARController.FilterParams instance which affects Pitch.

public final SelectedItemParams SelectedItemParams

Accessor for ARController.SelectedItemParams instance.

public final UpViewParams UpViewParams

Accessor for ARController.UpViewParams instance.

public final UpViewTransitionParams UpViewTransitionParams

Accessor for ARController.UpViewTransitionParams instance.

public final FilterParams ZoomFilterParams

Accessor for ARController.FilterParams instance which affects Zoom.

Method Summary

Table 3. Methods in ARController
Methods

public void addARObject (ARObject arObject)

Add an ARObject that will be displayed in the Camera and Map view.

public void addARObject (ARPolylineObject arPolyObject)

Add an ARPolylineObject that will be displayed in the Camera view.

public void addARObject (ARModelObject arViewObject)

Add an ARModelObject that will be displayed in the Camera view.

public void addOnCameraEnteredListener (OnCameraEnteredListener listener)

Adds a ARController.OnCameraEnteredListener to this ARController to listen for the event triggered when Camera view is entered.

public void addOnCameraExitedListener (OnCameraExitedListener listener)

Adds a ARController.OnCameraExitedListener to this ARController to listen for the event triggered when Camera view is exited.

public void addOnCompassCalibrationChangedListener (OnCompassCalibrationChangedListener listener)

Adds a ARController.OnCompassCalibrationChangedListener to this ARController to listen for compass calibration changed events.

public void addOnLivesightStatusListener (OnLivesightStatusListener listener)

Adds a ARController.OnLivesightStatusListener to this ARController to listen for livesight status notification.

public void addOnMapEnteredListener (OnMapEnteredListener listener)

Adds a ARController.OnMapEnteredListener to this ARController to listen for the event triggered when Map view is entered.

public void addOnMapExitedListener (OnMapExitedListener listener)

Adds a ARController.OnMapEnteredListener to this ARController to listen for the event triggered when Map view is exited.

public void addOnObjectTappedListener (OnObjectTappedListener listener)

Adds a ARController.OnObjectTappedListener to this ARController to listen for object tap events.

public void addOnPanListener (OnPanListener listener)

Adds a ARController.OnPanListener to this ARController to listen for pan events.

public void addOnPoseListener (OnPoseListener listener)

Adds a ARController.OnPoseListener to this ARController to listen for pose update events.

public void addOnPostPresentListener (OnPostPresentListener listener)

Adds a ARController.OnPostPresentListener to this ARController to listen for the event triggered after a draw is being performed.

public void addOnPreDrawListener (OnPreDrawListener listener)

Adds a ARController.OnPreDrawListener to this ARController to listen for the event triggered before the livesight frame is being drawn.

public void addOnPreDrawMapListener (OnPreDrawMapListener listener)

Adds a ARController.OnPreDrawMapListener to this ARController to listen for the event triggered before the map is being drawn.

public void addOnPrePresentListener (OnPrePresentListener listener)

Adds a ARController.OnPrePresentListener to this ARController to listen for the event triggered before a draw is being performed.

public void addOnProjectionCameraUpdatedListener (OnProjectionCameraUpdatedListener listener)

Adds a ARController.OnProjectionCameraUpdatedListener to this ARController to listen for livesight projection camera change notification.

public void addOnRadarUpdateListener (OnRadarUpdateListener listener)

Adds a ARController.OnRadarUpdateListener to this ARController to listen for radar update events.

public void addOnSensorCalibrationChangedListener (OnSensorCalibrationChangedListener listener)

Adds a ARController.OnSensorCalibrationChangedListener to this ARController to listen for sensor calibration changed events.

public void addOnTapListener (OnTapListener listener)

Adds a ARController.OnTapListener to this ARController to listen for tap events.

public void addOnTouchDownListener (OnTouchDownListener listener)

Adds a ARController.OnTouchDownListener to this ARController to listen for touch down events.

public void addOnTouchUpListener (OnTouchUpListener listener)

Adds a ARController.OnTouchUpListener to this ARController to listen for touch up events.

public void defocus ()

Defocus previously focused ARObject.

public void depress (ARObject arObject)

Depress previously pressed ARObject.

public void focus (ARObject arObject)

Focus an ARObject.

public boolean geoTo3dPosition (GeoCoordinate geoPosition, Vector3f position)

Convert a geo position into a 3d space position

public int getAccelerometerCalibrationStatus ()

Get the accelerometer calibration status.

public float getCompassAccuracy ()

Get compass accuracy in degrees.

public int getCompassCalibrationStatus ()

Get the compass calibration status.

public float getFixedAltitude ()

Get fixed altitude of the livesight's view point.

public int getGyroscopeCalibrationStatus ()

Get the gyroscope calibration status.

public long getObjectId (ARObject arObject)

Get ARObjects unique identifier.

public java.util.List <ARObject> getObjects (PointF point)

Get a list of ARObjects at the specified screen point.

public java.util.List <ARObject> getObjects (ViewRect rect)

Get a list of ARObjects which intersect the given ViewRect

public float getOcclusionOpacity ()

Get opacity of the occlusion items.

public ARPoseReading getPose ()

Get latest pose

public GeoCoordinate getPosition ()

Get the last known position.

public GeoCoordinate getPosition (AtomicBoolean mapMached)

Get the last known position with map matching indicator.

public ProjectionType getProjectionType ()

Get Camera view ARController.ProjectionType

public PointF getScreenViewPoint ()

Get target screen view point.

public long getSensorsWaitTimeout ()

Get sensors wait timeout in ms.

public int getUpdateDistanceDelta ()

Get the update distance delta.

public ViewType getViewType ()

Get enforced ARController.ViewType.

public boolean isOccluded (ARObject arObject)

Check if an ARObject is occluded by a building

public boolean isOcclusionEnabled ()

Check if occlusion is enabled.

public boolean isUsingAlternativeCenter ()

Checks to see if an alternative center is currently being used

public boolean isVisible (ARObject arObject)

Check if an ARObject is visible in the camera view.

public void pan (PointF from, PointF to)

Pans the Camera view from one specified on-screen android.graphics.PointF to another.

public void panTo (GeoCoordinate coordinate)

Pan the Camera view such that the GeoCoordinate passed as a parameter will be in the last location in the Front plane (i.e.

public boolean pixelTo3dPosition (float z, PointF screenPoint, Vector3f position)

Convert a screen point into a 3d space position

public ARObject press (PointF point)

Press an ARObject.

public void press (ARObject arObject)

Press an ARObject.

public boolean removeARObject (ARObject arObject)

Remove an ARObject from the Camera and Map view.

public boolean removeARObject (ARPolylineObject arPolyObject)

Remove an ARPolylineObject from the Camera view.

public boolean removeARObject (ARModelObject arViewObject)

Remove an ARModelObject from the Camera view.

public void removeOnCameraEnteredListener (OnCameraEnteredListener listener)

Removes an existing ARController.OnCameraEnteredListener from this ARController .

public void removeOnCameraExitedListener (OnCameraExitedListener listener)

Removes an existing ARController.OnCameraExitedListener from this ARController .

public void removeOnCompassCalibrationChangedListener (OnCompassCalibrationChangedListener listener)

Removes an existing ARController.OnCompassCalibrationChangedListener from this ARController .

public void removeOnLivesightStatusListener (OnLivesightStatusListener listener)

Removes an existing ARController.OnLivesightStatusListener from this ARController.

public void removeOnMapEnteredListener (OnMapEnteredListener listener)

Removes an existing ARController.OnMapEnteredListener from this ARController .

public void removeOnMapExitedListener (OnMapExitedListener listener)

Removes an existing ARController.OnMapExitedListener from this ARController .

public void removeOnObjectTappedListener (OnObjectTappedListener listener)

Removes an existing ARController.OnObjectTappedListener from this ARController .

public void removeOnPanListener (OnPanListener listener)

Removes an existing ARController.OnPanListener from this ARController .

public void removeOnPoseListener (OnPoseListener listener)

Removes an existing ARController.OnPoseListener from this ARController .

public void removeOnPostPresentListener (OnPostPresentListener listener)

Removes an existing ARController.OnPostPresentListener from this ARController .

public void removeOnPreDrawListener (OnPreDrawListener listener)

Removes an existing ARController.OnPreDrawListener from this ARController .

public void removeOnPreDrawMapListener (OnPreDrawMapListener listener)

Removes an existing ARController.OnPreDrawMapListener from this ARController .

public void removeOnPrePresentListener (OnPrePresentListener listener)

Removes an existing ARController.OnPrePresentListener from this ARController .

public void removeOnProjectionCameraUpdatedListener (OnProjectionCameraUpdatedListener listener)

Removes an existing ARController.OnProjectionCameraUpdatedListener from this ARController.

public void removeOnRadarUpdateListener (OnRadarUpdateListener listener)

Removes an existing ARController.OnRadarUpdateListener from this ARController .

public void removeOnSensorCalibrationChangedListener (OnSensorCalibrationChangedListener listener)

Removes an existing ARController.OnSensorCalibrationChangedListener from this ARController .

public void removeOnTapListener (OnTapListener listener)

Removes an existing ARController.OnTapListener from this ARController .

public void removeOnTouchDownListener (OnTouchDownListener listener)

Removes an existing ARController.OnTouchDownListener from this ARController .

public void removeOnTouchUpListener (OnTouchUpListener listener)

Removes an existing ARController.OnTouchUpListener from this ARController .

public void removePitchFunction ()

Removes an existing ARController.OnPitchFunction from this ARController.

public void select (ARObject arObject)

Select an ARObject.

public void select (ARObject arObject, boolean allowInfo, float scale)

Select an ARObject.

public void setAlternativeCenter (GeoCoordinate coordinate)

Set alternative to current GPS position to use for LiveSight.

public void setCompassAccuracy (float degrees)

Set compass accuracy in degrees.

public void setFixedAltitude (float altitude_m, boolean animate)

Set fixed altitude of the livesight's view point.

public void setInfoAnimationInUpViewOnly (boolean enable)

Choose the moment when INFO animation starts.

public void setMap (Map map)

Set Map to the ARController .

public void setOcclusionEnabled (boolean enable)

Enables or disables occlusion fading.

public void setOcclusionOpacity (float opacity)

Set opacity of the occlusion items.

public void setOrientationAnimation (boolean enabled)

Enable/disable animation during orientation change.

public void setPitchFunction (OnPitchFunction function)

Adds a ARController.OnPitchFunction to this ARController to be able to override current device pitch.

public void setPlanesParameters (float frontNear, float frontFar, float backNear, float backFar)

Set front and back planes parameters - screen height ratios (0..1f).

public void setProjectionType (ProjectionType type)

Set Camera view ARController.ProjectionType

public void setSensorsWaitTimeout (long timeout)

Set sensors wait timeout in ms.

public void setTapArea (int width, int height)

Sets the tap area width and height.

public void setUpdateDistanceDelta (int delta)

Sets the update distance delta for the items in the camera view.

public void setUseDownIconsOnMap (boolean useDownIcons)

Use Down icons in Map view in LiveSight

public void showFrontItemsOnly (boolean show)

Show only icons in the Front plane in Camera view.

public void showView (ViewType viewType)

Show(enforce) specified ARController.ViewType.

public Error start ()

Start AR

public Error stop (boolean withExitAnimation)

Stop AR

public void unselect ()

Unselect previously selected object.

Class Details

The ARController class serves as a facade for LiveSight functionality. It contains methods and callbacks for controlling and customizing LiveSight behavior.

Field Details

public static final CameraParams CameraParams

Accessor for ARController.CameraParams instance.

public final DownViewParams DownViewParams

Accessor for ARController.DownViewParams instance.

public final ExternalSensors ExternalSensors

ARController external sensors interface

public final FilterParams HeadingFilterParams

Accessor for ARController.FilterParams instance which affects Heading. A Low-bypass filter is used.

public final IconParams IconParams

Accessor for ARController.IconParams instance.

public final InfoParams InfoParams

Accessor for ARController.InfoParams instance.

public final IntroAnimationParams IntroParams

Accessor for ARController.IntroAnimationParams instance.

public final FilterParams PitchFilterParams

Accessor for ARController.FilterParams instance which affects Pitch. A Low-bypass filter is used.

public final SelectedItemParams SelectedItemParams

Accessor for ARController.SelectedItemParams instance.

public final UpViewParams UpViewParams

Accessor for ARController.UpViewParams instance.

public final UpViewTransitionParams UpViewTransitionParams

Accessor for ARController.UpViewTransitionParams instance.

public final FilterParams ZoomFilterParams

Accessor for ARController.FilterParams instance which affects Zoom. A Low-bypass filter is used.

Method Details

public void addARObject (ARObject arObject)

Add an ARObject that will be displayed in the Camera and Map view.

Parameters:

  • arObject

    ARObject to add to the ARController

public void addARObject (ARPolylineObject arPolyObject)

Add an ARPolylineObject that will be displayed in the Camera view.

Parameters:

  • arPolyObject

    ARPolylineObject to add to the ARController

public void addARObject (ARModelObject arViewObject)

Add an ARModelObject that will be displayed in the Camera view.

Parameters:

  • arViewObject

    ARModelObject to add to the ARController

public void addOnCameraEnteredListener (OnCameraEnteredListener listener)

Adds a ARController.OnCameraEnteredListener to this ARController to listen for the event triggered when Camera view is entered. This event is triggered just before the Camera view is entered.

Parameters:

See also:

removeOnCameraEnteredListener(OnCameraEnteredListener)

public void addOnCameraExitedListener (OnCameraExitedListener listener)

Adds a ARController.OnCameraExitedListener to this ARController to listen for the event triggered when Camera view is exited. This event is triggered just after the Camera view is exited.

Parameters:

See also:

removeOnCameraExitedListener(OnCameraExitedListener)

public void addOnCompassCalibrationChangedListener (OnCompassCalibrationChangedListener listener)

Adds a ARController.OnCompassCalibrationChangedListener to this ARController to listen for compass calibration changed events.

Parameters:

See also:

removeOnCompassCalibrationChangedListener(OnCompassCalibrationChangedListener)

public void addOnLivesightStatusListener (OnLivesightStatusListener listener)

Adds a ARController.OnLivesightStatusListener to this ARController to listen for livesight status notification.

Parameters:

See also:

removeOnLivesightStatusListener(OnLivesightStatusListener)

public void addOnMapEnteredListener (OnMapEnteredListener listener)

Adds a ARController.OnMapEnteredListener to this ARController to listen for the event triggered when Map view is entered. This event is triggered just before the Map view is entered.

Parameters:

See also:

removeOnMapEnteredListener(OnMapEnteredListener)

public void addOnMapExitedListener (OnMapExitedListener listener)

Adds a ARController.OnMapEnteredListener to this ARController to listen for the event triggered when Map view is exited. This event is triggered just after the Map view is exited.

Parameters:

See also:

removeOnMapExitedListener(OnMapExitedListener)

public void addOnObjectTappedListener (OnObjectTappedListener listener)

Adds a ARController.OnObjectTappedListener to this ARController to listen for object tap events.

Parameters:

See also:

removeOnObjectTappedListener(OnObjectTappedListener)

public void addOnPanListener (OnPanListener listener)

Adds a ARController.OnPanListener to this ARController to listen for pan events.

Parameters:

See also:

removeOnPanListener(OnPanListener)

public void addOnPoseListener (OnPoseListener listener)

Adds a ARController.OnPoseListener to this ARController to listen for pose update events.

Parameters:

See also:

removeOnPoseListener(OnPoseListener)

public void addOnPostPresentListener (OnPostPresentListener listener)

Adds a ARController.OnPostPresentListener to this ARController to listen for the event triggered after a draw is being performed.

Parameters:

See also:

removeOnPostPresentListener(OnPostPresentListener)

public void addOnPreDrawListener (OnPreDrawListener listener)

Adds a ARController.OnPreDrawListener to this ARController to listen for the event triggered before the livesight frame is being drawn.

Parameters:

See also:

removeOnPreDrawListener(OnPreDrawListener)

public void addOnPreDrawMapListener (OnPreDrawMapListener listener)

Adds a ARController.OnPreDrawMapListener to this ARController to listen for the event triggered before the map is being drawn.

Parameters:

See also:

removeOnPreDrawMapListener(OnPreDrawMapListener)

public void addOnPrePresentListener (OnPrePresentListener listener)

Adds a ARController.OnPrePresentListener to this ARController to listen for the event triggered before a draw is being performed.

Parameters:

See also:

removeOnPrePresentListener(OnPrePresentListener)

public void addOnProjectionCameraUpdatedListener (OnProjectionCameraUpdatedListener listener)

Adds a ARController.OnProjectionCameraUpdatedListener to this ARController to listen for livesight projection camera change notification.

Parameters:

See also:

removeOnProjectionCameraUpdatedListener(OnProjectionCameraUpdatedListener)

public void addOnRadarUpdateListener (OnRadarUpdateListener listener)

Adds a ARController.OnRadarUpdateListener to this ARController to listen for radar update events.

Parameters:

See also:

removeOnRadarUpdateListener(OnRadarUpdateListener)

public void addOnSensorCalibrationChangedListener (OnSensorCalibrationChangedListener listener)

Adds a ARController.OnSensorCalibrationChangedListener to this ARController to listen for sensor calibration changed events.

Parameters:

See also:

removeOnSensorCalibrationChangedListener(OnSensorCalibrationChangedListener)

public void addOnTapListener (OnTapListener listener)

Adds a ARController.OnTapListener to this ARController to listen for tap events.

Parameters:

See also:

removeOnTapListener(OnTapListener)

public void addOnTouchDownListener (OnTouchDownListener listener)

Adds a ARController.OnTouchDownListener to this ARController to listen for touch down events.

Parameters:

See also:

removeOnTouchDownListener(OnTouchDownListener)

public void addOnTouchUpListener (OnTouchUpListener listener)

Adds a ARController.OnTouchUpListener to this ARController to listen for touch up events.

Parameters:

See also:

removeOnTouchUpListener(OnTouchUpListener)

public void defocus ()

Defocus previously focused ARObject. Bring the object back to its position among all objects in Camera view.

public void depress (ARObject arObject)

Depress previously pressed ARObject. Render the item to simulate depressing.

Parameters:

  • arObject

    The ARObject to be marked as no longer pressed

public void focus (ARObject arObject)

Focus an ARObject. Bring the object in front of other items and expand Info. The object becomes defocused automatically if other object is chosen to be focused. Only one object can be focused.

Focus only has a visible affect on ARObject s which are in the Back plane.

Parameters:

  • arObject

    ARObject to focus

public boolean geoTo3dPosition (GeoCoordinate geoPosition, Vector3f position)

Convert a geo position into a 3d space position

Parameters:

  • geoPosition

    Geo position to convert

  • position

    Filled on return with the corresponding 3d space position

Returns:

true on success

public int getAccelerometerCalibrationStatus ()

Get the accelerometer calibration status.

Status can be one of the following values:

  • -1
  • SensorManager.SENSOR_STATUS_UNRELIABLE
  • SensorManager.SENSOR_STATUS_ACCURACY_LOW
  • SensorManager.SENSOR_STATUS_ACCURACY_MEDIUM
  • SensorManager.SENSOR_STATUS_ACCURACY_HIGH

Returns:

the accelerometer calibration status. -1 indicates the status has not been retrieved yet.

public float getCompassAccuracy ()

Get compass accuracy in degrees.

Returns:

Accuracy in degrees.

public int getCompassCalibrationStatus ()

Get the compass calibration status.

Status can be one of the following values:

  • -1
  • SensorManager.SENSOR_STATUS_UNRELIABLE
  • SensorManager.SENSOR_STATUS_ACCURACY_LOW
  • SensorManager.SENSOR_STATUS_ACCURACY_MEDIUM
  • SensorManager.SENSOR_STATUS_ACCURACY_HIGH

Returns:

the compass calibration status. -1 indicates the status has not been retrieved yet.

public float getFixedAltitude ()

Get fixed altitude of the livesight's view point.

Returns:

Altitude in meters of the view point above the ground

public int getGyroscopeCalibrationStatus ()

Get the gyroscope calibration status.

Status can be one of the following values:

  • -1
  • SensorManager.SENSOR_STATUS_UNRELIABLE
  • SensorManager.SENSOR_STATUS_ACCURACY_LOW
  • SensorManager.SENSOR_STATUS_ACCURACY_MEDIUM
  • SensorManager.SENSOR_STATUS_ACCURACY_HIGH

Returns:

the gyroscope calibration status. -1 indicates the status has not been retrieved yet.

public long getObjectId (ARObject arObject)

Get ARObjects unique identifier.

Parameters:

  • arObject

    ARObject to retrieve unique identifier for

Returns:

ARObjects unique identifier. -1 returned if object has not been found

public java.util.List <ARObject> getObjects (PointF point)

Get a list of ARObjects at the specified screen point.

Parameters:

  • point

    Screen point to check for ARObjects

Returns:

List of ARObjects. null if no objects are located at point.

public java.util.List <ARObject> getObjects (ViewRect rect)

Get a list of ARObjects which intersect the given ViewRect

Parameters:

  • rect

    ViewRect to check for ARObjects

Returns:

List of ARObjects. null if no objects are located in rect.

public float getOcclusionOpacity ()

Get opacity of the occlusion items.

Returns:

A value of opacity.

public ARPoseReading getPose ()

Get latest pose

Returns:

An ARPoseReading object representing the latest available pose

public GeoCoordinate getPosition ()

Get the last known position.

Returns:

GeoCoordinate representing the last known position or null if no position fix is available

public GeoCoordinate getPosition (AtomicBoolean mapMached)

Get the last known position with map matching indicator. See NavigationManager, PositioningManager.

Parameters:

  • mapMached

    Set to true on return if the position was changed such that it matches the closest road. Usually enabled during navigation.

Returns:

GeoCoordinate representing the last known position or null if no position fix is available

public ProjectionType getProjectionType ()

Get Camera view ARController.ProjectionType

Returns:

A value of ProjectionType

public PointF getScreenViewPoint ()

Get target screen view point. This point is a final first person view on the screen.

Returns:

A value of the timeout in ms.

public long getSensorsWaitTimeout ()

Get sensors wait timeout in ms.

Returns:

A value of the timeout in ms.

public int getUpdateDistanceDelta ()

Get the update distance delta.

Returns:

Distance delta in meters.

See also:

setUpdateDistanceDelta(int)

public ViewType getViewType ()

Get enforced ARController.ViewType. If view type is AUTO the value depends on the device tilt and high and low pich thresholds.

Returns:

A ViewType.

public boolean isOccluded (ARObject arObject)

Check if an ARObject is occluded by a building

Parameters:

  • arObject

    ARObject

Returns:

true if object is occluded by a building, false otherwise.

See also:

ARIconObject

public boolean isOcclusionEnabled ()

Check if occlusion is enabled.

Returns:

true if occlusion is enabled, false otherwise.

public boolean isUsingAlternativeCenter ()

Checks to see if an alternative center is currently being used

Returns:

true if alternative center is used, false otherwise

See also:

setAlternativeCenter(GeoCoordinate)

public boolean isVisible (ARObject arObject)

Check if an ARObject is visible in the camera view.

Parameters:

  • arObject

    ARObject

Returns:

true if object is visible in camera view, false otherwise.

See also:

ARIconObject

public void pan (PointF from, PointF to)

Pans the Camera view from one specified on-screen android.graphics.PointF to another.

Parameters:

  • from

    An originating on-screen PointF (pre-pan)

  • to

    An on-screen PointF representing the end of the pan

public void panTo (GeoCoordinate coordinate)

Pan the Camera view such that the GeoCoordinate passed as a parameter will be in the last location in the Front plane (i.e. on the boundary between Front and Back plane).

This can be used in conjunction with getCoordinate() to pan so that a given ARObject will be in the last position in the Front plane.

Parameters:

  • coordinate

    GeoCoordinate to be the last location in Front plane.

public boolean pixelTo3dPosition (float z, PointF screenPoint, Vector3f position)

Convert a screen point into a 3d space position

Parameters:

  • z

    Position depth relative to which the conversion is made

  • screenPoint

    Screen point to convert. It is relative to the AR view

  • position

    Filled on return with the corresponding 3d space position

Returns:

true on success, false otherwise.

public ARObject press (PointF point)

Press an ARObject. Render the item to simulate pressing.

Parameters:

  • point

    android.graphics.PointF on the screen to press.

Returns:

Pressed ARObject. null if no object is located at point.

public void press (ARObject arObject)

Press an ARObject. Render the item to simulate pressing.

Parameters:

  • arObject

    The ARObject to be marked as pressed

public boolean removeARObject (ARObject arObject)

Remove an ARObject from the Camera and Map view.

Parameters:

  • arObject

    ARObject to remove

Returns:

true if object is successfully removed from ARController, false otherwise.

See also:

ARIconObject

public boolean removeARObject (ARPolylineObject arPolyObject)

Remove an ARPolylineObject from the Camera view.

Parameters:

  • arPolyObject

    ARPolylineObject to remove

Returns:

true if object is successfully removed from ARController, false otherwise.

public boolean removeARObject (ARModelObject arViewObject)

Remove an ARModelObject from the Camera view.

Parameters:

  • arViewObject

    ARModelObject to remove

Returns:

true if object is successfully removed from ARController, false otherwise.

public void removeOnCameraEnteredListener (OnCameraEnteredListener listener)

Removes an existing ARController.OnCameraEnteredListener from this ARController .

Parameters:

public void removeOnCameraExitedListener (OnCameraExitedListener listener)

Removes an existing ARController.OnCameraExitedListener from this ARController .

Parameters:

public void removeOnCompassCalibrationChangedListener (OnCompassCalibrationChangedListener listener)

Removes an existing ARController.OnCompassCalibrationChangedListener from this ARController .

Parameters:

public void removeOnLivesightStatusListener (OnLivesightStatusListener listener)

Removes an existing ARController.OnLivesightStatusListener from this ARController.

Parameters:

public void removeOnMapEnteredListener (OnMapEnteredListener listener)

Removes an existing ARController.OnMapEnteredListener from this ARController .

Parameters:

public void removeOnMapExitedListener (OnMapExitedListener listener)

Removes an existing ARController.OnMapExitedListener from this ARController .

Parameters:

public void removeOnObjectTappedListener (OnObjectTappedListener listener)

Removes an existing ARController.OnObjectTappedListener from this ARController .

Parameters:

public void removeOnPanListener (OnPanListener listener)

Removes an existing ARController.OnPanListener from this ARController .

Parameters:

public void removeOnPoseListener (OnPoseListener listener)

Removes an existing ARController.OnPoseListener from this ARController .

Parameters:

public void removeOnPostPresentListener (OnPostPresentListener listener)

Removes an existing ARController.OnPostPresentListener from this ARController .

Parameters:

public void removeOnPreDrawListener (OnPreDrawListener listener)

Removes an existing ARController.OnPreDrawListener from this ARController .

Parameters:

public void removeOnPreDrawMapListener (OnPreDrawMapListener listener)

Removes an existing ARController.OnPreDrawMapListener from this ARController .

Parameters:

public void removeOnPrePresentListener (OnPrePresentListener listener)

Removes an existing ARController.OnPrePresentListener from this ARController .

Parameters:

public void removeOnProjectionCameraUpdatedListener (OnProjectionCameraUpdatedListener listener)

Removes an existing ARController.OnProjectionCameraUpdatedListener from this ARController.

Parameters:

public void removeOnRadarUpdateListener (OnRadarUpdateListener listener)

Removes an existing ARController.OnRadarUpdateListener from this ARController .

Parameters:

public void removeOnSensorCalibrationChangedListener (OnSensorCalibrationChangedListener listener)

Removes an existing ARController.OnSensorCalibrationChangedListener from this ARController .

Parameters:

public void removeOnTapListener (OnTapListener listener)

Removes an existing ARController.OnTapListener from this ARController .

Parameters:

public void removeOnTouchDownListener (OnTouchDownListener listener)

Removes an existing ARController.OnTouchDownListener from this ARController .

Parameters:

public void removeOnTouchUpListener (OnTouchUpListener listener)

Removes an existing ARController.OnTouchUpListener from this ARController .

Parameters:

public void removePitchFunction ()

Removes an existing ARController.OnPitchFunction from this ARController.

public void select (ARObject arObject)

Select an ARObject. Any item in Camera view can be in selected state. This implies that the item is rendered differently. The ARObject becomes unselected automatically if another ARObject is selected. Only one ARObject can be selected at a time.

When selected: Details portion, (if present), of the item collapses, background image replaces foreground image, (if item is on foreground), item's image is scaled, (if specified), item's opacity is changed, (if specified), all non-selected items opacity, (if specified), are changed as well.

Parameters:

  • arObject

    The ARObject to be marked as selected

See also:

setOpacity(float)

setNonSelectedItemsOpacity(float)

public void select (ARObject arObject, boolean allowInfo, float scale)

Select an ARObject. Any item in Camera view can be in selected state. This implies that the item is rendered differently. The ARObject becomes unselected automatically if another ARObject is selected. Only one ARObject can be selected at a time.

Parameters:

  • arObject

    The ARObject to be marked as selected

  • allowInfo

    If true and info is visible, it will continue to be visible. If false, BACK icon replaces FRONT icon and info portion will collapse.

  • scale

    The size multiplier to be applied while the item is in selected state. If scale is x1, SelectedItemParams#setSize is used for width and height. Otherwise scale is applied to the current projected size.

    When selected: If allowInfo is set to false - details portion(if present) collapses and background image replaces foreground image(if item is on foreground), item's image is scaled by the factor of scale, item's opacity is changed(if specified), all non-selected items opacity(if specified) are changed as well.

See also:

setOpacity(float)

setNonSelectedItemsOpacity(float)

public void setAlternativeCenter (GeoCoordinate coordinate)

Set alternative to current GPS position to use for LiveSight. Passing null will cause LiveSight to resume using GPS position.

Parameters:

  • coordinate

    GeoCoordinate representing alternative center to use

See also:

isUsingAlternativeCenter()

public void setCompassAccuracy (float degrees)

Set compass accuracy in degrees.

Parameters:

  • degrees

    Accuracy in degrees.

public void setFixedAltitude (float altitude_m, boolean animate)

Set fixed altitude of the livesight's view point. Default value is 2 meters in order to see closest to the viewer surronding area. If the value is negative, the positioning service altitude will be used. Example: Setting altitude to 1000 meters would allow to create binocular magnification effect looking at the distance from 1000 meters above the ground.

Parameters:

  • altitude_m

    Altitude in meters of the view point above the ground

  • animate

    To control transition from current altitude to new one

public void setInfoAnimationInUpViewOnly (boolean enable)

Choose the moment when INFO animation starts.

Parameters:

  • enable

    If true, INFO open and close occurs in UP view only, that is after flying in and before flying out from UP view.

public void setMap (Map map)

Set Map to the ARController . ARController will handle transitions between views.

Parameters:

  • map

    Existing Map object

public void setOcclusionEnabled (boolean enable)

Enables or disables occlusion fading. If an item gets obstructed by a building its opacity will be reduced.

Parameters:

  • enable

    Enables if true or disables if false. By default, occlusion is disabled.

public void setOcclusionOpacity (float opacity)

Set opacity of the occlusion items.

Parameters:

  • opacity

    Opacity value to use when item is obstracted by a building.

public void setOrientationAnimation (boolean enabled)

Enable/disable animation during orientation change. It has effect on the camera scene only. This call should be made when livesight is stopped.

Parameters:

  • enabled

    If true, orientation animation is used

public void setPitchFunction (OnPitchFunction function)

Adds a ARController.OnPitchFunction to this ARController to be able to override current device pitch.

Parameters:

  • function

    A OnPitchFunction to add to the ARController

See also:

removePitchFunction()

public void setPlanesParameters (float frontNear, float frontFar, float backNear, float backFar)

Set front and back planes parameters - screen height ratios (0..1f). The livesight by default is using two plane scheme. The first one is the front plane where icons are shown in close proximity as a composition of two parts: front icon image and info icon image attached on the right. The back plane is for "far" icons. They are displayed with back icon images only. The front plane takes lower portion of the view. The back plane takes higher portion of the view. Both planes are limited by two horizontal lines described as a proportion of the hight of the view. Using push/pull gesture allows to move icons closer or farther from the viewer in each plane.

Parameters:

  • frontNear

    Front plane near screen height ratio. Example: 0.95

  • frontFar

    Front plane far screen height ratio. Example: 0.6

  • backNear

    Back plane near screen height ratio. Example: 0.2

  • backFar

    Back plane far screen height ratio. Example: 0.5

public void setProjectionType (ProjectionType type)

Set Camera view ARController.ProjectionType

Parameters:

  • type

    A value of ProjectionType.

public void setSensorsWaitTimeout (long timeout)

Set sensors wait timeout in ms. In exceptional situations sensors may not produce valid data due to system level malfunction. To handle the situation, provided timeout is used to wait until the sensors data is available. This call should be made before livesight start() command for the value to take effect, otherwise it will be used on next sensors verification. See ARController.OnLivesightStatusListener and ARController.Error codes.

Parameters:

  • timeout

    A value of the timeout in ms.

public void setTapArea (int width, int height)

Sets the tap area width and height. Whenever user touches the screen, a tap event is triggered. Whenever the user starts moving the finger on the screen, a pan event is triggered. The tap area is a rectangle having the initial touch point as the center. As long as the user moves the finger on the screen and the touch point is inside the tap area, no pan event will be triggered.The default tap area has a width and height of 51 pixels.

Parameters:

  • width

    The tap area width in pixels

  • height

    The tap area height in pixels

public void setUpdateDistanceDelta (int delta)

Sets the update distance delta for the items in the camera view.

When the distance between the current geo position and a new one is bigger than specified value the AR layout items projection is updated.

Parameters:

  • delta

    Distance delta in meters. Default: 3 meters.

public void setUseDownIconsOnMap (boolean useDownIcons)

Use Down icons in Map view in LiveSight

Parameters:

  • useDownIcons

    Enable using Down icons in Map view of LiveSight. By default, down icons are being used.

public void showFrontItemsOnly (boolean show)

Show only icons in the Front plane in Camera view.

Parameters:

  • show

    If true, only front items will be displayed in Camera view

public void showView (ViewType viewType)

Show(enforce) specified ARController.ViewType.

Parameters:

  • viewType

    ViewType to show

public Error start ()

Start AR

Returns:

NONE on success. Otherwise, one of the error codes in Error.

public Error stop (boolean withExitAnimation)

Stop AR

Parameters:

  • withExitAnimation

    If true, exit animation is used before stopping LiveSight.

Returns:

NONE on success. Otherwise, one of the error codes in Error.

public void unselect ()

Unselect previously selected object.

When unselected: Details portion(if present) expands, front image is used instead of background(if item is on foreground), item is scaled to normal size, all opacities change to default values.

See also:

setOpacity(float)

setNonSelectedItemsOpacity(float)

You cannot use this account to purchase a commercial plan on Developer Portal, as it is already associated to plans with different payment methods.

To purchase a commercial plan on Developer Portal, please register for or sign in with a different HERE Account.

Something took longer than expected.

The project should be available soon under your projects page.

Sorry, our services are not available in this region.

Something seems to have gone wrong. Please try again later.

We've detected that your account is set to Australian Dollars (AUD).
Unfortunately, we do not offer checkouts in AUD anymore.
You can continue using your current plan as normal, but to subscribe to one of our new plans,
please register for a new HERE account or contact us for billing questions on selfservesupport@here.com.