ArScreen

open class ArScreen : Viewport

The ArScreen class represents a screen for augmented reality (AR) content to be displayed on the glasses.

This screen can display AR elements such as meshes and boards, as well as HUD elements.

You should inherit from this class in order to create application screens to be displayed on the glasses (similar to IOS viewController or Android Activity)

The ArScreen lifecycle is as follows:

Constructors

Link copied to clipboard
constructor()
constructor(name: String)

Properties

Link copied to clipboard
protected var keepSensorsOn: Boolean

Indicates whether to keep the sensors on during the onPause lifecycle event. Default value is false.

Link copied to clipboard

Represents the last calibration status of the sensors.

Link copied to clipboard

Quaternion representing the current LOS (line of sight)

Functions

Link copied to clipboard
fun add(arElement: ArModel)

Adds an ArModel element to the screen.

fun add(arWindow: ArWindow)

Adds an ArWindow element to the screen.

fun add(uiElement: UIElement)

Adds a UI element to the internal HUD board.

Link copied to clipboard

returns a base ui element that was added to the screen

Link copied to clipboard

Receive the base ui elements that were added to the screen

Link copied to clipboard

Indicates if the screen has base ui elements

Link copied to clipboard

Retrieves the horizontal field of view in degrees.

Link copied to clipboard

Retrieves the vertical field of view in degrees.

Link copied to clipboard
protected open override fun onCreate()

Override this function to be notified when the screen is created

Link copied to clipboard
protected open override fun onPause()

Override this function to be notified when the screen is paused

Link copied to clipboard
protected open override fun onResume()

Override this function to be notified when the screen is resumed

Link copied to clipboard
protected open override fun onUpdateUI(timestampMs: Long)

Override this function to be notified when the screen is about to be drawn

Link copied to clipboard
fun remove(arElement: ArModel)

Removes an ArModel element from the screen.

fun remove(arWindow: ArWindow)

Removes an ArWindow element from the screen.

fun remove(uiElement: UIElement)

Removes a UI element from the internal HUD board.

Link copied to clipboard

Removes the ArScreen from the screens stack.

Link copied to clipboard
fun sendToBack(uiElement: UIElement)

Sends the specified UI element to the back of the rendering order on the internal HUD board.

Link copied to clipboard
fun setTopmost(uiElement: UIElement)

Sets the specified UI element as the topmost element on the internal HUD board.