Top Description Fields Constructors Methods
org.lwjgl.openxr

public Class MSFTSpatialGraphBridge

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

The XR_MSFT_spatial_graph_bridge extension.

This extension enables applications to interop between XrSpace handles and other Windows Mixed Reality device platform libraries or APIs. These libraries represent a spatially tracked point, also known as a "spatial graph node", with a GUID value. This extension enables applications to create XrSpace handles from spatial graph nodes. Applications can also try to get a spatial graph node from an XrSpace handle.

Field Summary

Modifier and TypeField and Description
public static final int
XR_GUID_SIZE_MSFT

XR_GUID_SIZE_MSFT

public static final String
public static final int
XR_MSFT_spatial_graph_bridge_SPEC_VERSION

The extension specification version.

public static final int
public static final int
XR_SPATIAL_GRAPH_NODE_TYPE_DYNAMIC_MSFT

XrSpatialGraphNodeTypeMSFT - The type of spatial graph node.

public static final int
XR_SPATIAL_GRAPH_NODE_TYPE_STATIC_MSFT

XrSpatialGraphNodeTypeMSFT - The type of spatial graph node.

public static final int
public static final int
public static final int
public static final int

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static int
nxrCreateSpatialGraphNodeSpaceMSFT(XrSession session, long createInfo, long space)

Unsafe version of: CreateSpatialGraphNodeSpaceMSFT

public static int
public static int
nxrTryCreateSpatialGraphStaticNodeBindingMSFT(XrSession session, long createInfo, long nodeBinding)

Unsafe version of: TryCreateSpatialGraphStaticNodeBindingMSFT

public static int
xrCreateSpatialGraphNodeSpaceMSFT(XrSession
the XrSession which will use the created space.
session
,
XrSpatialGraphNodeSpaceCreateInfoMSFT
an XrSpatialGraphNodeSpaceCreateInfoMSFT specifying the space to be created.
createInfo
,
PointerBuffer
the returned XrSpace handle for the given spatial node ID.
space
)

Create an XrSpace from a spatial graph node.

public static int
xrDestroySpatialGraphNodeBindingMSFT(XrSpatialGraphNodeBindingMSFT
an XrSpatialGraphNodeBindingMSFT previously created by TryCreateSpatialGraphStaticNodeBindingMSFT.
nodeBinding
)

Destroy a spatial graph node handle.

public static int
xrGetSpatialGraphNodeBindingPropertiesMSFT(XrSpatialGraphNodeBindingMSFT
an XrSpatialGraphNodeBindingMSFT previously created by TryCreateSpatialGraphStaticNodeBindingMSFT.
nodeBinding
,
XrSpatialGraphNodeBindingPropertiesGetInfoMSFT
a pointer to an XrSpatialGraphNodeBindingPropertiesGetInfoMSFT input structure.
getInfo
,
XrSpatialGraphNodeBindingPropertiesMSFT
a pointer to an XrSpatialGraphNodeBindingPropertiesMSFT output structure.
properties
)

Destroy a spatial graph node handle.

public static int
xrTryCreateSpatialGraphStaticNodeBindingMSFT(XrSession
the specified XrSession.
session
,
XrSpatialGraphStaticNodeBindingCreateInfoMSFT createInfo, PointerBuffer
the XrSpatialGraphNodeBindingMSFT output structure.
nodeBinding
)

Try create spatial graph static node binding.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

XR_GUID_SIZE_MSFTback to summary
public static final int XR_GUID_SIZE_MSFT

XR_GUID_SIZE_MSFT

XR_MSFT_SPATIAL_GRAPH_BRIDGE_EXTENSION_NAMEback to summary
public static final String XR_MSFT_SPATIAL_GRAPH_BRIDGE_EXTENSION_NAME

The extension name.

XR_MSFT_spatial_graph_bridge_SPEC_VERSIONback to summary
public static final int XR_MSFT_spatial_graph_bridge_SPEC_VERSION

The extension specification version.

XR_OBJECT_TYPE_SPATIAL_GRAPH_NODE_BINDING_MSFTback to summary
public static final int XR_OBJECT_TYPE_SPATIAL_GRAPH_NODE_BINDING_MSFT

Extends XrObjectType.

XR_SPATIAL_GRAPH_NODE_TYPE_DYNAMIC_MSFTback to summary
public static final int XR_SPATIAL_GRAPH_NODE_TYPE_DYNAMIC_MSFT

XrSpatialGraphNodeTypeMSFT - The type of spatial graph node.

Description

There are two types of spatial graph nodes: static and dynamic.

Static spatial nodes track the pose of a fixed location in the world relative to reference spaces. The tracking of static nodes may slowly adjust the pose over time for better accuracy but the pose is relatively stable in the short term, such as between rendering frames. For example, a QR code tracking library can use a static node to represent the location of the tracked QR code. Static spatial nodes are represented by SPATIAL_GRAPH_NODE_TYPE_STATIC_MSFT.

