AugmentedVirtuality

AugmentedVirtuality

new AugmentedVirtuality()

Source:

Manages state for Augmented Virtuality mode.

This mode uses the devices orientation sensors to change the viewers viewport to match the change in orientation.

Term Augmented Virtuality: "The use of real-world sensor information (e.g., gyroscopes) to control a virtual environment is an additional form of augmented virtuality, in which external inputs provide context for the virtual view." https://en.wikipedia.org/wiki/Mixed_reality

Members

(static) DEFAULT_MAXIMUM_UPDATES_PER_SECOND

Source:

Gets the the maximum number of times that the camera orientation will be updated per second by default. This is the number of camera orientation updates per seconds is capped to by default (explicitly the number of times the orientation is updated per second might be less but it won't be more then this number). We want the number of times that the orientation is updated capped so that we don't consume to much battery life updating to frequently, but responsiveness is still acceptable.

(static) MINIMUM_HOVER_HEIGHT

Source:

The minimum height that the viewer is allowed to hover at.

enabled :Boolean

Source:

Gets or sets whether Augmented Virtuality mode is currently enabled (true) or not (false).

Note: If AugmentedVirtuality#manualAlignment is enabled and the state is changed it will be disabled.

Type:
  • Boolean

hoverLevel :int

Source:

Gets the index of the current hover level.

Use AugmentedVirtuality.PRESET_HEIGHTS.length to find the total avaliable levels.

Type:
  • int

manualAlignment :Boolean

Source:

Gets or sets whether manual realignment mode is currently enabled (true) or not (false).

Type:
  • Boolean

manualAlignmentSet :Boolean

Source:

Gets whether a manual realignment has been specified (true) or not (false).

Type:
  • Boolean

maximumUpdatesPerSecond :Float

Source:

Gets or sets the the maximum number of times that the camera orientation will be updated per second. This is the number of camera orientation updates per seconds is capped to (explicitly the number of times the orientation is updated per second might be less but it won't be more then this number). We want the number of times that the orientation is updated capped so that we don't consume to much battery life updating to frequently, but responsiveness is still acceptable.

Type:
  • Float

Methods

hover(height, positionopt, flyToopt)

Source:

Moves the viewer to a specified height, setting the orientation so that it matches the correct Augmented Virtuality orientation.

Parameters:
Name Type Attributes Default Description
height Float

The height in Meters above the globe surface. Note: If height is below AugmentedVirtuality.MINIMUM_HOVER_HEIGHT the height will be set to AugmentedVirtuality.MINIMUM_HOVER_HEIGHT to avoid visual artifacts when the viewer becomes to close to the surface.

position Cartographic <optional>

The location to hover over. If not specified the current camera location will be used.

flyTo Boolean <optional>
true

Whether to fly to the location (true) or whether to jump to the location (false).

moveTo(position, maximumHeightopt, flyToopt)

Source:

Moves the viewer to a specified location while maintaining the current height and the correct Augmented Virtuality orientation.

Parameters:
Name Type Attributes Description
position Cartographic

The location to hover move to.

maximumHeight Float <optional>

The maximum height (in meters) to cap the current camera height to (if this value is specified and the viewer is above this height the camera will be restricted to this height).

flyTo Boolean <optional>

Whether to fly to the location (true) or whether to jump to the location (false).

When the manual alignment is enabled this function has no effect.

resetAlignment()

Source:

Resets the alignment so that the alignement matches the devices absolute alignment.

toggleEnabled()

Source:

Toggles whether the AugmentedVirutuality mode is enabled or disabled.

toggleHoverHeight()

Source:

Toggles the viewer between a range of predefined heights, setting the cameras orientation so that it matches the correct orientation.

toggleManualAlignment()

Source:

Toggles whether manual alignement is enabled or disabled.