Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    VRDevice Class

    Namespace: Stride.VirtualReality
    Assembly: Stride.VirtualReality.dll
    System.Object → VRDevice
    Derived from VRDevice: DummyDevice

    public abstract class VRDevice : IDisposable
    Name Description
    Constructors
    VRDevice()
    Properties
    ActualRenderFrameSize
    CanInitialize
    Game
    HeadAngularVelocity
    HeadLinearVelocity
    HeadPosition
    HeadRotation
    LeftHand
    MirrorTexture
    OptimalRenderFrameSize
    RenderFrameScaling
    RightHand
    State
    SupportsOverlays
    TrackedItems
    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.

    VRApi
    Methods
    Commit(CommandList, Texture)
    CreateOverlay(Int32, Int32, Int32, Int32)
    Dispose()
    Draw(GameTime)
    Enable(GraphicsDevice, GraphicsDeviceManager, Boolean, Int32, Int32)
    ReadEyeParameters(Eyes, Single, Single, ref Vector3, ref Matrix, Boolean, Boolean, out Matrix, out Matrix)
    Recenter()
    ReleaseOverlay(VROverlay)
    SetTrackingSpace(TrackingSpace)
    Update(GameTime)
    | Improve this Doc View Source

    Constructors


    VRDevice()

    protected VRDevice()
    | Improve this Doc View Source

    Properties


    ActualRenderFrameSize

    public abstract Size2 ActualRenderFrameSize { get; protected set; }
    Property Value
    Type Description
    Size2

    CanInitialize

    public abstract bool CanInitialize { get; }
    Property Value
    Type Description
    System.Boolean

    Game

    public GameBase Game { get; }
    Property Value
    Type Description
    GameBase

    HeadAngularVelocity

    public abstract Vector3 HeadAngularVelocity { get; }
    Property Value
    Type Description
    Vector3

    HeadLinearVelocity

    public abstract Vector3 HeadLinearVelocity { get; }
    Property Value
    Type Description
    Vector3

    HeadPosition

    public abstract Vector3 HeadPosition { get; }
    Property Value
    Type Description
    Vector3

    HeadRotation

    public abstract Quaternion HeadRotation { get; }
    Property Value
    Type Description
    Quaternion

    LeftHand

    public abstract TouchController LeftHand { get; }
    Property Value
    Type Description
    TouchController

    MirrorTexture

    public abstract Texture MirrorTexture { get; protected set; }
    Property Value
    Type Description
    Texture

    OptimalRenderFrameSize

    public abstract Size2 OptimalRenderFrameSize { get; }
    Property Value
    Type Description
    Size2

    RenderFrameScaling

    public abstract float RenderFrameScaling { get; set; }
    Property Value
    Type Description
    System.Single

    RightHand

    public abstract TouchController RightHand { get; }
    Property Value
    Type Description
    TouchController

    State

    public abstract DeviceState State { get; }
    Property Value
    Type Description
    DeviceState

    SupportsOverlays

    public bool SupportsOverlays { get; protected set; }
    Property Value
    Type Description
    System.Boolean

    TrackedItems

    public abstract TrackedItem[] TrackedItems { get; }
    Property Value
    Type Description
    TrackedItem[]

    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
    Type Description
    System.Single
    Remarks

    This will reduce the near clip plane of the cameras, it might induce depth issues.


    VRApi

    public VRApi VRApi { get; protected set; }
    Property Value
    Type Description
    VRApi
    | Improve this Doc View Source

    Methods


    Commit(CommandList, Texture)

    public abstract void Commit(CommandList commandList, Texture renderFrame)
    Parameters
    Type Name Description
    CommandList commandList
    Texture renderFrame

    CreateOverlay(Int32, Int32, Int32, Int32)

    public virtual VROverlay CreateOverlay(int width, int height, int mipLevels, int sampleCount)
    Parameters
    Type Name Description
    System.Int32 width
    System.Int32 height
    System.Int32 mipLevels
    System.Int32 sampleCount
    Returns
    Type Description
    VROverlay

    Dispose()

    public virtual void Dispose()

    Draw(GameTime)

    public abstract void Draw(GameTime gameTime)
    Parameters
    Type Name Description
    GameTime gameTime

    Enable(GraphicsDevice, GraphicsDeviceManager, Boolean, Int32, Int32)

    public abstract void Enable(GraphicsDevice device, GraphicsDeviceManager graphicsDeviceManager, bool requireMirror, int mirrorWidth, int mirrorHeight)
    Parameters
    Type Name Description
    GraphicsDevice device
    GraphicsDeviceManager graphicsDeviceManager
    System.Boolean requireMirror
    System.Int32 mirrorWidth
    System.Int32 mirrorHeight

    ReadEyeParameters(Eyes, Single, Single, ref Vector3, ref Matrix, Boolean, Boolean, 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
    Type Name Description
    Eyes eye
    System.Single near
    System.Single far
    Vector3 cameraPosition
    Matrix cameraRotation
    System.Boolean ignoreHeadRotation
    System.Boolean ignoreHeadPosition
    Matrix view
    Matrix projection

    Recenter()

    public virtual void Recenter()

    ReleaseOverlay(VROverlay)

    public virtual void ReleaseOverlay(VROverlay overlay)
    Parameters
    Type Name Description
    VROverlay overlay

    SetTrackingSpace(TrackingSpace)

    public virtual void SetTrackingSpace(TrackingSpace space)
    Parameters
    Type Name Description
    TrackingSpace space

    Update(GameTime)

    public abstract void Update(GameTime gameTime)
    Parameters
    Type Name Description
    GameTime gameTime

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation