reckfellENGINE

OpenXRInterface

Our OpenXR interface.

On this page
class OpenXRInterfaceReckfellSharpInherits XRInterface

Our OpenXR interface.

The OpenXR interface allows Reckfell to interact with OpenXR runtimes and make it possible to create XR experiences and games. Due to the needs of OpenXR this interface works slightly different than other plugin based XR interfaces. It needs to be initialized when Reckfell starts. You need to enable OpenXR, settings for this can be found in your games project settings under the XR heading. You do need to mark a viewport for use with XR in order for Reckfell to know which render result should be output to the headset.

Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.

Constructors1

OpenXRInterfaceConstructor
# OpenXRInterface
C#
public OpenXRInterface();

Properties7

DisplayRefreshRateProperty
# DisplayRefreshRate
C#
public float DisplayRefreshRate { get; set; }

The display refresh rate for the current HMD. Only functional if this feature is supported by the OpenXR runtime and after the interface has been initialized.

FoveationDynamicProperty
# FoveationDynamic
C#
public bool FoveationDynamic { get; set; }

If true, enables dynamic foveation adjustment. The interface must be initialized before this is accessible. If enabled, foveation will automatically be adjusted between low and OpenXRInterface.FoveationLevel.

FoveationLevelProperty
# FoveationLevel
C#
public int FoveationLevel { get; set; }

The foveation level, from 0 (off) to 3 (high). The interface must be initialized before this is accessible.

FoveationWithSubsampledImagesProperty
# FoveationWithSubsampledImages
C#
public bool FoveationWithSubsampledImages { get; set; }

If true, enables subsampled images with foveation, which can provide a performance boost on Vulkan.

RenderTargetSizeMultiplierProperty
# RenderTargetSizeMultiplier
C#
public double RenderTargetSizeMultiplier { get; set; }

The render size multiplier for the current HMD. Must be set before the interface has been initialized.

VrsMinRadiusProperty
# VrsMinRadius
C#
public float VrsMinRadius { get; set; }

The minimum radius around the focal point where full quality is guaranteed if VRS is used as a percentage of screen size. Note: Mobile and Forward+ renderers only. Requires Viewport.VrsMode to be set to Viewport.VrsModeEnum.XR.

VrsStrengthProperty
# VrsStrength
C#
public float VrsStrength { get; set; }

The strength used to calculate the VRS density map. The greater this value, the more noticeable VRS is. This improves performance at the cost of quality. Note: Mobile and Forward+ renderers only. Requires Viewport.VrsMode to be set to Viewport.VrsModeEnum.XR.

Methods38

GetActionSetsReckfell.Collections.Array
# GetActionSets
C#
public Reckfell.Collections.Array GetActionSets();

Returns a list of action sets registered with Reckfell (loaded from the action map at runtime).

Returns Reckfell.Collections.Array
GetActiveViewConfigurationOpenXRInterface.ViewConfiguration
# GetActiveViewConfiguration
C#
public OpenXRInterface.ViewConfiguration GetActiveViewConfiguration();

Gets the active view configuration. Note: This will only return a valid value after OpenXR is initialized.

Returns OpenXRInterface.ViewConfiguration
GetAvailableDisplayRefreshRatesReckfell.Collections.Array
# GetAvailableDisplayRefreshRates
C#
public Reckfell.Collections.Array GetAvailableDisplayRefreshRates();

Returns a list of display refresh rates supported by the current HMD. Only returned if this feature is supported by the OpenXR runtime and after the interface has been initialized.

Returns Reckfell.Collections.Array
GetDisplayRefreshRatefloat
# GetDisplayRefreshRate
C#
public float GetDisplayRefreshRate();
Returns float
GetFoveationDynamicbool
# GetFoveationDynamic
C#
public bool GetFoveationDynamic();
Returns bool
GetFoveationLevelint
# GetFoveationLevel
C#
public int GetFoveationLevel();
Returns int
GetFoveationWithSubsampledImagesbool
# GetFoveationWithSubsampledImages
C#
public bool GetFoveationWithSubsampledImages();
Returns bool
GetHandJointAngularVelocityVector3 · Deprecated
# GetHandJointAngularVelocity
C#
public Vector3 GetHandJointAngularVelocity(OpenXRInterface.Hand hand, OpenXRInterface.HandJoints joint);

If handtracking is enabled, returns the angular velocity of a joint (joint) of a hand (hand) as provided by OpenXR. This is relative to XROrigin3D!

