Table of Contents

Class OpenXRHmd

Namespace
Stride.VirtualReality
Assembly
Stride.VirtualReality.dll
public class OpenXRHmd : VRDevice, IDisposable
Inheritance
OpenXRHmd
Implements
Inherited Members
Extension Methods

Fields

Instance

public readonly Instance Instance

Field Value

Instance

SystemId

public readonly ulong SystemId

Field Value

ulong

Xr

public readonly XR Xr

Field Value

XR

extensions

public static List<string> extensions

Field Value

List<string>

globalActionSet

public ActionSet globalActionSet

Field Value

ActionSet

globalFrameState

public FrameState globalFrameState

Field Value

FrameState

globalPlaySpace

public Space globalPlaySpace

Field Value

Space

globalSession

public Session globalSession

Field Value

Session

globalSwapchain

public Swapchain globalSwapchain

Field Value

Swapchain

handProfileState

public InteractionProfileState handProfileState

Field Value

InteractionProfileState

images

public SwapchainImageD3D11KHR[]? images

Field Value

SwapchainImageD3D11KHR[]

play_space_type

public ReferenceSpaceType play_space_type

Field Value

ReferenceSpaceType

render_targets

public RenderTargetView[]? render_targets

Field Value

RenderTargetView[]

Properties

ActualRenderFrameSize

public override Size2 ActualRenderFrameSize { get; protected set; }

Property Value

Size2

CanInitialize

public override bool CanInitialize { get; }

Property Value

bool

CanMirrorTexture

public override bool CanMirrorTexture { get; }

Property Value

bool

HeadAngularVelocity

public override Vector3 HeadAngularVelocity { get; }

Property Value

Vector3

HeadLinearVelocity

public override Vector3 HeadLinearVelocity { get; }

Property Value

Vector3

HeadPosition

public override Vector3 HeadPosition { get; }

Property Value

Vector3

HeadRotation

public override Quaternion HeadRotation { get; }

Property Value

Quaternion

LeftHand

public override TouchController? LeftHand { get; }

Property Value

TouchController

MirrorTexture

public override Texture? MirrorTexture { get; protected set; }

Property Value

Texture

OptimalRenderFrameSize

public override Size2 OptimalRenderFrameSize { get; }

Property Value

Size2

RenderFrameScaling

public override float RenderFrameScaling { get; set; }

Property Value

float

RightHand

public override TouchController? RightHand { get; }

Property Value

TouchController

State

public override DeviceState State { get; }

Property Value

DeviceState

TrackedItems

public override TrackedItem[]? TrackedItems { get; }

Property Value

TrackedItem[]

Methods

Commit(CommandList, Texture)

public override void Commit(CommandList commandList, Texture renderFrame)

Parameters

commandList CommandList
renderFrame Texture

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public override void Dispose()

Draw(GameTime)

public override void Draw(GameTime gameTime)

Parameters

gameTime GameTime

Enable(GraphicsDevice, GraphicsDeviceManager, bool, int, int)

public override void Enable(GraphicsDevice device, GraphicsDeviceManager graphicsDeviceManager, bool requireMirror, int mirrorWidth, int mirrorHeight)

Parameters

device GraphicsDevice
graphicsDeviceManager GraphicsDeviceManager
requireMirror bool
mirrorWidth int
mirrorHeight int

GetSwapchainImage()

public uint GetSwapchainImage()

Returns

uint

ReadEyeParameters(Eyes, float, float, ref Vector3, ref Matrix, bool, bool, out Matrix, out Matrix)

public override void ReadEyeParameters(Eyes eye, float near, float far, ref Vector3 cameraPosition, ref Matrix cameraRotation, bool ignoreHeadRotation, bool ignoreHeadPosition, out Matrix view, out Matrix projection)

Parameters

eye Eyes
near float
far float
cameraPosition Vector3
cameraRotation Matrix
ignoreHeadRotation bool
ignoreHeadPosition bool
view Matrix
projection Matrix

Recenter()

public override void Recenter()

SetTrackingSpace(TrackingSpace)

public override void SetTrackingSpace(TrackingSpace space)

Parameters

space TrackingSpace

StartPassthrough()

Starts a passthrough. When enabled the scene is rendered on top of the camera image of the device.

public override IDisposable StartPassthrough()

Returns

IDisposable

A disposable which will stop the passthrough on dispose.

Exceptions

NotSupportedException

Thrown if the passthrough mode is not supported by the device.

InvalidOperationException

Thrown if the passthrough mode is already enabled.

Update(GameTime)

public override void Update(GameTime gameTime)

Parameters

gameTime GameTime

UpdateViews()

public void UpdateViews()