Class MSFTSpatialGraphBridge
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
FieldsModifier and TypeFieldDescriptionstatic final intXR_GUID_SIZE_MSFTstatic final StringThe extension name.static final intThe extension specification version.static final intExtendsXrObjectType.static final intXrSpatialGraphNodeTypeMSFT - The type of spatial graph node.static final intXrSpatialGraphNodeTypeMSFT - The type of spatial graph node.static final intExtendsXrStructureType.static final intExtendsXrStructureType.static final intExtendsXrStructureType.static final intExtendsXrStructureType. -
Method Summary
Modifier and TypeMethodDescriptionstatic intnxrCreateSpatialGraphNodeSpaceMSFT(XrSession session, long createInfo, long space) Unsafe version of:CreateSpatialGraphNodeSpaceMSFTstatic intnxrGetSpatialGraphNodeBindingPropertiesMSFT(XrSpatialGraphNodeBindingMSFT nodeBinding, long getInfo, long properties) Unsafe version of:GetSpatialGraphNodeBindingPropertiesMSFTstatic intnxrTryCreateSpatialGraphStaticNodeBindingMSFT(XrSession session, long createInfo, long nodeBinding) Unsafe version of:TryCreateSpatialGraphStaticNodeBindingMSFTstatic intxrCreateSpatialGraphNodeSpaceMSFT(XrSession session, XrSpatialGraphNodeSpaceCreateInfoMSFT createInfo, org.lwjgl.PointerBuffer space) Create anXrSpacefrom a spatial graph node.static intDestroy a spatial graph node handle.static intxrGetSpatialGraphNodeBindingPropertiesMSFT(XrSpatialGraphNodeBindingMSFT nodeBinding, @Nullable XrSpatialGraphNodeBindingPropertiesGetInfoMSFT getInfo, XrSpatialGraphNodeBindingPropertiesMSFT properties) Destroy a spatial graph node handle.static intxrTryCreateSpatialGraphStaticNodeBindingMSFT(XrSession session, XrSpatialGraphStaticNodeBindingCreateInfoMSFT createInfo, org.lwjgl.PointerBuffer nodeBinding) Try create spatial graph static node binding.
-
Field Details
-
XR_MSFT_spatial_graph_bridge_SPEC_VERSION
public static final int XR_MSFT_spatial_graph_bridge_SPEC_VERSIONThe extension specification version.- See Also:
-
XR_MSFT_SPATIAL_GRAPH_BRIDGE_EXTENSION_NAME
The extension name.- See Also:
-
XR_GUID_SIZE_MSFT
public static final int XR_GUID_SIZE_MSFTXR_GUID_SIZE_MSFT- See Also:
-
XR_OBJECT_TYPE_SPATIAL_GRAPH_NODE_BINDING_MSFT
public static final int XR_OBJECT_TYPE_SPATIAL_GRAPH_NODE_BINDING_MSFTExtendsXrObjectType.- See Also:
-
XR_TYPE_SPATIAL_GRAPH_NODE_SPACE_CREATE_INFO_MSFT
public static final int XR_TYPE_SPATIAL_GRAPH_NODE_SPACE_CREATE_INFO_MSFTExtendsXrStructureType.Enum values:
- See Also:
-
XR_TYPE_SPATIAL_GRAPH_STATIC_NODE_BINDING_CREATE_INFO_MSFT
public static final int XR_TYPE_SPATIAL_GRAPH_STATIC_NODE_BINDING_CREATE_INFO_MSFTExtendsXrStructureType.Enum values:
- See Also:
-
XR_TYPE_SPATIAL_GRAPH_NODE_BINDING_PROPERTIES_GET_INFO_MSFT
public static final int XR_TYPE_SPATIAL_GRAPH_NODE_BINDING_PROPERTIES_GET_INFO_MSFTExtendsXrStructureType.Enum values:
- See Also:
-
XR_TYPE_SPATIAL_GRAPH_NODE_BINDING_PROPERTIES_MSFT
public static final int XR_TYPE_SPATIAL_GRAPH_NODE_BINDING_PROPERTIES_MSFTExtendsXrStructureType.Enum values:
- See Also:
-
XR_SPATIAL_GRAPH_NODE_TYPE_STATIC_MSFT
public static final int XR_SPATIAL_GRAPH_NODE_TYPE_STATIC_MSFTXrSpatialGraphNodeTypeMSFT - 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 bySPATIAL_GRAPH_NODE_TYPE_DYNAMIC_MSFT.See Also
XrSpatialGraphNodeSpaceCreateInfoMSFT,CreateSpatialGraphNodeSpaceMSFT- See Also:
-
XR_SPATIAL_GRAPH_NODE_TYPE_DYNAMIC_MSFT
public static final int XR_SPATIAL_GRAPH_NODE_TYPE_DYNAMIC_MSFTXrSpatialGraphNodeTypeMSFT - 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 bySPATIAL_GRAPH_NODE_TYPE_DYNAMIC_MSFT.See Also
XrSpatialGraphNodeSpaceCreateInfoMSFT,CreateSpatialGraphNodeSpaceMSFT- See Also:
-
-
Method Details
-
nxrCreateSpatialGraphNodeSpaceMSFT
public static int nxrCreateSpatialGraphNodeSpaceMSFT(XrSession session, long createInfo, long space) Unsafe version of:CreateSpatialGraphNodeSpaceMSFT -
xrCreateSpatialGraphNodeSpaceMSFT
public static int xrCreateSpatialGraphNodeSpaceMSFT(XrSession session, XrSpatialGraphNodeSpaceCreateInfoMSFT createInfo, org.lwjgl.PointerBuffer space) Create anXrSpacefrom a spatial graph node.C Specification
The
CreateSpatialGraphNodeSpaceMSFTfunction creates anXrSpacehandle for a given spatial graph node type and ID.XrResult xrCreateSpatialGraphNodeSpaceMSFT( XrSession session, const XrSpatialGraphNodeSpaceCreateInfoMSFT* createInfo, XrSpace* space);Valid Usage (Implicit)
- The
XR_MSFT_spatial_graph_bridgeextension must be enabled prior to callingCreateSpatialGraphNodeSpaceMSFT sessionmust be a validXrSessionhandlecreateInfomust be a pointer to a validXrSpatialGraphNodeSpaceCreateInfoMSFTstructurespacemust be a pointer to anXrSpacehandle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- theXrSessionwhich will use the created space.createInfo- anXrSpatialGraphNodeSpaceCreateInfoMSFTspecifying the space to be created.space- the returnedXrSpacehandle for the given spatial node ID.
- The
-
nxrTryCreateSpatialGraphStaticNodeBindingMSFT
public static int nxrTryCreateSpatialGraphStaticNodeBindingMSFT(XrSession session, long createInfo, long nodeBinding) Unsafe version of:TryCreateSpatialGraphStaticNodeBindingMSFT -
xrTryCreateSpatialGraphStaticNodeBindingMSFT
public static int xrTryCreateSpatialGraphStaticNodeBindingMSFT(XrSession session, XrSpatialGraphStaticNodeBindingCreateInfoMSFT createInfo, org.lwjgl.PointerBuffer nodeBinding) Try create spatial graph static node binding.C Specification
The
TryCreateSpatialGraphStaticNodeBindingMSFTfunction tries to create a binding to the best spatial graph static node relative to the given location and returns anXrSpatialGraphNodeBindingMSFThandle.XrResult xrTryCreateSpatialGraphStaticNodeBindingMSFT( XrSession session, const XrSpatialGraphStaticNodeBindingCreateInfoMSFT* createInfo, XrSpatialGraphNodeBindingMSFT* nodeBinding);Description
The runtime may return
SUCCESSand setnodeBindingtoNULL_HANDLEif it is unable to create a spatial graph static node binding. This may happen when the givenXrSpacecannot be properly tracked at the moment. The application can retry creating theXrSpatialGraphNodeBindingMSFThandle again after a reasonable period of time when tracking is regained.The
TryCreateSpatialGraphStaticNodeBindingMSFTfunction may be a slow operation and therefore should be invoked from a non-timing critical thread.Valid Usage (Implicit)
- The
XR_MSFT_spatial_graph_bridgeextension must be enabled prior to callingTryCreateSpatialGraphStaticNodeBindingMSFT sessionmust be a validXrSessionhandlecreateInfomust be a pointer to a validXrSpatialGraphStaticNodeBindingCreateInfoMSFTstructurenodeBindingmust be a pointer to anXrSpatialGraphNodeBindingMSFThandle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
XrSpatialGraphStaticNodeBindingCreateInfoMSFT,DestroySpatialGraphNodeBindingMSFT- Parameters:
session- the specifiedXrSession.createInfo- theXrSpatialGraphStaticNodeBindingCreateInfoMSFTinput structure.nodeBinding- theXrSpatialGraphNodeBindingMSFToutput structure.
- The
-
xrDestroySpatialGraphNodeBindingMSFT
Destroy a spatial graph node handle.C Specification
The
DestroySpatialGraphNodeBindingMSFTfunction releases thenodeBindingand the underlying resources.XrResult xrDestroySpatialGraphNodeBindingMSFT( XrSpatialGraphNodeBindingMSFT nodeBinding);Valid Usage (Implicit)
- The
XR_MSFT_spatial_graph_bridgeextension must be enabled prior to callingDestroySpatialGraphNodeBindingMSFT nodeBindingmust be a validXrSpatialGraphNodeBindingMSFThandle
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
- Parameters:
nodeBinding- anXrSpatialGraphNodeBindingMSFTpreviously created byTryCreateSpatialGraphStaticNodeBindingMSFT.
- The
-
nxrGetSpatialGraphNodeBindingPropertiesMSFT
public static int nxrGetSpatialGraphNodeBindingPropertiesMSFT(XrSpatialGraphNodeBindingMSFT nodeBinding, long getInfo, long properties) Unsafe version of:GetSpatialGraphNodeBindingPropertiesMSFT -
xrGetSpatialGraphNodeBindingPropertiesMSFT
public static int xrGetSpatialGraphNodeBindingPropertiesMSFT(XrSpatialGraphNodeBindingMSFT nodeBinding, @Nullable XrSpatialGraphNodeBindingPropertiesGetInfoMSFT getInfo, XrSpatialGraphNodeBindingPropertiesMSFT properties) Destroy a spatial graph node handle.C Specification
The
GetSpatialGraphNodeBindingPropertiesMSFTfunction retrieves the spatial graph node GUID and the pose in the node space from anXrSpatialGraphNodeBindingMSFThandle.XrResult xrGetSpatialGraphNodeBindingPropertiesMSFT( XrSpatialGraphNodeBindingMSFT nodeBinding, const XrSpatialGraphNodeBindingPropertiesGetInfoMSFT* getInfo, XrSpatialGraphNodeBindingPropertiesMSFT* properties);Valid Usage (Implicit)
- The
XR_MSFT_spatial_graph_bridgeextension must be enabled prior to callingGetSpatialGraphNodeBindingPropertiesMSFT nodeBindingmust be a validXrSpatialGraphNodeBindingMSFThandle- If
getInfois notNULL,getInfomust be a pointer to a validXrSpatialGraphNodeBindingPropertiesGetInfoMSFTstructure propertiesmust be a pointer to anXrSpatialGraphNodeBindingPropertiesMSFTstructure
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
XrSpatialGraphNodeBindingPropertiesGetInfoMSFT,XrSpatialGraphNodeBindingPropertiesMSFT,TryCreateSpatialGraphStaticNodeBindingMSFT- Parameters:
nodeBinding- anXrSpatialGraphNodeBindingMSFTpreviously created byTryCreateSpatialGraphStaticNodeBindingMSFT.getInfo- a pointer to anXrSpatialGraphNodeBindingPropertiesGetInfoMSFTinput structure.properties- a pointer to anXrSpatialGraphNodeBindingPropertiesMSFToutput structure.
- The
-