RealityAPI

Interface RealityAPI

Hierarchy

Methods

  • Experimental

    enters the initialization phase for modeltracking, this is also used to reset the current modeltracking. It will also trigger REALITY_MODELTRACKERSTATE_CHANGED event with the ModelTrackingState.INIT set to true By default the modeltracking will be softreset. If you choose to reset different data on the modeltracker you can do so by specifying the xrInitOptions.

    Parameters

    • memberId: number

      the XRMember that the operation should be applied on

    • Optional xrInitOptions: XRInitOptions

      Specify initOptions. E.g. reset behavior of modeltracker. Default is softreset.

    Returns Promise<boolean>

    returns a Promise which reports wether the operation was successful or not

  • Experimental

    leaves the initialization phase for modeltracking, this will also fixate the model at the current position

    Parameters

    • memberId: number

      the XRMember that the operation should be applied on

    Returns Promise<boolean>

    returns a Promise which reports wether the operation was successful or not

  • Experimental

    Fixates the model at the current position. It will also trigger REALITY_XRSTATE_CHANGED event with the XRState.FIXATED set to true

    Parameters

    • memberId: number

      the XRMember that the operation should be applied on

    Returns Promise<boolean>

    returns a Promise which reports wether the operation was successful or not

  • Experimental

    list all the available XR members in the current session

    Parameters

    • memberId: number

      the XRMember that the operation should be applied on

    Returns XRMemberInfo

    returns a struct containing all relevant infos (memberId, XRCapabilities, sessionMemberData) for the given member

  • Experimental

    Get the runtime state of a XR Member

    Parameters

    • memberId: number

      the XRMember that the state should be queried from

    Returns XRMemberState

    returns either the member state if the member exist or return undefined if xr is not connected or memberId does not exist

  • Experimental

    list all the available XR members in the current session

    Returns number[]

    returns a Promise with the list of all available XRMembers

  • Experimental

    execute whatever is necessary to enable XRCapbilities on the given member, e.g. start the camera or forward to the booster

    Parameters

    • memberId: number

      the XRMember that the operation should be applied on

    Returns Promise<boolean>

    returns a Promise which reports wether the operation was successful or not

  • Deprecated

    restart modeltracker initialization for the local xr member

    Returns Promise<boolean>

    returns true if resetting was successfull or false if not

  • Experimental

    This will set settings for the specific xr member.

    modeltrackerQualityThreshold sets a normalized threshold for the modeltracker. The threshold determines the actual correspondence of the generated line model to the real world. A value of 1 means total correspondence, while a value of zero means no correspondence at all. Depending on that value the tracker will trigger a REALITY_MODELTRACKERSTATE_CHANGED event with the ModelTrackingState.SNAPPED to true and a REALITY_XRSTATE_CHANGED event with XRState.FIXATED set to true

    enableDebugImages will enable or disable the edge images to be send from the modeltracker. If set to true it will trigger REALITY_MODELTRACKER_EDGEIMG_RECEIVED events once an debug image arrives. Note: When enabled this will impact bandwidth and perfomance of the application, so we recommand using this only on demand.

    Parameters

    • memberId: number

      the XRMember that the operation should be applied on

    • settings: XRMemberSettings

      The quality threshold for the modeltracker must be between 0 and 1

    Returns Promise<boolean>

    returns a Promise which reports wether the operation was successful or not

  • Deprecated

    show expert dialog for developers or advanced users

    Returns Promise<boolean>

    returns true if the operation was successfull or false if not

  • Deprecated

    start AR. Projects the camera stream in the background and starts searching for the given reference. The reference is defined by setting the realproperty on the particular node via the webvis API. E.g. webvis.setProperty(0, pluginAPI.realProperty, pluginAPI.realState.Enabled)

    Returns Promise<boolean>

    returns true if starting was successfull or false if it could not start AR

  • Experimental

    Puts the image stream in the background of the renderer. It will also trigger REALITY_XRSTATE_CHANGED event with the XRState.FOLLOWING set to true

    Parameters

    • memberId: number

      the XRMember that the operation should be applied on

    Returns Promise<boolean>

    returns a Promise which reports wether the operation was successful or not

  • Deprecated

    stop AR. Stop projecting the camera stream in the background and reset background to default color.

    Returns Promise<boolean>

    returns true if stopping was successfull or false if it could not stop AR

  • Experimental

    Stops the image stream in the background of the renderer. It will also trigger REALITY_XRSTATE_CHANGED event with the XRState.FOLLOWING set to false

    Parameters

    • memberId: number

      the XRMember that the operation should be applied on

    Returns Promise<boolean>

    returns a Promise which reports wether the operation was successful or not

  • Experimental

    Unfixates the model. The model will move with the device. It will also trigger REALITY_XRSTATE_CHANGED event with the XRState.FIXATED set to false

    Parameters

    • memberId: number

      the XRMember that the operation should be applied on

    Returns Promise<boolean>

    returns a Promise which reports wether the operation was successful or not