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
Xr
public readonly XR Xr
Field Value
- XR
extensions
public static List<string> extensions
Field Value
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
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
commandList
CommandListrenderFrame
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
GraphicsDevicegraphicsDeviceManager
GraphicsDeviceManagerrequireMirror
boolmirrorWidth
intmirrorHeight
int
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
eye
Eyesnear
floatfar
floatcameraPosition
Vector3cameraRotation
MatrixignoreHeadRotation
boolignoreHeadPosition
boolview
Matrixprojection
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()