ImmersiveApp

lumin. ImmersiveApp

Base class for Lumin Runtime immersive apps.

Constructor

new ImmersiveApp(a_fTimeDeltaopt)

Creates an immersive application instance.

Parameters:
Name Type Attributes Default Description
a_fTimeDelta number <optional>
0.0

the preferred update rate as a time interval in seconds.
As a special case, 0.0f represents event-based mode, where update callbacks
will not happen at regular intervals -- only in response to events.

Extends

Methods

addNamed6DOFPoseAction(a_actionName) → {number}

Inherited From:

Maps Control's 6DoF to a NamedInputEventData.

Parameters:
Name Type Description
a_actionName string

The name of the NamedInputEventData.

Returns:

The Id that can be used to identify this event when received in the eventListener

Type
number

addNamedButtonAction(a_actionName, a_keyCode, a_longPressopt) → {number}

Inherited From:

Maps a Control button to a NamedInputEventData.

Parameters:
Name Type Attributes Default Description
a_actionName string

The name of the NamedInputEventData.

a_keyCode lumin.input.KeyCodes

The button's key code

a_longPress boolean <optional>
false

Whether the event should be emitted on long press (true) or short press (false)

Returns:

The Id that can be used to identify this event when received in the eventListener

Type
number

addNamedEyeTrackingAction(a_actionName) → {number}

Inherited From:

Maps eye tracking events to a NamedInputEventData.

Parameters:
Name Type Description
a_actionName string

The name of the NamedInputEventData.

Returns:

The Id that can be used to identify this event when received in the eventListener

Type
number

addNamedHandGestureAction(a_actionName, a_handGesture, a_holdopt, a_onceopt, a_handIndexopt) → {number}

Inherited From:

Maps the hand gesture to a NamedInputEventData.

Parameters:
Name Type Attributes Default Description
a_actionName string

The name of the NamedInputEventData.

a_handGesture lumin.input.GestureType

Hand gesture type.

a_hold boolean <optional>
false

Whether the event should be sent immediately (true), or send only if the
gesture is held for 1.5 seconds (false).

a_once boolean <optional>
true

Whether the event should be repeated (true), or send only once (false).

a_handIndex number <optional>
0xFFFFFFFF

Hand index that the event should be associated with
(Left = 0, Right = 1, Both = 0xFFFFFFFF).

Returns:

The Id that can be used to identify this event when received in the eventListener.

Type
number

addNamedTouchAction(a_actionName, a_touchGesture, a_touchDirectionopt) → {number}

Inherited From:

Maps a Control gesture to a NamedInputEventData.

Parameters:
Name Type Attributes Default Description
a_actionName string

The name of the NamedInputEventData.

a_touchGesture lumin.input.GestureType

Touch gesture type.

a_touchDirection lumin.input.GestureDirection <optional>
input.GestureDirection.UNKNOWN

Gesture's direction (GestureDirection::UNKNOWN for all).

Returns:

The Id that can be used to identify this event when received in the eventListener

Type
number

checkPrivilege(privilegeId) → {lumin.PrivilegeResult}

Inherited From:

Checks if a privilege is currently granted.

Parameters:
Name Type Description
privilegeId lumin.PrivilegeId

The privilege ID to check

Returns:

Granted or Denied

Type
lumin.PrivilegeResult

deInit() → {number}

Overrides:
Returns:
Type
number

deletePrism(prism)

Inherited From:

Deletes the prism

Parameters:
Name Type Description
prism lumin.Prism

the Prism to delete

dismissAllNotifications()

Inherited From:

Dismss all notifications from this application

dismissNotification(notification) → {boolean}

Inherited From:

Dismiss the given notification

Parameters:
Name Type Description
notification lumin.Notification

the notification to dismiss

Returns:

true if the notification was dismissed, false otherwise

Type
boolean

eventListener(a_pEvent) → {boolean}

Overrides:
Parameters:
Name Type Description
a_pEvent lumin.ServerEvent
Returns:
Type
boolean

getComponentName() → {string}

Inherited From:

Returns the name of the component this application instance belongs to.

Returns:
Type
string

getCurrentLocaleHelper() → {lumin.utils.LocaleHelper}

Inherited From:

Gets the LocaleHelper that's set to the current system locale

Returns:

the current system LocaleHelper

Type
lumin.utils.LocaleHelper

getFloorHeight() → {number}

Inherited From:

Returns the height (y-value) of the floor, if known, in world coordinates.

Returns:

Returned floor height.

Type
number

getHeadposeConfidence() → {number}

Inherited From:

Get the underlying system's confidence in the headpose values

Returns:

a value between 0.0 and 1.0 indicating the confidence

Type
number

getHeadposeError() → {lumin.headtracking.Error}

Inherited From:

Get the current headpose error (if any)

Returns:

the current headpose error

Type
lumin.headtracking.Error

getHeadposeMode() → {lumin.headtracking.Mode}

Inherited From:

Get the current headpose mode (6-DOF or 3-DOF)

Returns:

the current headpose mode

Type
lumin.headtracking.Mode

getHeadposeWorldForwardVector() → {vec3}

Inherited From:

Get the Headpose forward vector in world space.

Returns:

the world space headpose forward vector.

Type
vec3

getHeadposeWorldPosition() → {vec3}

Inherited From:

Get the Headpose position in world space.

Returns:

the world space headpose position.

Type
vec3

getHeadposeWorldUpVector() → {vec3}

Inherited From:

Get the Headpose up vector in world space.

Returns:

the world space headpose up vector.

Type
vec3

getInput() → {lumin.InputHelper}

