LandscapeApp

lumin. LandscapeApp

Base class for Lumin Runtime landscape apps.

Constructor

new LandscapeApp(a_fTimeDeltaopt)

Creates a landscape 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

disableContentPersistence(a_prism) → {boolean}

Stops persisting a given Prism's content across reboots

By default a Prism's content persists across reboots. This means that all opened Prisms are
saved when the device shuts down. Prisms that are explicitly closed by the user or app prior
to shutdown are not saved. When the device boots up, and the area (dense mesh) is recognized,
then all saved Prisms are restored by automatically starting the apps associated with the
Prisms and asking them to request new Prisms. If the app saved their content persistence ID
locally prior to shutdown, then for each restored Prism they can figure out how exactly to
restore it.

Parameters:
Name Type Description
a_prism lumin.Prism

the Prism

Returns:

whether this call was successful or not

Type
boolean

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

getBodyDynamic(a_prism) → {lumin.BodyDynamicType}

Retrieves the current body dynamic type for the Prism

See setBodyDynamic for information on body dynamics.

Parameters:
Name Type Description
a_prism lumin.Prism

the Prism

Returns:

the body dynamic of the Prism

Type
lumin.BodyDynamicType

getCollisionBoxTransform(a_prism) → {mat4}

Get the transform of the collision box attached to the given prism.

Parameters:
Name Type Description
a_prism lumin.Prism

the prism.

Returns:

transform of collision box attached to the given prism
or null if call was not successful

Type
mat4

getCollisionsEnabled(a_prism) → {boolean}

Get whether the given prism participates in collisions when prisms are in motion.

Parameters:
Name Type Description
a_prism lumin.Prism

Prism to get whether collisions are enabled.

Returns:

True if collisions are enabled
for the given prism; false otherwise.

Type
boolean

getComponentName() → {string}

Inherited From:

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

Returns:
Type
string

getContentPersistenceId(a_prism) → {string}

Gets the Content Persistence ID assigned to the Prism

This is the ID assigned to a Prism that is saved across reboots. Note that if this Prism
is destroyed before the device shuts down, then this ID is no longer valid. See
disableContentPersistence for more information on content persistence.

Parameters:
Name Type Description
a_prism lumin.Prism

the Prism

Returns:

the Content Persistence ID assigned to this Prism

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

getDirectManipulationEnabled(a_prism) → {boolean}

Gets the bool for whether direct manipulation is enabled or not for this Prism

See setDirectManipulationEnabled for information on direct manipulation.

Parameters:
Name Type Description
a_prism lumin.Prism

the Prism

Returns:

whether direct manipulation is enabled for the prism

Type
boolean

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>

getPhysicalSizeRange(a_prism) → {vec2}

Gets the physical size range of the Prism

See setPhysicalSizeRange for information on size ranges.

Parameters:
Name Type Description
a_prism lumin.Prism

the Prism

Returns:

pair of minimum/maximum phisical size this prism can be, in meters
or null if call was not successful

Type
vec2

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

getScaleMode(a_prism) → {lumin.ScaleModeType}

Gets the scale mode of the Prism

See setBodyDynamic for information on scale modes.

Parameters:
Name Type Description
a_prism lumin.Prism

the Prism

Returns:

the scale mode retrieved from the Prism

Type
lumin.ScaleModeType

getSnap(a_prism) → {boolean}

Gets whether this Prism should snap while being moved or not

See setSnap for information on snapping.

Parameters:
Name Type Description
a_prism lumin.Prism

the Prism

Returns:

whether this Prism is snapping or not

Type
boolean

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

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.