Dynamic spatial nodes track the pose of a physical object that moves continuously relative to reference spaces. The pose of dynamic spatial nodes can be very different within the duration of a rendering frame. It is important for the application to use the correct timestamp to query the space location using LocateSpace. For example, a color camera mounted in front of a HMD is also tracked by the HMD so a web camera library can use a dynamic node to represent the camera location. Dynamic spatial nodes are represented by SPATIAL_GRAPH_NODE_TYPE_DYNAMIC_MSFT.

See Also

XrSpatialGraphNodeSpaceCreateInfoMSFT, CreateSpatialGraphNodeSpaceMSFT

XR_SPATIAL_GRAPH_NODE_TYPE_STATIC_MSFTback to summary
public static final int XR_SPATIAL_GRAPH_NODE_TYPE_STATIC_MSFT

XrSpatialGraphNodeTypeMSFT - The type of spatial graph node.

Description

There are two types of spatial graph nodes: static and dynamic.

Static spatial nodes track the pose of a fixed location in the world relative to reference spaces. The tracking of static nodes may slowly adjust the pose over time for better accuracy but the pose is relatively stable in the short term, such as between rendering frames. For example, a QR code tracking library can use a static node to represent the location of the tracked QR code. Static spatial nodes are represented by SPATIAL_GRAPH_NODE_TYPE_STATIC_MSFT.

Dynamic spatial nodes track the pose of a physical object that moves continuously relative to reference spaces. The pose of dynamic spatial nodes can be very different within the duration of a rendering frame. It is important for the application to use the correct timestamp to query the space location using LocateSpace. For example, a color camera mounted in front of a HMD is also tracked by the HMD so a web camera library can use a dynamic node to represent the camera location. Dynamic spatial nodes are represented by SPATIAL_GRAPH_NODE_TYPE_DYNAMIC_MSFT.

See Also

XrSpatialGraphNodeSpaceCreateInfoMSFT, CreateSpatialGraphNodeSpaceMSFT

XR_TYPE_SPATIAL_GRAPH_NODE_BINDING_PROPERTIES_GET_INFO_MSFTback to summary
public static final int XR_TYPE_SPATIAL_GRAPH_NODE_BINDING_PROPERTIES_GET_INFO_MSFT

Extends XrStructureType.

Enum values:
XR_TYPE_SPATIAL_GRAPH_NODE_BINDING_PROPERTIES_MSFTback to summary
public static final int XR_TYPE_SPATIAL_GRAPH_NODE_BINDING_PROPERTIES_MSFT

Extends XrStructureType.

Enum values:
XR_TYPE_SPATIAL_GRAPH_NODE_SPACE_CREATE_INFO_MSFTback to summary
public static final int XR_TYPE_SPATIAL_GRAPH_NODE_SPACE_CREATE_INFO_MSFT

Extends XrStructureType.

Enum values:
XR_TYPE_SPATIAL_GRAPH_STATIC_NODE_BINDING_CREATE_INFO_MSFTback to summary
public static final int XR_TYPE_SPATIAL_GRAPH_STATIC_NODE_BINDING_CREATE_INFO_MSFT

Extends XrStructureType.

Enum values:

Constructor Detail

MSFTSpatialGraphBridgeback to summary
protected MSFTSpatialGraphBridge()

Method Detail

nxrCreateSpatialGraphNodeSpaceMSFTback to summary
public static int nxrCreateSpatialGraphNodeSpaceMSFT(XrSession session, long createInfo, long space)

Unsafe version of: CreateSpatialGraphNodeSpaceMSFT

nxrGetSpatialGraphNodeBindingPropertiesMSFTback to summary
public static int nxrGetSpatialGraphNodeBindingPropertiesMSFT(XrSpatialGraphNodeBindingMSFT nodeBinding, long getInfo, long properties)

Unsafe version of: GetSpatialGraphNodeBindingPropertiesMSFT

nxrTryCreateSpatialGraphStaticNodeBindingMSFTback to summary
public static int nxrTryCreateSpatialGraphStaticNodeBindingMSFT(XrSession session, long createInfo, long nodeBinding)

Unsafe version of: TryCreateSpatialGraphStaticNodeBindingMSFT

xrCreateSpatialGraphNodeSpaceMSFTback to summary
public static int xrCreateSpatialGraphNodeSpaceMSFT(XrSession session, XrSpatialGraphNodeSpaceCreateInfoMSFT createInfo, PointerBuffer space)

Create an XrSpace from a spatial graph node.

C Specification

The CreateSpatialGraphNodeSpaceMSFT function creates an XrSpace handle for a given spatial graph node type and ID.


XrResult xrCreateSpatialGraphNodeSpaceMSFT(
    XrSession                                   session,
    const XrSpatialGraphNodeSpaceCreateInfoMSFT* createInfo,
    XrSpace*                                    space);
Valid Usage (Implicit)
Return Codes
On success, this command returns
On failure, this command returns
See Also

XrSpatialGraphNodeSpaceCreateInfoMSFT

Parameters
session:XrSession

