Top Description Fields Constructors Methods
org.lwjgl.openxr

public Class MSFTPerceptionAnchorInterop

extends Object
Class Inheritance
Imports
org.lwjgl.*, org.lwjgl.system.*

The XR_MSFT_perception_anchor_interop extension.

This extension supports conversion between XrSpatialAnchorMSFT and Windows.Perception.Spatial.SpatialAnchor. An application can use this extension to persist spatial anchors on the Windows device through SpatialAnchorStore or transfer spatial anchors between devices through SpatialAnchorTransferManager.

Field Summary

Modifier and TypeField and Description
public static final String
public static final int
XR_MSFT_perception_anchor_interop_SPEC_VERSION

The extension specification version.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static int
nxrCreateSpatialAnchorFromPerceptionAnchorMSFT(XrSession session, long perceptionAnchor, long anchor)

Unsafe version of: CreateSpatialAnchorFromPerceptionAnchorMSFT

public static int
public static int
xrCreateSpatialAnchorFromPerceptionAnchorMSFT(XrSession
the specified XrSession.
session
,
long
an IUnknown pointer to a Windows.Perception.Spatial.SpatialAnchor object.
perceptionAnchor
,
PointerBuffer
a pointer to XrSpatialAnchorMSFT to receive the returned anchor handle.
anchor
)

Create an XrSpatialAnchorMSFT from a Windows SpatialAnchor pointer.

public static int
xrTryGetPerceptionAnchorFromSpatialAnchorMSFT(XrSession
the specified XrSession.
session
,
XrSpatialAnchorMSFT
a valid XrSpatialAnchorMSFT handle.
anchor
,
PointerBuffer
a valid pointer to IUnknown pointer to receive the output Windows.Perception.Spatial.SpatialAnchor object.
perceptionAnchor
)

Convert an XrSpatialAnchorMSFT to a Windows SpatialAnchor.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

XR_MSFT_PERCEPTION_ANCHOR_INTEROP_EXTENSION_NAMEback to summary
public static final String XR_MSFT_PERCEPTION_ANCHOR_INTEROP_EXTENSION_NAME

The extension name.

XR_MSFT_perception_anchor_interop_SPEC_VERSIONback to summary
public static final int XR_MSFT_perception_anchor_interop_SPEC_VERSION

The extension specification version.

Constructor Detail

MSFTPerceptionAnchorInteropback to summary
protected MSFTPerceptionAnchorInterop()

Method Detail

nxrCreateSpatialAnchorFromPerceptionAnchorMSFTback to summary
public static int nxrCreateSpatialAnchorFromPerceptionAnchorMSFT(XrSession session, long perceptionAnchor, long anchor)

Unsafe version of: CreateSpatialAnchorFromPerceptionAnchorMSFT

nxrTryGetPerceptionAnchorFromSpatialAnchorMSFTback to summary
public static int nxrTryGetPerceptionAnchorFromSpatialAnchorMSFT(XrSession session, XrSpatialAnchorMSFT anchor, long perceptionAnchor)

Unsafe version of: TryGetPerceptionAnchorFromSpatialAnchorMSFT

xrCreateSpatialAnchorFromPerceptionAnchorMSFTback to summary
public static int xrCreateSpatialAnchorFromPerceptionAnchorMSFT(XrSession session, long perceptionAnchor, PointerBuffer anchor)

Create an XrSpatialAnchorMSFT from a Windows SpatialAnchor pointer.

C Specification

The CreateSpatialAnchorFromPerceptionAnchorMSFT function creates a XrSpatialAnchorMSFT handle from an IUnknown pointer to Windows.Perception.Spatial.SpatialAnchor.


XrResult xrCreateSpatialAnchorFromPerceptionAnchorMSFT(
    XrSession                                   session,
    IUnknown*                                   perceptionAnchor,
    XrSpatialAnchorMSFT*                        anchor);
Description

The input perceptionAnchor must support successful QueryInterface to Windows.Perception.Spatial.SpatialAnchor , otherwise the runtime must return ERROR_VALIDATION_FAILURE.

If the function successfully returned, the output anchor must be a valid handle. This also increments the refcount of the perceptionAnchor object.

When application is done with the anchor handle, it can be destroyed using DestroySpatialAnchorMSFT function. This also decrements the refcount of underlying windows perception anchor object.

Valid Usage (Implicit)
Return Codes
On success, this command returns
On failure, this command returns
Parameters
session:XrSession

the specified XrSession.

perceptionAnchor:long

an IUnknown pointer to a Windows.Perception.Spatial.SpatialAnchor object.

anchor:PointerBuffer

a pointer to XrSpatialAnchorMSFT to receive the returned anchor handle.

Annotations
@NativeType:XrResult
xrTryGetPerceptionAnchorFromSpatialAnchorMSFTback to summary
public static int xrTryGetPerceptionAnchorFromSpatialAnchorMSFT(XrSession session, XrSpatialAnchorMSFT anchor, PointerBuffer perceptionAnchor)

Convert an XrSpatialAnchorMSFT to a Windows SpatialAnchor.

C Specification

The TryGetPerceptionAnchorFromSpatialAnchorMSFT function converts a XrSpatialAnchorMSFT handle into an IUnknown pointer to Windows.Perception.Spatial.SpatialAnchor.


XrResult xrTryGetPerceptionAnchorFromSpatialAnchorMSFT(
    XrSession                                   session,
    XrSpatialAnchorMSFT                         anchor,
    IUnknown**                                  perceptionAnchor);
Description

If the runtime can convert the anchor to a Windows.Perception.Spatial.SpatialAnchor object, this function must return SUCCESS, and the output IUnknown in the pointer of perceptionAnchor must be not NULL. This also increments the refcount of the object. The application can then use QueryInterface to get the pointer for Windows.Perception.Spatial.SpatialAnchor object. The application should release the COM pointer after done with the object, or attach it to a smart COM pointer such as winrt::com_ptr.

If the runtime cannot convert the anchor to a Windows.Perception.Spatial.SpatialAnchor object, the function must return SUCCESS, and the output IUnknown in the pointer of perceptionAnchor must be NULL.

Valid Usage (Implicit)
Return Codes
On success, this command returns
On failure, this command returns
Parameters
session:XrSession

the specified XrSession.

anchor:XrSpatialAnchorMSFT

a valid XrSpatialAnchorMSFT handle.

perceptionAnchor:PointerBuffer

a valid pointer to IUnknown pointer to receive the output Windows.Perception.Spatial.SpatialAnchor object.

Annotations
@NativeType:XrResult