Parameters
NameTypeDefault
handOpenXRInterface.Hand—
jointOpenXRInterface.HandJoints—
Returns Vector3
GetHandJointFlagsOpenXRInterface.HandJointFlags · Deprecated
# GetHandJointFlags
C#
public OpenXRInterface.HandJointFlags GetHandJointFlags(OpenXRInterface.Hand hand, OpenXRInterface.HandJoints joint);

If handtracking is enabled, returns flags that inform us of the validity of the tracking data.

Parameters
NameTypeDefault
handOpenXRInterface.Hand—
jointOpenXRInterface.HandJoints—
Returns OpenXRInterface.HandJointFlags
GetHandJointLinearVelocityVector3 · Deprecated
# GetHandJointLinearVelocity
C#
public Vector3 GetHandJointLinearVelocity(OpenXRInterface.Hand hand, OpenXRInterface.HandJoints joint);

If handtracking is enabled, returns the linear velocity of a joint (joint) of a hand (hand) as provided by OpenXR. This is relative to XROrigin3D without worldscale applied!

Parameters
NameTypeDefault
handOpenXRInterface.Hand—
jointOpenXRInterface.HandJoints—
Returns Vector3
GetHandJointPositionVector3 · Deprecated
# GetHandJointPosition
C#
public Vector3 GetHandJointPosition(OpenXRInterface.Hand hand, OpenXRInterface.HandJoints joint);

If handtracking is enabled, returns the position of a joint (joint) of a hand (hand) as provided by OpenXR. This is relative to XROrigin3D without worldscale applied!

Parameters
NameTypeDefault
handOpenXRInterface.Hand—
jointOpenXRInterface.HandJoints—
Returns Vector3
GetHandJointRadiusfloat · Deprecated
# GetHandJointRadius
C#
public float GetHandJointRadius(OpenXRInterface.Hand hand, OpenXRInterface.HandJoints joint);

If handtracking is enabled, returns the radius of a joint (joint) of a hand (hand) as provided by OpenXR. This is without worldscale applied!

Parameters
NameTypeDefault
handOpenXRInterface.Hand—
jointOpenXRInterface.HandJoints—
Returns float
GetHandJointRotationQuaternion · Deprecated
# GetHandJointRotation
C#
public Quaternion GetHandJointRotation(OpenXRInterface.Hand hand, OpenXRInterface.HandJoints joint);

If handtracking is enabled, returns the rotation of a joint (joint) of a hand (hand) as provided by OpenXR.

Parameters
NameTypeDefault
handOpenXRInterface.Hand—
jointOpenXRInterface.HandJoints—
Returns Quaternion
GetHandTrackingSourceOpenXRInterface.HandTrackedSource · Deprecated
# GetHandTrackingSource
C#
public OpenXRInterface.HandTrackedSource GetHandTrackingSource(OpenXRInterface.Hand hand);

If handtracking is enabled and hand tracking source is supported, gets the source of the hand tracking data for hand.

Parameters
NameTypeDefault
handOpenXRInterface.Hand—
Returns OpenXRInterface.HandTrackedSource
GetMotionRangeOpenXRInterface.HandMotionRange
# GetMotionRange
C#
public OpenXRInterface.HandMotionRange GetMotionRange(OpenXRInterface.Hand hand);

If handtracking is enabled and motion range is supported, gets the currently configured motion range for hand.

Parameters
NameTypeDefault
handOpenXRInterface.Hand—
Returns OpenXRInterface.HandMotionRange
GetRecommendedTargetSizeVector2
# GetRecommendedTargetSize
C#
public Vector2 GetRecommendedTargetSize();

Returns the recommended render target size from the OpenXR runtime. This may not match the current render target size returned by XRInterface.GetRenderTargetSize.

Returns Vector2
GetRenderTargetSizeMultiplierdouble
# GetRenderTargetSizeMultiplier
C#
public double GetRenderTargetSizeMultiplier();
Returns double
GetSessionStateOpenXRInterface.SessionState
# GetSessionState
C#
public OpenXRInterface.SessionState GetSessionState();

Returns the current state of our OpenXR session.

Returns OpenXRInterface.SessionState
GetVrsMinRadiusfloat
# GetVrsMinRadius
C#
public float GetVrsMinRadius();
Returns float
GetVrsStrengthfloat
# GetVrsStrength
C#
public float GetVrsStrength();
Returns float
IsActionSetActivebool
# IsActionSetActive
C#
public bool IsActionSetActive(string name);

Returns true if the given action set is active.

Parameters
NameTypeDefault
namestring—
Returns bool
IsEyeGazeInteractionSupportedbool
# IsEyeGazeInteractionSupported
C#
public bool IsEyeGazeInteractionSupported();

Returns the capabilities of the eye gaze interaction extension. Note: This only returns a valid value after OpenXR has been initialized.

Returns bool
IsFoveationSupportedbool
# IsFoveationSupported
C#
public bool IsFoveationSupported();

Returns true if OpenXR's foveation extension is supported. The interface must be initialized before this returns a valid value. Note: When using the Vulkan rendering driver, Viewport.VrsMode must be set to Viewport.VrsModeEnum.XR to support foveation.

Returns bool
IsHandInteractionSupportedbool
# IsHandInteractionSupported
C#
public bool IsHandInteractionSupported();

Returns true if OpenXR's hand interaction profile is supported and enabled. Note: This only returns a valid value after OpenXR has been initialized.

Returns bool
IsHandTrackingSupportedbool
# IsHandTrackingSupported
C#
public bool IsHandTrackingSupported();

Returns true if OpenXR's hand tracking is supported and enabled. Note: This only returns a valid value after OpenXR has been initialized.

Returns bool
IsUserPresenceSupportedbool
# IsUserPresenceSupported
C#
public bool IsUserPresenceSupported();

Returns true if OpenXR's user presence extension is supported and enabled. Note: This only returns a valid value after OpenXR has been initialized.

Returns bool
IsUserPresentbool
# IsUserPresent
C#
public bool IsUserPresent();

Returns true if system has detected the presence of a user in the XR experience.

Returns bool
SetActionSetActivevoid
# SetActionSetActive
C#
public void SetActionSetActive(string name, bool active);

Sets the given action set as active or inactive.

Parameters
NameTypeDefault
namestring—
activebool—
SetCpuLevelvoid
# SetCpuLevel
C#
public void SetCpuLevel(OpenXRInterface.PerfSettingsLevel level);

Sets the CPU performance level of the OpenXR device.

Parameters
NameTypeDefault
levelOpenXRInterface.PerfSettingsLevel—
SetDisplayRefreshRatevoid
# SetDisplayRefreshRate
C#
public void SetDisplayRefreshRate(float refreshRate);
Parameters
NameTypeDefault
refreshRatefloat—
SetFoveationDynamicvoid
# SetFoveationDynamic
C#
public void SetFoveationDynamic(bool foveationDynamic);
Parameters
NameTypeDefault
foveationDynamicbool—
SetFoveationLevelvoid
# SetFoveationLevel
C#
public void SetFoveationLevel(int foveationLevel);
Parameters
NameTypeDefault
foveationLevelint—
SetFoveationWithSubsampledImagesvoid
# SetFoveationWithSubsampledImages
C#
public void SetFoveationWithSubsampledImages(bool enabled);
Parameters
NameTypeDefault
enabledbool—
SetGpuLevelvoid
# SetGpuLevel
C#
public void SetGpuLevel(OpenXRInterface.PerfSettingsLevel level);

Sets the GPU performance level of the OpenXR device.

Parameters
NameTypeDefault
levelOpenXRInterface.PerfSettingsLevel—
SetMotionRangevoid
# SetMotionRange
C#
public void SetMotionRange(OpenXRInterface.Hand hand, OpenXRInterface.HandMotionRange motionRange);

If handtracking is enabled and motion range is supported, sets the currently configured motion range for hand to motion_range.

Parameters
NameTypeDefault
handOpenXRInterface.Hand—
motionRangeOpenXRInterface.HandMotionRange—
SetRenderTargetSizeMultipliervoid
# SetRenderTargetSizeMultiplier
C#
public void SetRenderTargetSizeMultiplier(double multiplier);
Parameters
NameTypeDefault
multiplierdouble—
SetVrsMinRadiusvoid
# SetVrsMinRadius
C#
public void SetVrsMinRadius(float radius);
Parameters
NameTypeDefault
radiusfloat—
SetVrsStrengthvoid
# SetVrsStrength
C#
public void SetVrsStrength(float strength);
Parameters
NameTypeDefault
strengthfloat—

Signals and events12

CpuLevelChangedEvent
# CpuLevelChanged
C#
public event OpenXRInterface.CpuLevelChangedEventHandler CpuLevelChanged;

