Class ViveHandTracking
Inherited Members
Namespace: VIVE.OpenXR.Hand
Assembly: VIVE.OpenXR.dll
Syntax
public class ViveHandTracking : OpenXRFeature
Fields
featureId
The feature id string. This is used to give the feature a well known id for reference.
Declaration
public const string featureId = "vive.openxr.feature.hand.tracking"
Field Value
Type | Description |
---|---|
string |
kOpenxrExtensionString
OpenXR specification 12.29 XR_EXT_hand_tracking.
Declaration
public const string kOpenxrExtensionString = "XR_EXT_hand_tracking"
Field Value
Type | Description |
---|---|
string |
Methods
CreateHandTrackerEXT(ref XrHandTrackerCreateInfoEXT, out XrHandTrackerEXT)
An application can create an XrHandTrackerEXT handle using CreateHandTrackerEXT function.
Declaration
public XrResult CreateHandTrackerEXT(ref XrHandTrackerCreateInfoEXT createInfo, out XrHandTrackerEXT handTracker)
Parameters
Type | Name | Description |
---|---|---|
XrHandTrackerCreateInfoEXT | createInfo | The XrHandTrackerCreateInfoEXT used to specify the hand tracker. |
XrHandTrackerEXT | handTracker | The returned XrHandTrackerEXT handle. |
Returns
Type | Description |
---|---|
XrResult | XR_SUCCESS for success. |
DestroyHandTrackerEXT(XrHandTrackerEXT)
Releases the handTracker and the underlying resources when finished with hand tracking experiences.
Declaration
public XrResult DestroyHandTrackerEXT(XrHandTrackerEXT handTracker)
Parameters
Type | Name | Description |
---|---|---|
XrHandTrackerEXT | handTracker | An XrHandTrackerEXT previously created by CreateHandTrackerEXT. |
Returns
Type | Description |
---|---|
XrResult | XR_SUCCESS for success. |
GetHandTrackingSpace(out XrSpace)
Declaration
public bool GetHandTrackingSpace(out XrSpace space)
Parameters
Type | Name | Description |
---|---|---|
XrSpace | space |
Returns
Type | Description |
---|---|
bool |
GetJointLocations(bool, out XrHandJointLocationEXT[])
Retrieves the XrHandJointLocationEXT data.
Declaration
public bool GetJointLocations(bool isLeft, out XrHandJointLocationEXT[] handJointLocation)
Parameters
Type | Name | Description |
---|---|---|
bool | isLeft | Left or right hand. |
XrHandJointLocationEXT[] | handJointLocation | Output parameter to retrieve XrHandJointLocationEXT data. |
Returns
Type | Description |
---|---|
bool | True for valid data. |
GetTrackingOriginMode()
Retrieves the current tracking origin in Unity XR.
Declaration
public TrackingOriginModeFlags GetTrackingOriginMode()
Returns
Type | Description |
---|---|
TrackingOriginModeFlags | The tracking origin in TrackingOriginModeFlags |
HookGetInstanceProcAddr(IntPtr)
Declaration
protected override IntPtr HookGetInstanceProcAddr(IntPtr func)
Parameters
Type | Name | Description |
---|---|---|
IntPtr | func |
Returns
Type | Description |
---|---|
IntPtr |
Overrides
LocateHandJointsEXT(XrHandTrackerEXT, XrHandJointsLocateInfoEXT, ref XrHandJointLocationsEXT)
The LocateHandJointsEXT function locates an array of hand joints to a base space at given time.
Declaration
public XrResult LocateHandJointsEXT(XrHandTrackerEXT handTracker, XrHandJointsLocateInfoEXT locateInfo, ref XrHandJointLocationsEXT locations)
Parameters
Type | Name | Description |
---|---|---|
XrHandTrackerEXT | handTracker | An XrHandTrackerEXT previously created by CreateHandTrackerEXT. |
XrHandJointsLocateInfoEXT | locateInfo | A pointer to XrHandJointsLocateInfoEXT describing information to locate hand joints. |
XrHandJointLocationsEXT | locations | A pointer to XrHandJointLocationsEXT receiving the returned hand joint locations. |
Returns
Type | Description |
---|---|
XrResult |
OnInstanceCreate(ulong)
Called when xrCreateInstance is done.
Declaration
protected override bool OnInstanceCreate(ulong xrInstance)
Parameters
Type | Name | Description |
---|---|---|
ulong | xrInstance | The created instance. |
Returns
Type | Description |
---|---|
bool | True for valid XrInstance |
Overrides
OnInstanceDestroy(ulong)
Called when xrDestroyInstance is done.
Declaration
protected override void OnInstanceDestroy(ulong xrInstance)
Parameters
Type | Name | Description |
---|---|---|
ulong | xrInstance | The instance to destroy. |
Overrides
OnSessionCreate(ulong)
Called when xrCreateSession is done.
Declaration
protected override void OnSessionCreate(ulong xrSession)
Parameters
Type | Name | Description |
---|---|---|
ulong | xrSession | The created session ID. |
Overrides
OnSessionDestroy(ulong)
Called when xrDestroySession is done.
Declaration
protected override void OnSessionDestroy(ulong xrSession)
Parameters
Type | Name | Description |
---|---|---|
ulong | xrSession | The session ID to destroy. |
Overrides
OnSystemChange(ulong)
Called when the XrSystemId retrieved by xrGetSystem is changed.
Declaration
protected override void OnSystemChange(ulong xrSystem)
Parameters
Type | Name | Description |
---|---|---|
ulong | xrSystem | The system id. |