class_mobilevrinterface.rst 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the MobileVRInterface.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_MobileVRInterface:
  5. MobileVRInterface
  6. =================
  7. **Inherits:** :ref:`ARVRInterface<class_arvrinterface>` **<** :ref:`Reference<class_reference>` **<** :ref:`Object<class_object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Generic mobile VR implementation
  12. Member Functions
  13. ----------------
  14. +----------------------------+---------------------------------------------------------------------------------------------------------------------------------+
  15. | :ref:`float<class_float>` | :ref:`get_display_to_lens<class_MobileVRInterface_get_display_to_lens>` **(** **)** const |
  16. +----------------------------+---------------------------------------------------------------------------------------------------------------------------------+
  17. | :ref:`float<class_float>` | :ref:`get_display_width<class_MobileVRInterface_get_display_width>` **(** **)** const |
  18. +----------------------------+---------------------------------------------------------------------------------------------------------------------------------+
  19. | :ref:`float<class_float>` | :ref:`get_iod<class_MobileVRInterface_get_iod>` **(** **)** const |
  20. +----------------------------+---------------------------------------------------------------------------------------------------------------------------------+
  21. | :ref:`float<class_float>` | :ref:`get_k1<class_MobileVRInterface_get_k1>` **(** **)** const |
  22. +----------------------------+---------------------------------------------------------------------------------------------------------------------------------+
  23. | :ref:`float<class_float>` | :ref:`get_k2<class_MobileVRInterface_get_k2>` **(** **)** const |
  24. +----------------------------+---------------------------------------------------------------------------------------------------------------------------------+
  25. | :ref:`float<class_float>` | :ref:`get_oversample<class_MobileVRInterface_get_oversample>` **(** **)** const |
  26. +----------------------------+---------------------------------------------------------------------------------------------------------------------------------+
  27. | void | :ref:`set_display_to_lens<class_MobileVRInterface_set_display_to_lens>` **(** :ref:`float<class_float>` display_to_lens **)** |
  28. +----------------------------+---------------------------------------------------------------------------------------------------------------------------------+
  29. | void | :ref:`set_display_width<class_MobileVRInterface_set_display_width>` **(** :ref:`float<class_float>` display_width **)** |
  30. +----------------------------+---------------------------------------------------------------------------------------------------------------------------------+
  31. | void | :ref:`set_iod<class_MobileVRInterface_set_iod>` **(** :ref:`float<class_float>` iod **)** |
  32. +----------------------------+---------------------------------------------------------------------------------------------------------------------------------+
  33. | void | :ref:`set_k1<class_MobileVRInterface_set_k1>` **(** :ref:`float<class_float>` k **)** |
  34. +----------------------------+---------------------------------------------------------------------------------------------------------------------------------+
  35. | void | :ref:`set_k2<class_MobileVRInterface_set_k2>` **(** :ref:`float<class_float>` k **)** |
  36. +----------------------------+---------------------------------------------------------------------------------------------------------------------------------+
  37. | void | :ref:`set_oversample<class_MobileVRInterface_set_oversample>` **(** :ref:`float<class_float>` oversample **)** |
  38. +----------------------------+---------------------------------------------------------------------------------------------------------------------------------+
  39. Member Variables
  40. ----------------
  41. - :ref:`float<class_float>` **display_to_lens** - The distance between the display and the lenses inside of the device in centimeters.
  42. - :ref:`float<class_float>` **display_width** - The width of the display in centimeters.
  43. - :ref:`float<class_float>` **iod** - The interocular distance, also known as the interpupillary distance. The distance between the pupils of the left and right eye.
  44. - :ref:`float<class_float>` **k1** - 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.
  45. - :ref:`float<class_float>` **k2** - The k2 lens factor, see k1.
  46. - :ref:`float<class_float>` **oversample** - 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.
  47. Description
  48. -----------
  49. 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 do need a mobile phone with a gyroscope and accelerometer.
  50. Note that even though there is no positional tracking the camera will assume the headset is at a height of 1.85 meters.
  51. Member Function Description
  52. ---------------------------
  53. .. _class_MobileVRInterface_get_display_to_lens:
  54. - :ref:`float<class_float>` **get_display_to_lens** **(** **)** const
  55. Returns the distance between the display and the lens.
  56. .. _class_MobileVRInterface_get_display_width:
  57. - :ref:`float<class_float>` **get_display_width** **(** **)** const
  58. Return the width of the LCD screen of the device.
  59. .. _class_MobileVRInterface_get_iod:
  60. - :ref:`float<class_float>` **get_iod** **(** **)** const
  61. Returns the interocular distance.
  62. .. _class_MobileVRInterface_get_k1:
  63. - :ref:`float<class_float>` **get_k1** **(** **)** const
  64. Returns the k1 lens constant.
  65. .. _class_MobileVRInterface_get_k2:
  66. - :ref:`float<class_float>` **get_k2** **(** **)** const
  67. Retuns the k2 lens constant
  68. .. _class_MobileVRInterface_get_oversample:
  69. - :ref:`float<class_float>` **get_oversample** **(** **)** const
  70. Returns the oversampling setting.
  71. .. _class_MobileVRInterface_set_display_to_lens:
  72. - void **set_display_to_lens** **(** :ref:`float<class_float>` display_to_lens **)**
  73. Sets the distance between display and the lens.
  74. .. _class_MobileVRInterface_set_display_width:
  75. - void **set_display_width** **(** :ref:`float<class_float>` display_width **)**
  76. Sets the width of the LCD screen of the device.
  77. .. _class_MobileVRInterface_set_iod:
  78. - void **set_iod** **(** :ref:`float<class_float>` iod **)**
  79. Sets the interocular distance.
  80. .. _class_MobileVRInterface_set_k1:
  81. - void **set_k1** **(** :ref:`float<class_float>` k **)**
  82. Sets the k1 lens constant.
  83. .. _class_MobileVRInterface_set_k2:
  84. - void **set_k2** **(** :ref:`float<class_float>` k **)**
  85. Sets the k2 lens constant.
  86. .. _class_MobileVRInterface_set_oversample:
  87. - void **set_oversample** **(** :ref:`float<class_float>` oversample **)**
  88. Sets the oversampling setting.