Class ViveEyeTracker
Inherited Members
Namespace: VIVE.OpenXR.EyeTracker
Assembly: VIVE.OpenXR.dll
Syntax
public class ViveEyeTracker : 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.eye.tracker"
Field Value
Type | Description |
---|---|
string |
kOpenxrExtensionString
Declaration
public const string kOpenxrExtensionString = "XR_HTC_eye_tracker"
Field Value
Type | Description |
---|---|
string |
Methods
CreateEyeTracker()
An application can create an XrEyeTrackerHTC handle using CreateEyeTracker.
Declaration
public bool CreateEyeTracker()
Returns
Type | Description |
---|---|
bool | True for success. |
CreateEyeTracker(XrEyeTrackerCreateInfoHTC, out XrEyeTrackerHTC)
An application can create an XrEyeTrackerHTC handle using CreateEyeTracker.
Declaration
public XrResult CreateEyeTracker(XrEyeTrackerCreateInfoHTC createInfo, out XrEyeTrackerHTC eyeTracker)
Parameters
Type | Name | Description |
---|---|---|
XrEyeTrackerCreateInfoHTC | createInfo | The XrEyeTrackerCreateInfoHTC used to specify the eye tracker. |
XrEyeTrackerHTC | eyeTracker | The returned XrEyeTrackerHTC handle. |
Returns
Type | Description |
---|---|
XrResult | XR_SUCCESS for success. |
DestroyEyeTracker()
Releases the eye tracker and the underlying resources when the eye tracking experience is over.
Declaration
public bool DestroyEyeTracker()
Returns
Type | Description |
---|---|
bool | True for success. |
DestroyEyeTracker(XrEyeTrackerHTC)
Releases the eye tracker and the underlying resources when the eye tracking experience is over.
Declaration
public XrResult DestroyEyeTracker(XrEyeTrackerHTC eyeTracker)
Parameters
Type | Name | Description |
---|---|---|
XrEyeTrackerHTC | eyeTracker | An XrEyeTrackerHTC previously created by xrCreateEyeTrackerHTC. |
Returns
Type | Description |
---|---|
XrResult | XR_SUCCESS for success. |
GetEyeGazeData(XrEyeTrackerHTC, XrEyeGazeDataInfoHTC, out XrEyeGazeDataHTC)
Retrieves the XrEyeGazeDataHTC data of a XrEyeTrackerHTC.
Declaration
public XrResult GetEyeGazeData(XrEyeTrackerHTC eyeTracker, XrEyeGazeDataInfoHTC gazeInfo, out XrEyeGazeDataHTC eyeGazes)
Parameters
Type | Name | Description |
---|---|---|
XrEyeTrackerHTC | eyeTracker | An XrEyeTrackerHTC previously created by xrCreateEyeTrackerHTC. |
XrEyeGazeDataInfoHTC | gazeInfo | The information to get eye gaze. |
XrEyeGazeDataHTC | eyeGazes | Output parameter to retrieve a pointer to XrEyeGazeDataHTC receiving the returned eye poses. |
Returns
Type | Description |
---|---|
XrResult | XR_SUCCESS for success. |
GetEyeGazeData(out XrSingleEyeGazeDataHTC[])
Retrieves an array of XrSingleEyeGazeDataHTC containing the returned eye gaze directions.
Declaration
public bool GetEyeGazeData(out XrSingleEyeGazeDataHTC[] out_gazes)
Parameters
Type | Name | Description |
---|---|---|
XrSingleEyeGazeDataHTC[] | out_gazes | Output parameter to retrieve an array of XrSingleEyeGazeDataHTC. |
Returns
Type | Description |
---|---|
bool | True for success. |
GetEyeGeometricData(XrEyeTrackerHTC, XrEyeGeometricDataInfoHTC, out XrEyeGeometricDataHTC)
Declaration
public XrResult GetEyeGeometricData(XrEyeTrackerHTC eyeTracker, XrEyeGeometricDataInfoHTC eyeGeometricDataInfo, out XrEyeGeometricDataHTC eyeGeometricData)
Parameters
Type | Name | Description |
---|---|---|
XrEyeTrackerHTC | eyeTracker | An XrEyeTrackerHTC previously created by xrCreateEyeTrackerHTC. |
XrEyeGeometricDataInfoHTC | eyeGeometricDataInfo | A pointer to XrEyeGeometricDataInfoHTC structure. |
XrEyeGeometricDataHTC | eyeGeometricData | A pointer to XrEyeGeometricDataHTC returned by the runtime. |
Returns
Type | Description |
---|---|
XrResult | XR_SUCCESS for success. |
GetEyeGeometricData(out XrSingleEyeGeometricDataHTC[])
Declaration
public bool GetEyeGeometricData(out XrSingleEyeGeometricDataHTC[] geometricData)
Parameters
Type | Name | Description |
---|---|---|
XrSingleEyeGeometricDataHTC[] | geometricData | Output parameter to retrieve an array of XrSingleEyeGeometricDataHTC. |
Returns
Type | Description |
---|---|
bool | XR_SUCCESS for success. |
GetEyePupilData(XrEyeTrackerHTC, XrEyePupilDataInfoHTC, out XrEyePupilDataHTC)
Retrieves the XrEyePupilDataHTC data of a XrEyeTrackerHTC.
Declaration
public XrResult GetEyePupilData(XrEyeTrackerHTC eyeTracker, XrEyePupilDataInfoHTC pupilDataInfo, out XrEyePupilDataHTC pupilData)
Parameters
Type | Name | Description |
---|---|---|
XrEyeTrackerHTC | eyeTracker | An XrEyeTrackerHTC previously created by xrCreateEyeTrackerHTC. |
XrEyePupilDataInfoHTC | pupilDataInfo | The information to get pupil data. |
XrEyePupilDataHTC | pupilData | A pointer to XrEyePupilDataHTC returned by the runtime. |
Returns
Type | Description |
---|---|
XrResult | XR_SUCCESS for success. |
GetEyePupilData(out XrSingleEyePupilDataHTC[])
Retrieves an array of XrSingleEyePupilDataHTC containing the returned data for user's pupils.
Declaration
public bool GetEyePupilData(out XrSingleEyePupilDataHTC[] pupilData)
Parameters
Type | Name | Description |
---|---|---|
XrSingleEyePupilDataHTC[] | pupilData | Output parameter to retrieve an array of XrSingleEyePupilDataHTC. |
Returns
Type | Description |
---|---|
bool | XR_SUCCESS for success. |
HookGetInstanceProcAddr(IntPtr)
Declaration
protected override IntPtr HookGetInstanceProcAddr(IntPtr func)
Parameters
Type | Name | Description |
---|---|---|
IntPtr | func |
Returns
Type | Description |
---|---|
IntPtr |
Overrides
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. |