Generic mobile VR implementation.
    public class MobileVRInterface : ARVRInterface

This is a generic mobile VR implementation where you need to provide details about the phone and HMD used. It does not rely on any existing framework. This is the most basic interface we have. For the best effect, you need a mobile phone with a gyroscope and accelerometer.

Note that even though there is no positional tracking, the camera will assume the headset is at a height of 1.85 meters. You can change this by setting EyeHeight.

You can initialise this interface as follows:

[codeblock]

var interface = ARVRServer.find_interface(“Native mobile”)

if interface and interface.initialize():

get_viewport().arvr = true

[/codeblock]

Inheritance Chain

Constructors

    public MobileVRInterface()

Properties

    public float DisplayToLens { get; set; }

The distance between the display and the lenses inside of the device in centimeters.

    public float DisplayWidth { get; set; }

The width of the display in centimeters.

    public float EyeHeight { get; set; }

The height at which the camera is placed in relation to the ground (i.e. ARVROrigin node).

    public float Iod { get; set; }

The interocular distance, also known as the interpupillary distance. The distance between the pupils of the left and right eye.

    public float K1 { get; set; }

The k1 lens factor is one of the two constants that define the strength of the lens used and directly influences the lens distortion effect.

    public float K2 { get; set; }

The k2 lens factor, see k1.

    public float Oversample { get; set; }

The oversample setting. Because of the lens distortion we have to render our buffers at a higher resolution then the screen can natively handle. A value between 1.5 and 2.0 often provides good results but at the cost of performance.

Methods

    [Obsolete("GetDisplayToLens is deprecated. Use the DisplayToLens property instead.")]
    public float GetDisplayToLens()

Getter for DisplayToLens

    [Obsolete("GetDisplayWidth is deprecated. Use the DisplayWidth property instead.")]
    public float GetDisplayWidth()

Getter for DisplayWidth

    [Obsolete("GetEyeHeight is deprecated. Use the EyeHeight property instead.")]
    public float GetEyeHeight()

Getter for EyeHeight

    [Obsolete("GetIod is deprecated. Use the Iod property instead.")]
    public float GetIod()

Getter for Iod

    [Obsolete("GetK1 is deprecated. Use the K1 property instead.")]
    public float GetK1()

Getter for K1

    [Obsolete("GetK2 is deprecated. Use the K2 property instead.")]
    public float GetK2()

Getter for K1

    [Obsolete("GetOversample is deprecated. Use the Oversample property instead.")]
    public float GetOversample()

Getter for Oversample

    [Obsolete("SetDisplayToLens is deprecated. Use the DisplayToLens property instead.")]
    public void SetDisplayToLens(float displayToLens)

Setter for DisplayToLens

    [Obsolete("SetDisplayWidth is deprecated. Use the DisplayWidth property instead.")]
    public void SetDisplayWidth(float displayWidth)

Setter for DisplayWidth

    [Obsolete("SetEyeHeight is deprecated. Use the EyeHeight property instead.")]
    public void SetEyeHeight(float eyeHeight)

Setter for EyeHeight

    [Obsolete("SetIod is deprecated. Use the Iod property instead.")]
    public void SetIod(float iod)

Setter for Iod

    [Obsolete("SetK1 is deprecated. Use the K1 property instead.")]
    public void SetK1(float k)

Setter for K1

    [Obsolete("SetK2 is deprecated. Use the K2 property instead.")]
    public void SetK2(float k)

Setter for K1

    [Obsolete("SetOversample is deprecated. Use the Oversample property instead.")]
    public void SetOversample(float oversample)

Setter for Oversample

Tags: