Class OpenXRHelper
Assembly: VIVE.OpenXR.dll
Syntax
public static class OpenXRHelper
Fields
XR_INFINITE_DURATION
A special value that may be used to indicate that the timeout never occurs.
Declaration
public static XrDuration XR_INFINITE_DURATION
Field Value
XR_MIN_COMPOSITION_LAYERS_SUPPORTED
Defines the minimum number of composition layers that a conformant runtime must support.
Declaration
public static uint XR_MIN_COMPOSITION_LAYERS_SUPPORTED
Field Value
XR_NO_DURATION
For the case of timeout durations, XR_NO_DURATION may be used to indicate that the timeout is immediate.
Declaration
public static XrDuration XR_NO_DURATION
Field Value
XR_NULL_PATH
The only XrPath value defined to be constant across all instances is the invalid path XR_NULL_PATH. No well-formed path string is associated with XR_NULL_PATH. Unless explicitly permitted, it should not be passed to API calls or used as a structure attribute when a valid XrPath is required.
Declaration
public static ulong XR_NULL_PATH
Field Value
XR_NULL_SYSTEM_ID
XrSystemId value 0 indicates an invalid system.
Declaration
public static ulong XR_NULL_SYSTEM_ID
Field Value
XR_SPACE_VELOCITY_ANGULAR_VALID_BIT
Indicates the angular velocity is valid.
Declaration
public static XrSpaceVelocityFlags XR_SPACE_VELOCITY_ANGULAR_VALID_BIT
Field Value
XR_SPACE_VELOCITY_LINEAR_VALID_BIT
Indicates the linear velocity is valid.
Declaration
public static XrSpaceVelocityFlags XR_SPACE_VELOCITY_LINEAR_VALID_BIT
Field Value
XR_SWAPCHAIN_CREATE_PROTECTED_CONTENT_BIT
Declaration
public static XrSwapchainCreateFlags XR_SWAPCHAIN_CREATE_PROTECTED_CONTENT_BIT
Field Value
XR_SWAPCHAIN_CREATE_STATIC_IMAGE_BIT
Declaration
public static XrSwapchainCreateFlags XR_SWAPCHAIN_CREATE_STATIC_IMAGE_BIT
Field Value
XR_SWAPCHAIN_USAGE_COLOR_ATTACHMENT_BIT
Declaration
public static XrSwapchainUsageFlags XR_SWAPCHAIN_USAGE_COLOR_ATTACHMENT_BIT
Field Value
XR_SWAPCHAIN_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
Declaration
public static XrSwapchainUsageFlags XR_SWAPCHAIN_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT
Field Value
Declaration
public static XrSwapchainUsageFlags XR_SWAPCHAIN_USAGE_INPUT_ATTACHMENT_BIT_KHR
Field Value
Declaration
public static XrSwapchainUsageFlags XR_SWAPCHAIN_USAGE_INPUT_ATTACHMENT_BIT_MND
Field Value
Declaration
public static XrSwapchainUsageFlags XR_SWAPCHAIN_USAGE_MUTABLE_FORMAT_BIT
Field Value
XR_SWAPCHAIN_USAGE_SAMPLED_BIT
Declaration
public static XrSwapchainUsageFlags XR_SWAPCHAIN_USAGE_SAMPLED_BIT
Field Value
XR_SWAPCHAIN_USAGE_TRANSFER_DST_BIT
Declaration
public static XrSwapchainUsageFlags XR_SWAPCHAIN_USAGE_TRANSFER_DST_BIT
Field Value
XR_SWAPCHAIN_USAGE_TRANSFER_SRC_BIT
Declaration
public static XrSwapchainUsageFlags XR_SWAPCHAIN_USAGE_TRANSFER_SRC_BIT
Field Value
XR_SWAPCHAIN_USAGE_UNORDERED_ACCESS_BIT
Declaration
public static XrSwapchainUsageFlags XR_SWAPCHAIN_USAGE_UNORDERED_ACCESS_BIT
Field Value
Methods
Declaration
public static XrResult GetInputSourceName(OpenXRHelper.xrGetInputSourceLocalizedNameDelegate xrGetInputSourceLocalizedName, XrSession session, ref XrInputSourceLocalizedNameGetInfo nameInfo, out string sourceName)
Parameters
Returns
GetXrFunctionDelegate<Type>(xrGetInstanceProcAddrDelegate, XrInstance, string, out Type)
Help call xrGetInstanceProcAddr and convert the result to delegate.
For example, "OpenXRHelper.GetXrFunctionDelegate(GetAddr, xrInstance, "xrGetSystemProperties", out XrGetSystemProperties);"
Declaration
public static bool GetXrFunctionDelegate<Type>(OpenXRHelper.xrGetInstanceProcAddrDelegate XrGetInstanceProcAddr, XrInstance xrInstance, string name, out Type func)
Parameters
Returns
Type |
Description |
bool |
If return false, the outout delegate instance will be default. Should not use it.
|
Type Parameters
Name |
Description |
Type |
The function's delegate.
|
IsExtensionSupported(xrEnumerateInstanceExtensionPropertiesDelegate, string)
Declaration
public static XrResult IsExtensionSupported(OpenXRHelper.xrEnumerateInstanceExtensionPropertiesDelegate xrEnumerateInstanceExtensionProperties, string extension)
Parameters
Returns
Type |
Description |
XrResult |
XR_SUCCESS for supported.
|
ToOpenXRQuaternion(Quaternion, bool)
Declaration
public static XrQuaternionf ToOpenXRQuaternion(this Quaternion unityQuat, bool convertFromUntiyToOpenXR = true)
Parameters
Type |
Name |
Description |
Quaternion |
unityQuat |
|
bool |
convertFromUntiyToOpenXR |
|
Returns
ToOpenXRQuaternion(XrQuaternionf, bool)
Declaration
public static XrQuaternionf ToOpenXRQuaternion(this XrQuaternionf unityQuat, bool convertFromUntiyToOpenXR = true)
Parameters
Returns
ToOpenXRVector(Vector3, bool)
Declaration
public static XrVector3f ToOpenXRVector(this Vector3 unityVec, bool convertFromUntiyToOpenXR = true)
Parameters
Type |
Name |
Description |
Vector3 |
unityVec |
|
bool |
convertFromUntiyToOpenXR |
|
Returns
ToOpenXRVector(XrVector3f, bool)
Declaration
public static XrVector3f ToOpenXRVector(this XrVector3f unityVec, bool convertFromUntiyToOpenXR = true)
Parameters
Type |
Name |
Description |
XrVector3f |
unityVec |
|
bool |
convertFromUntiyToOpenXR |
|
Returns
ToUnityQuaternion(Quaternion)
Transforms an OpenXR Qauternaion to Unity coordinates.
Declaration
public static Quaternion ToUnityQuaternion(this Quaternion xrQuat)
Parameters
Type |
Name |
Description |
Quaternion |
xrQuat |
Quaternion in OpenXR coordinates.
|
Returns
Type |
Description |
Quaternion |
Quaternion in Unity coordinates.
|
ToUnityQuaternion(XrQuaternionf)
Transforms an OpenXR Qauternaion to Unity coordinates.
Declaration
public static Quaternion ToUnityQuaternion(this XrQuaternionf xrQuat)
Parameters
Returns
Type |
Description |
Quaternion |
Quaternion in Unity coordinates.
|
ToUnityVector(Vector3)
Transforms an OpenXR Vector to Unity coordinates.
Declaration
public static Vector3 ToUnityVector(this Vector3 xrVec)
Parameters
Type |
Name |
Description |
Vector3 |
xrVec |
Vector3 in OpenXR coordinates.
|
Returns
Type |
Description |
Vector3 |
Vector3 in Unity coordinates.
|
ToUnityVector(XrVector3f)
Transforms an OpenXR Vector to Unity coordinates.
Declaration
public static Vector3 ToUnityVector(this XrVector3f xrVec)
Parameters
Returns
Type |
Description |
Vector3 |
Vector3 in Unity coordinates.
|
Declaration
public static bool VALIDATE(InputActionReference actionReference, out string msg)
Parameters
Returns