Informs the device CPU performance level has changed in the specified subdomain.

Handler parameters
NameTypeDefault
subDomainlong—
fromLevellong—
toLevellong—
GpuLevelChangedEvent
# GpuLevelChanged
C#
public event OpenXRInterface.GpuLevelChangedEventHandler GpuLevelChanged;

Informs the device GPU performance level has changed in the specified subdomain.

Handler parameters
NameTypeDefault
subDomainlong—
fromLevellong—
toLevellong—
InstanceExitingEvent
# InstanceExiting
C#
public event Action InstanceExiting;

Informs our OpenXR instance is exiting.

PoseRecenteredEvent
# PoseRecentered
C#
public event Action PoseRecentered;

Informs the user queued a recenter of the player position.

RefreshRateChangedEvent
# RefreshRateChanged
C#
public event OpenXRInterface.RefreshRateChangedEventHandler RefreshRateChanged;

Informs the user the HMD refresh rate has changed. Note: Only emitted if XR runtime supports the refresh rate extension.

Handler parameters
NameTypeDefault
refreshRatedouble—
SessionBegunEvent
# SessionBegun
C#
public event Action SessionBegun;

Informs our OpenXR session has been started.

SessionFocussedEvent
# SessionFocussed
C#
public event Action SessionFocussed;

Informs our OpenXR session now has focus, for example output is sent to the HMD and we're receiving XR input.

SessionLossPendingEvent
# SessionLossPending
C#
public event Action SessionLossPending;

Informs our OpenXR session is in the process of being lost.

SessionStoppingEvent
# SessionStopping
C#
public event Action SessionStopping;

Informs our OpenXR session is stopping.

SessionSynchronizedEvent
# SessionSynchronized
C#
public event Action SessionSynchronized;

Informs our OpenXR session has been synchronized.

SessionVisibleEvent
# SessionVisible
C#
public event Action SessionVisible;

Informs our OpenXR session is now visible, for example output is sent to the HMD but we don't receive XR input.

UserPresenceChangedEvent
# UserPresenceChanged
C#
public event OpenXRInterface.UserPresenceChangedEventHandler UserPresenceChanged;

Signal emitted when the user presence value changes. Note: This signal will not be emitted during application startup and application shutdown. Developers should assume user presence is gained on startup and lost on shutdown.

Handler parameters
NameTypeDefault
isUserPresentbool—

OpenXRInterface.Hand

ValueDescription
Left = 0

Left hand.

Max = 2

Maximum value for the hand enum.

Right = 1

Right hand.

OpenXRInterface.HandJointFlags

ValueDescription
AngularVelocityValid = 32

If set, our angular velocity data is valid, otherwise, the angular velocity data is unreliable and should not be used.

LinearVelocityValid = 16

If set, our linear velocity data is valid, otherwise, the linear velocity data is unreliable and should not be used.

None = 0

No flags are set.

OrientationTracked = 2

If set, the orientation data comes from tracking data, otherwise, the orientation data contains predicted data.

OrientationValid = 1

If set, the orientation data is valid, otherwise, the orientation data is unreliable and should not be used.

PositionTracked = 8

If set, the positional data comes from tracking data, otherwise, the positional data contains predicted data.

PositionValid = 4

If set, the positional data is valid, otherwise, the positional data is unreliable and should not be used.

OpenXRInterface.HandJoints

ValueDescription
IndexDistal = 9

Index finger phalanx distal joint.

IndexIntermediate = 8

Index finger phalanx intermediate joint.

IndexMetacarpal = 6

Index finger metacarpal joint.

IndexProximal = 7

Index finger phalanx proximal joint.

IndexTip = 10

Index finger tip joint.

LittleDistal = 24

Pinky finger phalanx distal joint.

LittleIntermediate = 23

Pinky finger phalanx intermediate joint.

LittleMetacarpal = 21

Pinky finger metacarpal joint.

LittleProximal = 22

Pinky finger phalanx proximal joint.

LittleTip = 25

Pinky finger tip joint.

Max = 26

Represents the size of the OpenXRInterface.HandJoints enum.

MiddleDistal = 14

Middle finger phalanx distal joint.

MiddleIntermediate = 13

Middle finger phalanx intermediate joint.

MiddleMetacarpal = 11

Middle finger metacarpal joint.

MiddleProximal = 12

Middle finger phalanx proximal joint.

MiddleTip = 15

Middle finger tip joint.

Palm = 0

Palm joint.

RingDistal = 19

Ring finger phalanx distal joint.

RingIntermediate = 18

Ring finger phalanx intermediate joint.

RingMetacarpal = 16

Ring finger metacarpal joint.

RingProximal = 17

Ring finger phalanx proximal joint.

RingTip = 20

Ring finger tip joint.

ThumbDistal = 4

Thumb distal joint.

ThumbMetacarpal = 2

Thumb metacarpal joint.

ThumbProximal = 3

Thumb proximal joint.

ThumbTip = 5

Thumb tip joint.

Wrist = 1

Wrist joint.

OpenXRInterface.HandMotionRange

ValueDescription
ConformToController = 1

Conform to controller, if user closes their hands, the tracked data conforms to the shape of the controller.

Max = 2

Maximum value for the motion range enum.

Unobstructed = 0

Full hand range, if user closes their hands, we make a full fist.

OpenXRInterface.HandTrackedSource

ValueDescription
Controller = 2

The source of hand tracking is a controller, bone positions are inferred from controller inputs.

Max = 3

Represents the size of the OpenXRInterface.HandTrackedSource enum.

Unknown = 0

The source of hand tracking data is unknown (the extension is likely unsupported).

Unobstructed = 1

The source of hand tracking is unobstructed, this means that an accurate method of hand tracking is used, e.g. optical hand tracking, data gloves, etc.

OpenXRInterface.PerfSettingsLevel

ValueDescription
Boost = 3

The application has entered a section with very high complexity, during which the XR Runtime is allowed to step up beyond the thermally sustainable range.

PowerSavings = 0

The application has entered a non-XR section (head-locked / static screen), during which power savings are to be prioritized.

SustainedHigh = 2

The application has entered a high or dynamic complexity section, during which the XR Runtime strives for consistent XR compositing and frame rendering within a thermally sustainable range.

SustainedLow = 1

The application has entered a low and stable complexity section, during which reducing power is more important than occasional late rendering frames.

OpenXRInterface.PerfSettingsNotificationLevel

ValueDescription
Impaired = 2

The sub-domain has reached a critical level where the application should start drastic mitigation actions.

Normal = 0

The sub-domain has reached a level where no further actions other than currently applied are necessary.

Warning = 1

The sub-domain has reached an early warning level where the application should start proactive mitigation actions.

OpenXRInterface.PerfSettingsSubDomain

ValueDescription
Compositing = 0

The compositing performance within the runtime has reached a new level.

Rendering = 1

The application rendering performance has reached a new level.

Thermal = 2

The temperature of the device has reached a new level.

OpenXRInterface.SessionState

ValueDescription
Exiting = 8

The OpenXR instance is about to be destroyed and we're exiting. OpenXRInterface.InstanceExiting is emitted when we change to this state.

Focused = 5

The application has synched its frame loop with the runtime, we're rendering output to the user and we're receiving XR input. OpenXRInterface.SessionFocussed is emitted when we change to this state. Note: This is the state OpenXR will be in when the user can fully interact with your game.

Idle = 1

The initial state after the OpenXR session is created or after the session is destroyed.

LossPending = 7

The session is about to be lost. OpenXRInterface.SessionLossPending is emitted when we change to this state.

Ready = 2

OpenXR is ready to begin our session. OpenXRInterface.SessionBegun is emitted when we change to this state.

Stopping = 6

Our session is being stopped. OpenXRInterface.SessionStopping is emitted when we change to this state.

Synchronized = 3

The application has synched its frame loop with the runtime but we're not rendering anything. OpenXRInterface.SessionSynchronized is emitted when we change to this state.

Unknown = 0

The state of the session is unknown, we haven't tried setting up OpenXR yet.

Visible = 4

The application has synched its frame loop with the runtime and we're rendering output to the user, however we receive no user input. OpenXRInterface.SessionVisible is emitted when we change to this state. Note: This is the current state just before we get the focused state, whenever the user opens a system menu, switches to another application, or takes off their headset.

OpenXRInterface.ViewConfiguration

ValueDescription
Mono = 0

Our XR output configuration is monoscopic.

Stereo = 1

Our XR output configuration is stereoscopic.

StereoWithInset = 2

Our XR output configuration is stereoscopic with an additional foveated inset render.

Unknown = 255

Our XR output configuration is unknown.

Unset = 254

Our XR output configuration has not yet been determined.

Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.