Class MSFTSpatialAnchor
- java.lang.Object
-
- org.lwjgl.openxr.MSFTSpatialAnchor
-
public class MSFTSpatialAnchor extends java.lang.ObjectThe MSFT_spatial_anchor extension.
-
-
Field Summary
Fields Modifier and Type Field Description static intXR_ERROR_CREATE_SPATIAL_ANCHOR_FAILED_MSFTExtendsXrResult.static java.lang.StringXR_MSFT_SPATIAL_ANCHOR_EXTENSION_NAMEThe extension name.static intXR_MSFT_spatial_anchor_SPEC_VERSIONThe extension specification version.static intXR_OBJECT_TYPE_SPATIAL_ANCHOR_MSFTExtendsXrObjectType.static intXR_TYPE_SPATIAL_ANCHOR_CREATE_INFO_MSFT
XR_TYPE_SPATIAL_ANCHOR_SPACE_CREATE_INFO_MSFTExtendsXrStructureType.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static intnxrCreateSpatialAnchorMSFT(XrSession session, long createInfo, long anchor)Unsafe version of:CreateSpatialAnchorMSFTstatic intnxrCreateSpatialAnchorSpaceMSFT(XrSession session, long createInfo, long space)Unsafe version of:CreateSpatialAnchorSpaceMSFTstatic intxrCreateSpatialAnchorMSFT(XrSession session, XrSpatialAnchorCreateInfoMSFT createInfo, org.lwjgl.PointerBuffer anchor)Creates a spatial anchor.static intxrCreateSpatialAnchorSpaceMSFT(XrSession session, XrSpatialAnchorSpaceCreateInfoMSFT createInfo, org.lwjgl.PointerBuffer space)Creates a space from a spatial anchor.static intxrDestroySpatialAnchorMSFT(XrSpatialAnchorMSFT anchor)Destroys a spatial anchor.
-
-
-
Field Detail
-
XR_MSFT_spatial_anchor_SPEC_VERSION
The extension specification version.
-
XR_MSFT_SPATIAL_ANCHOR_EXTENSION_NAME
The extension name.
-
XR_TYPE_SPATIAL_ANCHOR_CREATE_INFO_MSFT, XR_TYPE_SPATIAL_ANCHOR_SPACE_CREATE_INFO_MSFT
ExtendsXrStructureType.Enum values:
-
XR_OBJECT_TYPE_SPATIAL_ANCHOR_MSFT
ExtendsXrObjectType.
-
XR_ERROR_CREATE_SPATIAL_ANCHOR_FAILED_MSFT
ExtendsXrResult.
-
-
Method Detail
-
nxrCreateSpatialAnchorMSFT
public static int nxrCreateSpatialAnchorMSFT(XrSession session, long createInfo, long anchor)
Unsafe version of:CreateSpatialAnchorMSFT
-
xrCreateSpatialAnchorMSFT
public static int xrCreateSpatialAnchorMSFT(XrSession session, XrSpatialAnchorCreateInfoMSFT createInfo, org.lwjgl.PointerBuffer anchor)
Creates a spatial anchor.C Specification
The
CreateSpatialAnchorMSFTfunction is defined as:XrResult xrCreateSpatialAnchorMSFT( XrSession session, const XrSpatialAnchorCreateInfoMSFT* createInfo, XrSpatialAnchorMSFT* anchor);Description
Creates an
XrSpatialAnchorMSFThandle representing a spatial anchor that will track a fixed location in the physical world over time. That real-world location is specified by the position and orientation of the specifiedposewithinspaceattime.If
spacecannot be located relative to the environment at the moment of the call toCreateSpatialAnchorMSFT, the runtime must returnERROR_CREATE_SPATIAL_ANCHOR_FAILED_MSFT.After the anchor is created, the runtime should then adjust its position and orientation over time relative to other spaces so as to maintain maximum alignment to its original real-world location, even if that changes the anchor’s relationship to the original
spaceused to initialize it.Valid Usage (Implicit)
- The
XR_MSFT_spatial_anchorextension must be enabled prior to callingCreateSpatialAnchorMSFT sessionmust be a validXrSessionhandlecreateInfomust be a pointer to a validXrSpatialAnchorCreateInfoMSFTstructureanchormust be a pointer to anXrSpatialAnchorMSFThandle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- a handle to anXrSession.createInfo- a pointer to anXrSpatialAnchorCreateInfoMSFTstructure containing information about how to create the anchor.anchor- a pointer to a handle in which the createdXrSpatialAnchorMSFTis returned.
- The
-
nxrCreateSpatialAnchorSpaceMSFT
public static int nxrCreateSpatialAnchorSpaceMSFT(XrSession session, long createInfo, long space)
Unsafe version of:CreateSpatialAnchorSpaceMSFT
-
xrCreateSpatialAnchorSpaceMSFT
public static int xrCreateSpatialAnchorSpaceMSFT(XrSession session, XrSpatialAnchorSpaceCreateInfoMSFT createInfo, org.lwjgl.PointerBuffer space)
Creates a space from a spatial anchor.C Specification
The
CreateSpatialAnchorSpaceMSFTfunction is defined as:XrResult xrCreateSpatialAnchorSpaceMSFT( XrSession session, const XrSpatialAnchorSpaceCreateInfoMSFT* createInfo, XrSpace* space);Description
Creates an
XrSpacehandle based on a spatial anchor. Application can provide anXrPosefto define the position and orientation of the new space’s origin relative to the anchor’s natural origin.Multiple
XrSpacehandles may exist for a givenXrSpatialAnchorMSFTsimultaneously, up to some limit imposed by the runtime. TheXrSpacehandle must be eventually freed via theDestroySpacefunction or by destroying the parentXrSpatialAnchorMSFThandle.Valid Usage (Implicit)
- The
XR_MSFT_spatial_anchorextension must be enabled prior to callingCreateSpatialAnchorSpaceMSFT sessionmust be a validXrSessionhandlecreateInfomust be a pointer to a validXrSpatialAnchorSpaceCreateInfoMSFTstructurespacemust be a pointer to anXrSpacehandle
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
session- a handle to anXrSession.createInfo- a pointer to anXrSpatialAnchorSpaceCreateInfoMSFTstructure containing information about how to create the anchor.space- a pointer to a handle in which the createdXrSpaceis returned.
- The
-
xrDestroySpatialAnchorMSFT
public static int xrDestroySpatialAnchorMSFT(XrSpatialAnchorMSFT anchor)
Destroys a spatial anchor.C Specification
The
DestroySpatialAnchorMSFTfunction is defined as:XrResult xrDestroySpatialAnchorMSFT( XrSpatialAnchorMSFT anchor);Description
XrSpatialAnchorMSFThandles are destroyed usingDestroySpatialAnchorMSFT. By destroying an anchor, the runtime can stop spending resources used to maintain tracking for that anchor’s origin.Valid Usage (Implicit)
- The
XR_MSFT_spatial_anchorextension must be enabled prior to callingDestroySpatialAnchorMSFT anchormust be a validXrSpatialAnchorMSFThandle
Thread Safety
- Access to
anchor, and any child handles, must be externally synchronized
Return Codes
- On success, this command returns
- On failure, this command returns
See Also
- Parameters:
anchor- a handle to anXrSpatialAnchorMSFTpreviously created byCreateSpatialAnchorMSFT.
- The
-
-