MobileVRInterface

Generic mobile VR implementation.

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:

More...

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Functions

getDisplayToLens
double getDisplayToLens()
getDisplayWidth
double getDisplayWidth()
getEyeHeight
double getEyeHeight()
getIod
double getIod()
getK1
double getK1()
getK2
double getK2()
getOversample
double getOversample()
opAssign
typeof(null) opAssign(typeof(null) n)
opEquals
bool opEquals(MobileVRInterface other)
opEquals
bool opEquals(typeof(null) n)
setDisplayToLens
void setDisplayToLens(double display_to_lens)
setDisplayWidth
void setDisplayWidth(double display_width)
setEyeHeight
void setEyeHeight(double eye_height)
setIod
void setIod(double iod)
setK1
void setK1(double k)
setK2
void setK2(double k)
setOversample
void setOversample(double oversample)
toHash
size_t toHash()

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

displayToLens
double displayToLens [@property getter]
double displayToLens [@property setter]

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

displayWidth
double displayWidth [@property getter]
double displayWidth [@property setter]

The width of the display in centimeters.

eyeHeight
double eyeHeight [@property getter]
double eyeHeight [@property setter]

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

iod
double iod [@property getter]
double iod [@property setter]

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

k1
double k1 [@property getter]
double k1 [@property setter]

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.

k2
double k2 [@property getter]
double k2 [@property setter]

The k2 lens factor, see k1.

oversample
double oversample [@property getter]
double oversample [@property setter]

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.

Static functions

_new
MobileVRInterface _new()

Construct a new instance of MobileVRInterface. Note: use memnew!MobileVRInterface instead.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

GDNativeClassBinding
struct GDNativeClassBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(To) as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
inout(ToRef) as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Detailed Description

var interface = ARVRServer.find_interface("Native mobile") if interface and interface.initialize(): get_viewport().arvr = true

Meta