Class OpenXRHmd
- Namespace
- Stride.VirtualReality
- Assembly
- Stride.VirtualReality.dll
public class OpenXRHmd : VRDevice, IDisposable- Inheritance
- 
      objectOpenXRHmd
- Implements
- Inherited Members
- Extension Methods
Fields
Instance
public readonly Instance InstanceField Value
- Instance
SystemId
public readonly ulong SystemIdField Value
Xr
public readonly XR XrField Value
- XR
extensions
public static List<string> extensionsField Value
globalActionSet
public ActionSet globalActionSetField Value
- ActionSet
globalFrameState
public FrameState globalFrameStateField Value
- FrameState
globalPlaySpace
public Space globalPlaySpaceField Value
- Space
globalSession
public Session globalSessionField Value
- Session
globalSwapchain
public Swapchain globalSwapchainField Value
- Swapchain
handProfileState
public InteractionProfileState handProfileStateField Value
- InteractionProfileState
images
public SwapchainImageD3D11KHR[]? imagesField Value
- SwapchainImageD3D11KHR[]
play_space_type
public ReferenceSpaceType play_space_typeField Value
- ReferenceSpaceType
render_targets
public RenderTargetView[]? render_targetsField Value
- RenderTargetView[]
Properties
ActualRenderFrameSize
public override Size2 ActualRenderFrameSize { get; protected set; }Property Value
CanInitialize
public override bool CanInitialize { get; }Property Value
CanMirrorTexture
public override bool CanMirrorTexture { get; }Property Value
HeadAngularVelocity
public override Vector3 HeadAngularVelocity { get; }Property Value
HeadLinearVelocity
public override Vector3 HeadLinearVelocity { get; }Property Value
HeadPosition
public override Vector3 HeadPosition { get; }Property Value
HeadRotation
public override Quaternion HeadRotation { get; }Property Value
LeftHand
public override TouchController? LeftHand { get; }Property Value
MirrorTexture
public override Texture? MirrorTexture { get; protected set; }Property Value
OptimalRenderFrameSize
public override Size2 OptimalRenderFrameSize { get; }Property Value
RenderFrameScaling
public override float RenderFrameScaling { get; set; }Property Value
RightHand
public override TouchController? RightHand { get; }Property Value
State
public override DeviceState State { get; }Property Value
TrackedItems
public override TrackedItem[]? TrackedItems { get; }Property Value
Methods
Commit(CommandList, Texture)
public override void Commit(CommandList commandList, Texture renderFrame)Parameters
- commandListCommandList
- renderFrameTexture
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
- gameTimeGameTime
Enable(GraphicsDevice, GraphicsDeviceManager, bool, int, int)
public override void Enable(GraphicsDevice device, GraphicsDeviceManager graphicsDeviceManager, bool requireMirror, int mirrorWidth, int mirrorHeight)Parameters
- deviceGraphicsDevice
- graphicsDeviceManagerGraphicsDeviceManager
- requireMirrorbool
- mirrorWidthint
- mirrorHeightint
GetSwapchainImage()
public uint GetSwapchainImage()Returns
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
- eyeEyes
- nearfloat
- farfloat
- cameraPositionVector3
- cameraRotationMatrix
- ignoreHeadRotationbool
- ignoreHeadPositionbool
- viewMatrix
- projectionMatrix
Recenter()
public override void Recenter()SetTrackingSpace(TrackingSpace)
public override void SetTrackingSpace(TrackingSpace space)Parameters
- spaceTrackingSpace
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
- gameTimeGameTime
UpdateViews()
public void UpdateViews()