Inherited From:

Get the input state tracking system (used to maintain the list of active input devices and track their input)

Returns:

a pointer to the input state tracking system

Type
lumin.InputHelper

getLocaleCode() → {string}

Inherited From:

Get the system locale code

Returns:
Type
string

getNearestPCF(worldLocation) → {lumin.PCFId}

Inherited From:

Returns the nearest Persistent Coordinate Frame to a given world location.
NOTE: This function can be slow, use sparingly.

Parameters:
Name Type Description
worldLocation vec3

Position to get the PCF from.

Returns:

The PCF. If it is INVALID_PCF, it is likely the world mesh hasn't been built up enough
to create the PCF data, or the app doesn't have the PcfRead privilege set.

Type
lumin.PCFId

getPackageName() → {string}

Inherited From:

Returns the package name for this application.

Returns:
Type
string

getPackagePath() → {string}

Inherited From:

Returns the application's path

Returns:
Type
string

getPCFCount() → {number}

Inherited From:

Returns the number of Persistent Coordinate Frames the system knows about.

Returns:

The PCF count.

Type
number

getPCFData(pcf) → {lumin.PCFData}

Inherited From:

Gets data associated with a given PCF.

Parameters:
Name Type Description
pcf lumin.PCFId

The PCF to fetch data for.

Returns:

PCF data. Check the state value of the returned data to verify that it is good.

Type
lumin.PCFData

getPCFs() → {Array.<lumin.PCFId>}

Inherited From:

Returns a list of the Persistent Coordinate Frames the system knows about. It is suggested that
this function should only be called when getPCFCount() > 0 and has changed since the previous call.

Returns:

PCF list.

Type
Array.<lumin.PCFId>

getPreloadedResources() → {lumin.resources.Preloaded}

Inherited From:

Get an object clients can use to find preloaded resources.

Returns:
Type
lumin.resources.Preloaded

getPrism(prismId) → {lumin.Prism}

Inherited From:

Returns pointer to the Prism

Parameters:
Name Type Description
prismId BigInt

the Id of the Prism

Returns:

The prism

Type
lumin.Prism

getPrismPosition(a_prism) → {vec3}

Inherited From:

Returns the position of a volume in world space

Parameters:
Name Type Description
a_prism lumin.Prism

the prism

Returns:
  • the prism position
Type
vec3

getPrismRotation(a_prism) → {quat}

Inherited From:

Returns the rotation of a volume in world space

Parameters:
Name Type Description
a_prism lumin.Prism

the prism

Returns:
  • the prism orientation quaternion
Type
quat

getPrismTransform(a_prism) → {mat4}

Inherited From:

Returns the transform of a volume in world space

Parameters:
Name Type Description
a_prism lumin.Prism

the prism

Returns:

The transform of the Prism in world space

Type
mat4

getTempPath() → {string}

Inherited From:

Returns the application's path for temporary files

Returns:
Type
string

getVisibleName() → {string}

Inherited From:

Returns the user-visible name for this application.

Returns:
Type
string

getWorldMeshBlockData(a_blockPos, a_blockData) → {boolean}

Returns the world mesh data for a block at a given location.

Parameters:
Name Type Description
a_blockPos vec3

Block position in world-space.

a_blockData lumin.WorldMeshBlockData

Class that will be filled in with the block data.

Returns:

true if blockData has valid data

Type
boolean

getWritablePath() → {string}

Inherited From:

Returns the application's writable path.

This folder is accessible to the application when the user has logged in once,
even if the device is locked and not in use.
An application that needs to write data when running in the background
(e.g. a music app) should use this path. The same application can continue
using this path when the device is unlocked afterwards.

Returns:
Type
string

getWritablePathWhenUnlocked() → {string}

Inherited From:

Returns the application's writable path while unlocked.

This folder is accessible to the application when the user has logged in and the
device is unlocked and being used.

Returns:
Type
string

isHandOcclusionEnabled() → {boolean}

Gets whether hand occlusion is currently enabled or not

Returns:

true if currently enabled, false otherwise

Type
boolean

isImageTrackingReady() → {boolean}

Inherited From:

Returns if the image tracking system is ready to be used. Do not call any image tracking functions
until this function returns true.

Currently image tracking is only available for immersive apps.

Returns:

true if we can start tracking images.

Type
boolean

isInternetConnected() → {boolean}

Inherited From:

Get Internet Connection status.
return True if there is a connection, otherwise false.

Returns:
Type
boolean

isShareableApp() → {boolean}

Inherited From:

Returns if the app running is a Shareable app

Returns:
Type
boolean

isSkipRaycast(a_prism) → {boolean}

Returns the skip raycast state of the volume.

Parameters:
Name Type Description
a_prism lumin.Prism

The Prism.

Returns:

true if the prism is skipped during raycasting

Type
boolean

isWiFiConnected() → {boolean}

Inherited From:

Get WiFi Connected status.
return True if there is a connection, otherwise false.

Returns:
Type
boolean

isWiFiEnabled() → {boolean}

Inherited From:

Get WiFi Enabled status.
return True if Wifi is enabled in settings, otherwise false.

Returns:
Type
boolean

lockCurrentLocaleHelperToLocale(localeCode)

Inherited From:

Lock the LocaleHelper to the given locale. It will no longer change when the system locale is changed

Parameters:
Name Type Description
localeCode string

the lock that the LocaleHelper will be locked to

onAppPause()

Overrides:

onAppResume()

Overrides:

onAppStart(initArg)

Overrides:
Parameters:
Name Type Description
initArg lumin.InitArg

onAppUnloadResources()

Overrides: