Top Description Fields Constructors Methods
org.lwjgl.openxr

public Class VARJOMarkerTracking

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

The XR_VARJO_marker_tracking extension.

Varjo Markers are physical markers tracked by the video cameras of the HMD. Different types of markers can be used for different purposes. As an example, Varjo Markers can be used as cheap replacements for electronic trackers. The cost per printed tracker is significantly lower and the markers require no power to function.

This extension provides the tracking interface to a set of marker types and sizes. Markers can be printed out from the PDF documents and instructions freely available at https://developer.varjo.com/docs/get-started/varjo-markers#printing-varjo-markers. Note that the printed marker must have the exact physical size for its ID.

Object markers are used to track static or dynamic objects in the user environment. You may use object markers in both XR and VR applications. Each marker has a unique ID, and you must not use the same physical marker more than once in any given environment. For added precision, an application may use multiple markers to track a single object. For example, you could track a monitor by placing a marker in each corner.

There is a set of marker IDs recognized by runtime and if the application uses ID which is not in the set then runtime must return ERROR_MARKER_ID_INVALID_VARJO.

Field Summary

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

The extension specification version.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

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

Unsafe version of: CreateMarkerSpaceVARJO

public static int
nxrGetMarkerSizeVARJO(XrSession session, long markerId, long size)

Unsafe version of: GetMarkerSizeVARJO

public static int
xrCreateMarkerSpaceVARJO(XrSession
an XrSession handle previously created with CreateSession.
session
,
XrMarkerSpaceCreateInfoVARJO
the structure containing information about how to create the space based on marker.
createInfo
,
PointerBuffer
a pointer to a handle in which the created XrSpace is returned.
space
)

Creates marker space.

public static int
xrGetMarkerSizeVARJO(XrSession
an XrSession handle previously created with CreateSession.
session
,
long
the unique identifier of the marker for which size is requested.
markerId
,
XrExtent2Df
pointer to the size to populate by the runtime with the physical size of plane marker in meters.
size
)

Gets physical size of marker.

public static int
xrSetMarkerTrackingPredictionVARJO(XrSession
an XrSession handle previously created with CreateSession.
session
,
long
the unique identifier of the marker which should be tracked with prediction.
markerId
,
boolean enabled)

Sets marker tracking with prediction.

public static int
xrSetMarkerTrackingTimeoutVARJO(XrSession
an XrSession handle previously created with CreateSession.
session
,
long
the unique identifier of the marker for which the timeout will be updated.
markerId
,
long
the desired lifetime duration for a specified marker.
timeout
)

Sets marker lifetime duration.

public static int
xrSetMarkerTrackingVARJO(XrSession
an XrSession handle previously created with CreateSession.
session
,
boolean
the flag to enable or disable marker tracking.
enabled
)

Enables marker tracking.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

XR_ERROR_MARKER_ID_INVALID_VARJOback to summary
public static final int XR_ERROR_MARKER_ID_INVALID_VARJO

Extends XrResult.

Enum values:
XR_ERROR_MARKER_NOT_TRACKED_VARJOback to summary
public static final int XR_ERROR_MARKER_NOT_TRACKED_VARJO

Extends XrResult.

Enum values:
XR_TYPE_EVENT_DATA_MARKER_TRACKING_UPDATE_VARJOback to summary
public static final int XR_TYPE_EVENT_DATA_MARKER_TRACKING_UPDATE_VARJO

Extends XrStructureType.

Enum values:
XR_TYPE_MARKER_SPACE_CREATE_INFO_VARJOback to summary
public static final int XR_TYPE_MARKER_SPACE_CREATE_INFO_VARJO

Extends XrStructureType.

Enum values:
XR_TYPE_SYSTEM_MARKER_TRACKING_PROPERTIES_VARJOback to summary
public static final int XR_TYPE_SYSTEM_MARKER_TRACKING_PROPERTIES_VARJO

Extends XrStructureType.

Enum values:
XR_VARJO_MARKER_TRACKING_EXTENSION_NAMEback to summary
public static final String XR_VARJO_MARKER_TRACKING_EXTENSION_NAME

The extension name.

XR_VARJO_marker_tracking_SPEC_VERSIONback to summary
public static final int XR_VARJO_marker_tracking_SPEC_VERSION

The extension specification version.

Constructor Detail

VARJOMarkerTrackingback to summary
protected VARJOMarkerTracking()

Method Detail

nxrCreateMarkerSpaceVARJOback to summary
public static int nxrCreateMarkerSpaceVARJO(XrSession session, long createInfo, long space)

Unsafe version of: CreateMarkerSpaceVARJO

nxrGetMarkerSizeVARJOback to summary
public static int nxrGetMarkerSizeVARJO(XrSession session, long markerId, long size)

Unsafe version of: GetMarkerSizeVARJO

