Class OpenXRHmd
- Namespace
- Stride.VirtualReality
- Assembly
- Stride.VirtualReality.dll
public class OpenXRHmd : VRDevice, IDisposable
- Inheritance
-
OpenXRHmd
- Implements
- Inherited Members
- Extension Methods
Constructors
OpenXRHmd(GraphicsDevice)
public OpenXRHmd(GraphicsDevice gd)
Parameters
Fields
Instance
public Instance Instance
Field Value
- Instance
Xr
public 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[]
system_id
public ulong system_id
Field Value
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
CheckResult(Result, string)
A simple function which throws an exception if the given OpenXR result indicates an error has been raised.
protected static Result CheckResult(Result result, string forFunction)
Parameters
result
ResultThe OpenXR result in question.
forFunction
string
Returns
- Result
The same result passed in, just in case it's meaningful and we just want to use this to filter out errors.
Exceptions
- Exception
An exception for the given result if it indicates an error.
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
Update(GameTime)
public override void Update(GameTime gameTime)
Parameters
gameTime
GameTime
UpdateViews()
public void UpdateViews()