Skip to content

ArWindow

Overview

The ArWindow is a standard UIElementsGroup, contains elements from the UI Kit and can be placed in the 3D space.

You can use the ArWindow to draw 2D UIElement and place them in the AR environment.

Placing ArWindow

ArWindow can be placed in the 3D space in the following ways:

Relative to glasses

Use the setEyePosition function. see (Eye Coordinate System).

In the following example we place the ArWindow right in front of the user's eyes:

arWindow.setEyePosition(qtrn = quat, eyeRight = 0f, eyeUp = 0f, eyeBack = -1f)
arWindow.setEyePosition(qtrn: quat, eyeRight: 0.0, eyeUp: 0.0, eyeBack: -1.0)

For most of the cases you should use the quat for the qtrn parameter.

At a world position

Use the setWorldPosition function (World Coordinate System).

In the following example we place the ArWindow to the north:

arWindow.setWorldPosition(east = 0f, north = 1f, up = 0f)
arWindow.setWorldPosition(east: 0.0, north: 1.0, up: 0.0)

Custom Elements

You can easily inherit from ArWindow and extends it's functionality. You may also use all the capabilities from the UI Kit Custom Controls.


Learn about the ArModel