class_mobilevrinterface.rst 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/3.6/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/3.6/modules/mobile_vr/doc_classes/MobileVRInterface.xml.
  6. .. _class_MobileVRInterface:
  7. MobileVRInterface
  8. =================
  9. **Inherits:** :ref:`ARVRInterface<class_ARVRInterface>` **<** :ref:`Reference<class_Reference>` **<** :ref:`Object<class_Object>`
  10. Generic mobile VR implementation.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. 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.
  15. 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 :ref:`eye_height<class_MobileVRInterface_property_eye_height>`.
  16. You can initialise this interface as follows:
  17. ::
  18. var interface = ARVRServer.find_interface("Native mobile")
  19. if interface and interface.initialize():
  20. get_viewport().arvr = true
  21. .. rst-class:: classref-reftable-group
  22. Properties
  23. ----------
  24. .. table::
  25. :widths: auto
  26. +---------------------------+--------------------------------------------------------------------------+-----------+
  27. | :ref:`float<class_float>` | :ref:`display_to_lens<class_MobileVRInterface_property_display_to_lens>` | ``4.0`` |
  28. +---------------------------+--------------------------------------------------------------------------+-----------+
  29. | :ref:`float<class_float>` | :ref:`display_width<class_MobileVRInterface_property_display_width>` | ``14.5`` |
  30. +---------------------------+--------------------------------------------------------------------------+-----------+
  31. | :ref:`float<class_float>` | :ref:`eye_height<class_MobileVRInterface_property_eye_height>` | ``1.85`` |
  32. +---------------------------+--------------------------------------------------------------------------+-----------+
  33. | :ref:`float<class_float>` | :ref:`iod<class_MobileVRInterface_property_iod>` | ``6.0`` |
  34. +---------------------------+--------------------------------------------------------------------------+-----------+
  35. | :ref:`float<class_float>` | :ref:`k1<class_MobileVRInterface_property_k1>` | ``0.215`` |
  36. +---------------------------+--------------------------------------------------------------------------+-----------+
  37. | :ref:`float<class_float>` | :ref:`k2<class_MobileVRInterface_property_k2>` | ``0.215`` |
  38. +---------------------------+--------------------------------------------------------------------------+-----------+
  39. | :ref:`float<class_float>` | :ref:`oversample<class_MobileVRInterface_property_oversample>` | ``1.5`` |
  40. +---------------------------+--------------------------------------------------------------------------+-----------+
  41. .. rst-class:: classref-section-separator
  42. ----
  43. .. rst-class:: classref-descriptions-group
  44. Property Descriptions
  45. ---------------------
  46. .. _class_MobileVRInterface_property_display_to_lens:
  47. .. rst-class:: classref-property
  48. :ref:`float<class_float>` **display_to_lens** = ``4.0``
  49. .. rst-class:: classref-property-setget
  50. - void **set_display_to_lens** **(** :ref:`float<class_float>` value **)**
  51. - :ref:`float<class_float>` **get_display_to_lens** **(** **)**
  52. The distance between the display and the lenses inside of the device in centimeters.
  53. .. rst-class:: classref-item-separator
  54. ----
  55. .. _class_MobileVRInterface_property_display_width:
  56. .. rst-class:: classref-property
  57. :ref:`float<class_float>` **display_width** = ``14.5``
  58. .. rst-class:: classref-property-setget
  59. - void **set_display_width** **(** :ref:`float<class_float>` value **)**
  60. - :ref:`float<class_float>` **get_display_width** **(** **)**
  61. The width of the display in centimeters.
  62. .. rst-class:: classref-item-separator
  63. ----
  64. .. _class_MobileVRInterface_property_eye_height:
  65. .. rst-class:: classref-property
  66. :ref:`float<class_float>` **eye_height** = ``1.85``
  67. .. rst-class:: classref-property-setget
  68. - void **set_eye_height** **(** :ref:`float<class_float>` value **)**
  69. - :ref:`float<class_float>` **get_eye_height** **(** **)**
  70. The height at which the camera is placed in relation to the ground (i.e. :ref:`ARVROrigin<class_ARVROrigin>` node).
  71. .. rst-class:: classref-item-separator
  72. ----
  73. .. _class_MobileVRInterface_property_iod:
  74. .. rst-class:: classref-property
  75. :ref:`float<class_float>` **iod** = ``6.0``
  76. .. rst-class:: classref-property-setget
  77. - void **set_iod** **(** :ref:`float<class_float>` value **)**
  78. - :ref:`float<class_float>` **get_iod** **(** **)**
  79. The interocular distance, also known as the interpupillary distance. The distance between the pupils of the left and right eye.
  80. .. rst-class:: classref-item-separator
  81. ----
  82. .. _class_MobileVRInterface_property_k1:
  83. .. rst-class:: classref-property
  84. :ref:`float<class_float>` **k1** = ``0.215``
  85. .. rst-class:: classref-property-setget
  86. - void **set_k1** **(** :ref:`float<class_float>` value **)**
  87. - :ref:`float<class_float>` **get_k1** **(** **)**
  88. 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.
  89. .. rst-class:: classref-item-separator
  90. ----
  91. .. _class_MobileVRInterface_property_k2:
  92. .. rst-class:: classref-property
  93. :ref:`float<class_float>` **k2** = ``0.215``
  94. .. rst-class:: classref-property-setget
  95. - void **set_k2** **(** :ref:`float<class_float>` value **)**
  96. - :ref:`float<class_float>` **get_k2** **(** **)**
  97. The k2 lens factor, see k1.
  98. .. rst-class:: classref-item-separator
  99. ----
  100. .. _class_MobileVRInterface_property_oversample:
  101. .. rst-class:: classref-property
  102. :ref:`float<class_float>` **oversample** = ``1.5``
  103. .. rst-class:: classref-property-setget
  104. - void **set_oversample** **(** :ref:`float<class_float>` value **)**
  105. - :ref:`float<class_float>` **get_oversample** **(** **)**
  106. 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.
  107. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  108. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  109. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  110. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`