xrCreateMarkerSpaceVARJOback to summary
public static int xrCreateMarkerSpaceVARJO(XrSession session, XrMarkerSpaceCreateInfoVARJO createInfo, PointerBuffer space)

Creates marker space.

C Specification

The CreateMarkerSpaceVARJO function is defined as:


XrResult xrCreateMarkerSpaceVARJO(
    XrSession                                   session,
    const XrMarkerSpaceCreateInfoVARJO*         createInfo,
    XrSpace*                                    space);
Description

The CreateMarkerSpaceVARJO function creates marker XrSpace for pose relative to the marker specified in XrMarkerSpaceCreateInfoVARJO. The runtime must return ERROR_MARKER_ID_INVALID_VARJO if the supplied markerId is invalid.

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

XrMarkerSpaceCreateInfoVARJO

Parameters
session:XrSession

an XrSession handle previously created with CreateSession.

createInfo:XrMarkerSpaceCreateInfoVARJO

the structure containing information about how to create the space based on marker.

space:PointerBuffer

a pointer to a handle in which the created XrSpace is returned.

Annotations
@NativeType:XrResult
xrGetMarkerSizeVARJOback to summary
public static int xrGetMarkerSizeVARJO(XrSession session, long markerId, XrExtent2Df size)

Gets physical size of marker.

C Specification

The GetMarkerSizeVARJO function is defined as:


XrResult xrGetMarkerSizeVARJO(
    XrSession                                   session,
    uint64_t                                    markerId,
    XrExtent2Df*                                size);
Description

The GetMarkerSizeVARJO function retrieves the height and width of an active marker. The runtime must return ERROR_MARKER_NOT_TRACKED_VARJO if marker tracking functionality is disabled or the marker with given markerId is inactive. The runtime must return ERROR_MARKER_ID_INVALID_VARJO if the supplied markerId is invalid.

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

XrExtent2Df

Parameters
session:XrSession

an XrSession handle previously created with CreateSession.

markerId:long

the unique identifier of the marker for which size is requested.

size:XrExtent2Df

pointer to the size to populate by the runtime with the physical size of plane marker in meters.

Annotations
@NativeType:XrResult
xrSetMarkerTrackingPredictionVARJOback to summary
public static int xrSetMarkerTrackingPredictionVARJO(XrSession session, long markerId, boolean enabled)

Sets marker tracking with prediction.

C Specification

The SetMarkerTrackingPredictionVARJO function is defined as:


XrResult xrSetMarkerTrackingPredictionVARJO(
    XrSession                                   session,
    uint64_t                                    markerId,
    XrBool32                                    enabled);
Description

The SetMarkerTrackingPredictionVARJO function enables or disables the prediction feature for a specified marker. By default, markers are created with disabled prediction. This works well for markers that are supposed to be stationary. The prediction can be used to improve tracking of movable markers. The runtime must return ERROR_MARKER_ID_INVALID_VARJO if the supplied markerId is invalid.

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

an XrSession handle previously created with CreateSession.

markerId:long

the unique identifier of the marker which should be tracked with prediction.

Annotations
@NativeType:XrResult
xrSetMarkerTrackingTimeoutVARJOback to summary
public static int xrSetMarkerTrackingTimeoutVARJO(XrSession session, long markerId, long timeout)

Sets marker lifetime duration.

C Specification

The SetMarkerTrackingTimeoutVARJO function is defined as:


XrResult xrSetMarkerTrackingTimeoutVARJO(
    XrSession                                   session,
    uint64_t                                    markerId,
    XrDuration                                  timeout);
Description

The SetMarkerTrackingTimeoutVARJO function sets a desired lifetime duration for a specified marker. The default value is NO_DURATION. Negative value will be clamped to NO_DURATION. It defines the time period during which the runtime must keep returning poses of previously tracked markers. The tracking may be lost if the marker went outside of the trackable field of view. In this case the runtime still will try to predict marker’s pose for the timeout period. The runtime must return ERROR_MARKER_ID_INVALID_VARJO if the supplied markerId is invalid.

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

an XrSession handle previously created with CreateSession.

markerId:long

the unique identifier of the marker for which the timeout will be updated.

timeout:long

the desired lifetime duration for a specified marker.

Annotations
@NativeType:XrResult
xrSetMarkerTrackingVARJOback to summary
public static int xrSetMarkerTrackingVARJO(XrSession session, boolean enabled)

Enables marker tracking.

C Specification

The SetMarkerTrackingVARJO function is defined as:


XrResult  xrSetMarkerTrackingVARJO(
    XrSession                                   session,
    XrBool32                                    enabled);
Description

The SetMarkerTrackingVARJO function enables or disables marker tracking functionality. As soon as feature is become disabled all trackable markers become inactive and corresponding events will be generated. An application may call any of the functions in this extension regardless if the marker tracking functionality is enabled or disabled.

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

an XrSession handle previously created with CreateSession.

enabled:boolean

the flag to enable or disable marker tracking.

Annotations
@NativeType:XrResult