Class VRDevice
- Namespace
- Stride.VirtualReality
- Assembly
- Stride.VirtualReality.dll
public abstract class VRDevice : IDisposable
- Inheritance
-
VRDevice
- Implements
- Derived
- Extension Methods
Constructors
VRDevice()
protected VRDevice()
Properties
ActualRenderFrameSize
public abstract Size2 ActualRenderFrameSize { get; protected set; }
Property Value
CanInitialize
public abstract bool CanInitialize { get; }
Property Value
CanMirrorTexture
public virtual bool CanMirrorTexture { get; }
Property Value
Game
public GameBase Game { get; }
Property Value
HeadAngularVelocity
public abstract Vector3 HeadAngularVelocity { get; }
Property Value
HeadLinearVelocity
public abstract Vector3 HeadLinearVelocity { get; }
Property Value
HeadPosition
public abstract Vector3 HeadPosition { get; }
Property Value
HeadRotation
public abstract Quaternion HeadRotation { get; }
Property Value
LeftHand
public abstract TouchController LeftHand { get; }
Property Value
MirrorTexture
public abstract Texture MirrorTexture { get; protected set; }
Property Value
OptimalRenderFrameSize
public abstract Size2 OptimalRenderFrameSize { get; }
Property Value
RenderFrameScaling
public abstract float RenderFrameScaling { get; set; }
Property Value
RightHand
public abstract TouchController RightHand { get; }
Property Value
State
public abstract DeviceState State { get; }
Property Value
SupportsOverlays
public bool SupportsOverlays { get; protected set; }
Property Value
SupportsPassthrough
Whether or not passthrough is supported by the device. It needs to be requested on device creation by enabling RequestPassthrough. If supported, passthrough can be started (and stopped) with the StartPassthrough() method.
public bool SupportsPassthrough { get; protected set; }
Property Value
TrackedItems
public abstract TrackedItem[] TrackedItems { get; }
Property Value
VRApi
public VRApi VRApi { get; protected set; }
Property Value
ViewScaling
Allows you to scale the view, effectively it will change the size of the player in respect to the world, turning it into a giant or a tiny ant.
public float ViewScaling { get; set; }
Property Value
Remarks
This will reduce the near clip plane of the cameras, it might induce depth issues.
Methods
Commit(CommandList, Texture)
public abstract void Commit(CommandList commandList, Texture renderFrame)
Parameters
commandList
CommandListrenderFrame
Texture
CreateOverlay(int, int, int, int)
public virtual VROverlay CreateOverlay(int width, int height, int mipLevels, int sampleCount)
Parameters
Returns
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public virtual void Dispose()
Draw(GameTime)
public abstract void Draw(GameTime gameTime)
Parameters
gameTime
GameTime
Enable(GraphicsDevice, GraphicsDeviceManager, bool, int, int)
public abstract void Enable(GraphicsDevice device, GraphicsDeviceManager graphicsDeviceManager, bool requireMirror, int mirrorWidth, int mirrorHeight)
Parameters
device
GraphicsDevicegraphicsDeviceManager
GraphicsDeviceManagerrequireMirror
boolmirrorWidth
intmirrorHeight
int
ReadEyeParameters(Eyes, float, float, ref Vector3, ref Matrix, bool, bool, out Matrix, out Matrix)
public abstract 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 virtual void Recenter()
ReleaseOverlay(VROverlay)
public virtual void ReleaseOverlay(VROverlay overlay)
Parameters
overlay
VROverlay
SetTrackingSpace(TrackingSpace)
public virtual 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 virtual 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 abstract void Update(GameTime gameTime)
Parameters
gameTime
GameTime