the XrSession which will use the created space.

createInfo:XrSpatialGraphNodeSpaceCreateInfoMSFT

an XrSpatialGraphNodeSpaceCreateInfoMSFT specifying the space to be created.

space:PointerBuffer

the returned XrSpace handle for the given spatial node ID.

Annotations
@NativeType:XrResult
xrDestroySpatialGraphNodeBindingMSFTback to summary
public static int xrDestroySpatialGraphNodeBindingMSFT(XrSpatialGraphNodeBindingMSFT nodeBinding)

Destroy a spatial graph node handle.

C Specification

The DestroySpatialGraphNodeBindingMSFT function releases the nodeBinding and the underlying resources.


XrResult xrDestroySpatialGraphNodeBindingMSFT(
    XrSpatialGraphNodeBindingMSFT               nodeBinding);
Valid Usage (Implicit)
Thread Safety
  • Access to nodeBinding, and any child handles, must be externally synchronized
Return Codes
On success, this command returns
On failure, this command returns
See Also

TryCreateSpatialGraphStaticNodeBindingMSFT

Parameters
nodeBinding:XrSpatialGraphNodeBindingMSFT

an XrSpatialGraphNodeBindingMSFT previously created by TryCreateSpatialGraphStaticNodeBindingMSFT.

Annotations
@NativeType:XrResult
xrGetSpatialGraphNodeBindingPropertiesMSFTback to summary
public static int xrGetSpatialGraphNodeBindingPropertiesMSFT(XrSpatialGraphNodeBindingMSFT nodeBinding, XrSpatialGraphNodeBindingPropertiesGetInfoMSFT getInfo, XrSpatialGraphNodeBindingPropertiesMSFT properties)

Destroy a spatial graph node handle.

C Specification

The GetSpatialGraphNodeBindingPropertiesMSFT function retrieves the spatial graph node GUID and the pose in the node space from an XrSpatialGraphNodeBindingMSFT handle.


XrResult xrGetSpatialGraphNodeBindingPropertiesMSFT(
    XrSpatialGraphNodeBindingMSFT               nodeBinding,
    const XrSpatialGraphNodeBindingPropertiesGetInfoMSFT* getInfo,
    XrSpatialGraphNodeBindingPropertiesMSFT*    properties);
Valid Usage (Implicit)
Return Codes
On success, this command returns
On failure, this command returns
See Also

XrSpatialGraphNodeBindingPropertiesGetInfoMSFT, XrSpatialGraphNodeBindingPropertiesMSFT, TryCreateSpatialGraphStaticNodeBindingMSFT

Parameters
nodeBinding:XrSpatialGraphNodeBindingMSFT

an XrSpatialGraphNodeBindingMSFT previously created by TryCreateSpatialGraphStaticNodeBindingMSFT.

getInfo:XrSpatialGraphNodeBindingPropertiesGetInfoMSFT

a pointer to an XrSpatialGraphNodeBindingPropertiesGetInfoMSFT input structure.

properties:XrSpatialGraphNodeBindingPropertiesMSFT

a pointer to an XrSpatialGraphNodeBindingPropertiesMSFT output structure.

Annotations
@NativeType:XrResult
xrTryCreateSpatialGraphStaticNodeBindingMSFTback to summary
public static int xrTryCreateSpatialGraphStaticNodeBindingMSFT(XrSession session, XrSpatialGraphStaticNodeBindingCreateInfoMSFT createInfo, PointerBuffer nodeBinding)

Try create spatial graph static node binding.

C Specification

The TryCreateSpatialGraphStaticNodeBindingMSFT function tries to create a binding to the best spatial graph static node relative to the given location and returns an XrSpatialGraphNodeBindingMSFT handle.


XrResult xrTryCreateSpatialGraphStaticNodeBindingMSFT(
    XrSession                                   session,
    const XrSpatialGraphStaticNodeBindingCreateInfoMSFT* createInfo,
    XrSpatialGraphNodeBindingMSFT*              nodeBinding);
Description

The runtime may return SUCCESS and set nodeBinding to NULL_HANDLE if it is unable to create a spatial graph static node binding. This may happen when the given XrSpace cannot be properly tracked at the moment. The application can retry creating the XrSpatialGraphNodeBindingMSFT handle again after a reasonable period of time when tracking is regained.

The TryCreateSpatialGraphStaticNodeBindingMSFT function may be a slow operation and therefore should be invoked from a non-timing critical thread.

Valid Usage (Implicit)
Return Codes
On success, this command returns
On failure, this command returns
See Also

XrSpatialGraphStaticNodeBindingCreateInfoMSFT, DestroySpatialGraphNodeBindingMSFT

Parameters
session:XrSession

the specified XrSession.

createInfo:XrSpatialGraphStaticNodeBindingCreateInfoMSFT

the XrSpatialGraphStaticNodeBindingCreateInfoMSFT input structure.

nodeBinding:PointerBuffer

the XrSpatialGraphNodeBindingMSFT output structure.

Annotations
@NativeType:XrResult