class_xrinterfaceextension.rst 52 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557
  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/4.1/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/4.1/doc/classes/XRInterfaceExtension.xml.
  6. .. _class_XRInterfaceExtension:
  7. XRInterfaceExtension
  8. ====================
  9. **Inherits:** :ref:`XRInterface<class_XRInterface>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
  10. Base class for XR interface extensions (plugins).
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. External XR interface plugins should inherit from this class.
  15. .. rst-class:: classref-reftable-group
  16. Methods
  17. -------
  18. .. table::
  19. :widths: auto
  20. +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  21. | void | :ref:`_end_frame<class_XRInterfaceExtension_method__end_frame>` **(** **)** |virtual| |
  22. +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  23. | :ref:`bool<class_bool>` | :ref:`_get_anchor_detection_is_enabled<class_XRInterfaceExtension_method__get_anchor_detection_is_enabled>` **(** **)** |virtual| |const| |
  24. +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  25. | :ref:`int<class_int>` | :ref:`_get_camera_feed_id<class_XRInterfaceExtension_method__get_camera_feed_id>` **(** **)** |virtual| |const| |
  26. +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  27. | :ref:`Transform3D<class_Transform3D>` | :ref:`_get_camera_transform<class_XRInterfaceExtension_method__get_camera_transform>` **(** **)** |virtual| |
  28. +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  29. | :ref:`int<class_int>` | :ref:`_get_capabilities<class_XRInterfaceExtension_method__get_capabilities>` **(** **)** |virtual| |const| |
  30. +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  31. | :ref:`RID<class_RID>` | :ref:`_get_color_texture<class_XRInterfaceExtension_method__get_color_texture>` **(** **)** |virtual| |
  32. +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  33. | :ref:`RID<class_RID>` | :ref:`_get_depth_texture<class_XRInterfaceExtension_method__get_depth_texture>` **(** **)** |virtual| |
  34. +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  35. | :ref:`StringName<class_StringName>` | :ref:`_get_name<class_XRInterfaceExtension_method__get_name>` **(** **)** |virtual| |const| |
  36. +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  37. | :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`_get_play_area<class_XRInterfaceExtension_method__get_play_area>` **(** **)** |virtual| |const| |
  38. +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  39. | :ref:`PlayAreaMode<enum_XRInterface_PlayAreaMode>` | :ref:`_get_play_area_mode<class_XRInterfaceExtension_method__get_play_area_mode>` **(** **)** |virtual| |const| |
  40. +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  41. | :ref:`PackedFloat64Array<class_PackedFloat64Array>` | :ref:`_get_projection_for_view<class_XRInterfaceExtension_method__get_projection_for_view>` **(** :ref:`int<class_int>` view, :ref:`float<class_float>` aspect, :ref:`float<class_float>` z_near, :ref:`float<class_float>` z_far **)** |virtual| |
  42. +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  43. | :ref:`Vector2<class_Vector2>` | :ref:`_get_render_target_size<class_XRInterfaceExtension_method__get_render_target_size>` **(** **)** |virtual| |
  44. +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  45. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_suggested_pose_names<class_XRInterfaceExtension_method__get_suggested_pose_names>` **(** :ref:`StringName<class_StringName>` tracker_name **)** |virtual| |const| |
  46. +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  47. | :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_suggested_tracker_names<class_XRInterfaceExtension_method__get_suggested_tracker_names>` **(** **)** |virtual| |const| |
  48. +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  49. | :ref:`Dictionary<class_Dictionary>` | :ref:`_get_system_info<class_XRInterfaceExtension_method__get_system_info>` **(** **)** |virtual| |const| |
  50. +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  51. | :ref:`TrackingStatus<enum_XRInterface_TrackingStatus>` | :ref:`_get_tracking_status<class_XRInterfaceExtension_method__get_tracking_status>` **(** **)** |virtual| |const| |
  52. +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  53. | :ref:`Transform3D<class_Transform3D>` | :ref:`_get_transform_for_view<class_XRInterfaceExtension_method__get_transform_for_view>` **(** :ref:`int<class_int>` view, :ref:`Transform3D<class_Transform3D>` cam_transform **)** |virtual| |
  54. +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  55. | :ref:`RID<class_RID>` | :ref:`_get_velocity_texture<class_XRInterfaceExtension_method__get_velocity_texture>` **(** **)** |virtual| |
  56. +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  57. | :ref:`int<class_int>` | :ref:`_get_view_count<class_XRInterfaceExtension_method__get_view_count>` **(** **)** |virtual| |
  58. +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  59. | :ref:`RID<class_RID>` | :ref:`_get_vrs_texture<class_XRInterfaceExtension_method__get_vrs_texture>` **(** **)** |virtual| |
  60. +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  61. | :ref:`bool<class_bool>` | :ref:`_initialize<class_XRInterfaceExtension_method__initialize>` **(** **)** |virtual| |
  62. +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  63. | :ref:`bool<class_bool>` | :ref:`_is_initialized<class_XRInterfaceExtension_method__is_initialized>` **(** **)** |virtual| |const| |
  64. +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  65. | void | :ref:`_post_draw_viewport<class_XRInterfaceExtension_method__post_draw_viewport>` **(** :ref:`RID<class_RID>` render_target, :ref:`Rect2<class_Rect2>` screen_rect **)** |virtual| |
  66. +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  67. | :ref:`bool<class_bool>` | :ref:`_pre_draw_viewport<class_XRInterfaceExtension_method__pre_draw_viewport>` **(** :ref:`RID<class_RID>` render_target **)** |virtual| |
  68. +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  69. | void | :ref:`_pre_render<class_XRInterfaceExtension_method__pre_render>` **(** **)** |virtual| |
  70. +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  71. | void | :ref:`_process<class_XRInterfaceExtension_method__process>` **(** **)** |virtual| |
  72. +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  73. | void | :ref:`_set_anchor_detection_is_enabled<class_XRInterfaceExtension_method__set_anchor_detection_is_enabled>` **(** :ref:`bool<class_bool>` enabled **)** |virtual| |
  74. +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  75. | :ref:`bool<class_bool>` | :ref:`_set_play_area_mode<class_XRInterfaceExtension_method__set_play_area_mode>` **(** :ref:`PlayAreaMode<enum_XRInterface_PlayAreaMode>` mode **)** |virtual| |const| |
  76. +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  77. | :ref:`bool<class_bool>` | :ref:`_supports_play_area_mode<class_XRInterfaceExtension_method__supports_play_area_mode>` **(** :ref:`PlayAreaMode<enum_XRInterface_PlayAreaMode>` mode **)** |virtual| |const| |
  78. +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  79. | void | :ref:`_trigger_haptic_pulse<class_XRInterfaceExtension_method__trigger_haptic_pulse>` **(** :ref:`String<class_String>` action_name, :ref:`StringName<class_StringName>` tracker_name, :ref:`float<class_float>` frequency, :ref:`float<class_float>` amplitude, :ref:`float<class_float>` duration_sec, :ref:`float<class_float>` delay_sec **)** |virtual| |
  80. +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  81. | void | :ref:`_uninitialize<class_XRInterfaceExtension_method__uninitialize>` **(** **)** |virtual| |
  82. +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  83. | void | :ref:`add_blit<class_XRInterfaceExtension_method_add_blit>` **(** :ref:`RID<class_RID>` render_target, :ref:`Rect2<class_Rect2>` src_rect, :ref:`Rect2i<class_Rect2i>` dst_rect, :ref:`bool<class_bool>` use_layer, :ref:`int<class_int>` layer, :ref:`bool<class_bool>` apply_lens_distortion, :ref:`Vector2<class_Vector2>` eye_center, :ref:`float<class_float>` k1, :ref:`float<class_float>` k2, :ref:`float<class_float>` upscale, :ref:`float<class_float>` aspect_ratio **)** |
  84. +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  85. | :ref:`RID<class_RID>` | :ref:`get_color_texture<class_XRInterfaceExtension_method_get_color_texture>` **(** **)** |
  86. +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  87. | :ref:`RID<class_RID>` | :ref:`get_depth_texture<class_XRInterfaceExtension_method_get_depth_texture>` **(** **)** |
  88. +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  89. | :ref:`RID<class_RID>` | :ref:`get_render_target_texture<class_XRInterfaceExtension_method_get_render_target_texture>` **(** :ref:`RID<class_RID>` render_target **)** |
  90. +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  91. | :ref:`RID<class_RID>` | :ref:`get_velocity_texture<class_XRInterfaceExtension_method_get_velocity_texture>` **(** **)** |
  92. +--------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
  93. .. rst-class:: classref-section-separator
  94. ----
  95. .. rst-class:: classref-descriptions-group
  96. Method Descriptions
  97. -------------------
  98. .. _class_XRInterfaceExtension_method__end_frame:
  99. .. rst-class:: classref-method
  100. void **_end_frame** **(** **)** |virtual|
  101. Called if interface is active and queues have been submitted.
  102. .. rst-class:: classref-item-separator
  103. ----
  104. .. _class_XRInterfaceExtension_method__get_anchor_detection_is_enabled:
  105. .. rst-class:: classref-method
  106. :ref:`bool<class_bool>` **_get_anchor_detection_is_enabled** **(** **)** |virtual| |const|
  107. Return ``true`` if anchor detection is enabled for this interface.
  108. .. rst-class:: classref-item-separator
  109. ----
  110. .. _class_XRInterfaceExtension_method__get_camera_feed_id:
  111. .. rst-class:: classref-method
  112. :ref:`int<class_int>` **_get_camera_feed_id** **(** **)** |virtual| |const|
  113. Returns the camera feed ID for the :ref:`CameraFeed<class_CameraFeed>` registered with the :ref:`CameraServer<class_CameraServer>` that should be presented as the background on an AR capable device (if applicable).
  114. .. rst-class:: classref-item-separator
  115. ----
  116. .. _class_XRInterfaceExtension_method__get_camera_transform:
  117. .. rst-class:: classref-method
  118. :ref:`Transform3D<class_Transform3D>` **_get_camera_transform** **(** **)** |virtual|
  119. Returns the :ref:`Transform3D<class_Transform3D>` that positions the :ref:`XRCamera3D<class_XRCamera3D>` in the world.
  120. .. rst-class:: classref-item-separator
  121. ----
  122. .. _class_XRInterfaceExtension_method__get_capabilities:
  123. .. rst-class:: classref-method
  124. :ref:`int<class_int>` **_get_capabilities** **(** **)** |virtual| |const|
  125. Returns the capabilities of this interface.
  126. .. rst-class:: classref-item-separator
  127. ----
  128. .. _class_XRInterfaceExtension_method__get_color_texture:
  129. .. rst-class:: classref-method
  130. :ref:`RID<class_RID>` **_get_color_texture** **(** **)** |virtual|
  131. Return color texture into which to render (if applicable).
  132. .. rst-class:: classref-item-separator
  133. ----
  134. .. _class_XRInterfaceExtension_method__get_depth_texture:
  135. .. rst-class:: classref-method
  136. :ref:`RID<class_RID>` **_get_depth_texture** **(** **)** |virtual|
  137. Return depth texture into which to render (if applicable).
  138. .. rst-class:: classref-item-separator
  139. ----
  140. .. _class_XRInterfaceExtension_method__get_name:
  141. .. rst-class:: classref-method
  142. :ref:`StringName<class_StringName>` **_get_name** **(** **)** |virtual| |const|
  143. Returns the name of this interface.
  144. .. rst-class:: classref-item-separator
  145. ----
  146. .. _class_XRInterfaceExtension_method__get_play_area:
  147. .. rst-class:: classref-method
  148. :ref:`PackedVector3Array<class_PackedVector3Array>` **_get_play_area** **(** **)** |virtual| |const|
  149. Returns an :ref:`PackedVector3Array<class_PackedVector3Array>` that denotes the play areas boundaries (if applicable).
  150. .. rst-class:: classref-item-separator
  151. ----
  152. .. _class_XRInterfaceExtension_method__get_play_area_mode:
  153. .. rst-class:: classref-method
  154. :ref:`PlayAreaMode<enum_XRInterface_PlayAreaMode>` **_get_play_area_mode** **(** **)** |virtual| |const|
  155. Returns the :ref:`PlayAreaMode<enum_XRInterface_PlayAreaMode>` that sets up our play area.
  156. .. rst-class:: classref-item-separator
  157. ----
  158. .. _class_XRInterfaceExtension_method__get_projection_for_view:
  159. .. rst-class:: classref-method
  160. :ref:`PackedFloat64Array<class_PackedFloat64Array>` **_get_projection_for_view** **(** :ref:`int<class_int>` view, :ref:`float<class_float>` aspect, :ref:`float<class_float>` z_near, :ref:`float<class_float>` z_far **)** |virtual|
  161. Returns the projection matrix for the given view as a :ref:`PackedFloat64Array<class_PackedFloat64Array>`.
  162. .. rst-class:: classref-item-separator
  163. ----
  164. .. _class_XRInterfaceExtension_method__get_render_target_size:
  165. .. rst-class:: classref-method
  166. :ref:`Vector2<class_Vector2>` **_get_render_target_size** **(** **)** |virtual|
  167. Returns the size of our render target for this interface, this overrides the size of the :ref:`Viewport<class_Viewport>` marked as the xr viewport.
  168. .. rst-class:: classref-item-separator
  169. ----
  170. .. _class_XRInterfaceExtension_method__get_suggested_pose_names:
  171. .. rst-class:: classref-method
  172. :ref:`PackedStringArray<class_PackedStringArray>` **_get_suggested_pose_names** **(** :ref:`StringName<class_StringName>` tracker_name **)** |virtual| |const|
  173. Returns a :ref:`PackedStringArray<class_PackedStringArray>` with pose names configured by this interface. Note that user configuration can override this list.
  174. .. rst-class:: classref-item-separator
  175. ----
  176. .. _class_XRInterfaceExtension_method__get_suggested_tracker_names:
  177. .. rst-class:: classref-method
  178. :ref:`PackedStringArray<class_PackedStringArray>` **_get_suggested_tracker_names** **(** **)** |virtual| |const|
  179. Returns a :ref:`PackedStringArray<class_PackedStringArray>` with tracker names configured by this interface. Note that user configuration can override this list.
  180. .. rst-class:: classref-item-separator
  181. ----
  182. .. _class_XRInterfaceExtension_method__get_system_info:
  183. .. rst-class:: classref-method
  184. :ref:`Dictionary<class_Dictionary>` **_get_system_info** **(** **)** |virtual| |const|
  185. Returns a :ref:`Dictionary<class_Dictionary>` with system informationr elated to this interface.
  186. .. rst-class:: classref-item-separator
  187. ----
  188. .. _class_XRInterfaceExtension_method__get_tracking_status:
  189. .. rst-class:: classref-method
  190. :ref:`TrackingStatus<enum_XRInterface_TrackingStatus>` **_get_tracking_status** **(** **)** |virtual| |const|
  191. Returns a :ref:`TrackingStatus<enum_XRInterface_TrackingStatus>` specifying the current status of our tracking.
  192. .. rst-class:: classref-item-separator
  193. ----
  194. .. _class_XRInterfaceExtension_method__get_transform_for_view:
  195. .. rst-class:: classref-method
  196. :ref:`Transform3D<class_Transform3D>` **_get_transform_for_view** **(** :ref:`int<class_int>` view, :ref:`Transform3D<class_Transform3D>` cam_transform **)** |virtual|
  197. Returns a :ref:`Transform3D<class_Transform3D>` for a given view.
  198. .. rst-class:: classref-item-separator
  199. ----
  200. .. _class_XRInterfaceExtension_method__get_velocity_texture:
  201. .. rst-class:: classref-method
  202. :ref:`RID<class_RID>` **_get_velocity_texture** **(** **)** |virtual|
  203. Return velocity texture into which to render (if applicable).
  204. .. rst-class:: classref-item-separator
  205. ----
  206. .. _class_XRInterfaceExtension_method__get_view_count:
  207. .. rst-class:: classref-method
  208. :ref:`int<class_int>` **_get_view_count** **(** **)** |virtual|
  209. Returns the number of views this interface requires, 1 for mono, 2 for stereoscopic.
  210. .. rst-class:: classref-item-separator
  211. ----
  212. .. _class_XRInterfaceExtension_method__get_vrs_texture:
  213. .. rst-class:: classref-method
  214. :ref:`RID<class_RID>` **_get_vrs_texture** **(** **)** |virtual|
  215. .. container:: contribute
  216. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  217. .. rst-class:: classref-item-separator
  218. ----
  219. .. _class_XRInterfaceExtension_method__initialize:
  220. .. rst-class:: classref-method
  221. :ref:`bool<class_bool>` **_initialize** **(** **)** |virtual|
  222. Initializes the interface, returns ``true`` on success.
  223. .. rst-class:: classref-item-separator
  224. ----
  225. .. _class_XRInterfaceExtension_method__is_initialized:
  226. .. rst-class:: classref-method
  227. :ref:`bool<class_bool>` **_is_initialized** **(** **)** |virtual| |const|
  228. Returns ``true`` if this interface has been initialized.
  229. .. rst-class:: classref-item-separator
  230. ----
  231. .. _class_XRInterfaceExtension_method__post_draw_viewport:
  232. .. rst-class:: classref-method
  233. void **_post_draw_viewport** **(** :ref:`RID<class_RID>` render_target, :ref:`Rect2<class_Rect2>` screen_rect **)** |virtual|
  234. Called after the XR :ref:`Viewport<class_Viewport>` draw logic has completed.
  235. .. rst-class:: classref-item-separator
  236. ----
  237. .. _class_XRInterfaceExtension_method__pre_draw_viewport:
  238. .. rst-class:: classref-method
  239. :ref:`bool<class_bool>` **_pre_draw_viewport** **(** :ref:`RID<class_RID>` render_target **)** |virtual|
  240. Called if this is our primary **XRInterfaceExtension** before we start processing a :ref:`Viewport<class_Viewport>` for every active XR :ref:`Viewport<class_Viewport>`, returns ``true`` if that viewport should be rendered. An XR interface may return ``false`` if the user has taken off their headset and we can pause rendering.
  241. .. rst-class:: classref-item-separator
  242. ----
  243. .. _class_XRInterfaceExtension_method__pre_render:
  244. .. rst-class:: classref-method
  245. void **_pre_render** **(** **)** |virtual|
  246. Called if this **XRInterfaceExtension** is active before rendering starts. Most XR interfaces will sync tracking at this point in time.
  247. .. rst-class:: classref-item-separator
  248. ----
  249. .. _class_XRInterfaceExtension_method__process:
  250. .. rst-class:: classref-method
  251. void **_process** **(** **)** |virtual|
  252. Called if this **XRInterfaceExtension** is active before our physics and game process is called. Most XR interfaces will update its :ref:`XRPositionalTracker<class_XRPositionalTracker>`\ s at this point in time.
  253. .. rst-class:: classref-item-separator
  254. ----
  255. .. _class_XRInterfaceExtension_method__set_anchor_detection_is_enabled:
  256. .. rst-class:: classref-method
  257. void **_set_anchor_detection_is_enabled** **(** :ref:`bool<class_bool>` enabled **)** |virtual|
  258. Enables anchor detection on this interface if supported.
  259. .. rst-class:: classref-item-separator
  260. ----
  261. .. _class_XRInterfaceExtension_method__set_play_area_mode:
  262. .. rst-class:: classref-method
  263. :ref:`bool<class_bool>` **_set_play_area_mode** **(** :ref:`PlayAreaMode<enum_XRInterface_PlayAreaMode>` mode **)** |virtual| |const|
  264. Set the play area mode for this interface.
  265. .. rst-class:: classref-item-separator
  266. ----
  267. .. _class_XRInterfaceExtension_method__supports_play_area_mode:
  268. .. rst-class:: classref-method
  269. :ref:`bool<class_bool>` **_supports_play_area_mode** **(** :ref:`PlayAreaMode<enum_XRInterface_PlayAreaMode>` mode **)** |virtual| |const|
  270. Returns ``true`` if this interface supports this play area mode.
  271. .. rst-class:: classref-item-separator
  272. ----
  273. .. _class_XRInterfaceExtension_method__trigger_haptic_pulse:
  274. .. rst-class:: classref-method
  275. void **_trigger_haptic_pulse** **(** :ref:`String<class_String>` action_name, :ref:`StringName<class_StringName>` tracker_name, :ref:`float<class_float>` frequency, :ref:`float<class_float>` amplitude, :ref:`float<class_float>` duration_sec, :ref:`float<class_float>` delay_sec **)** |virtual|
  276. Triggers a haptic pulse to be emitted on the specified tracker.
  277. .. rst-class:: classref-item-separator
  278. ----
  279. .. _class_XRInterfaceExtension_method__uninitialize:
  280. .. rst-class:: classref-method
  281. void **_uninitialize** **(** **)** |virtual|
  282. Uninitialize the interface.
  283. .. rst-class:: classref-item-separator
  284. ----
  285. .. _class_XRInterfaceExtension_method_add_blit:
  286. .. rst-class:: classref-method
  287. void **add_blit** **(** :ref:`RID<class_RID>` render_target, :ref:`Rect2<class_Rect2>` src_rect, :ref:`Rect2i<class_Rect2i>` dst_rect, :ref:`bool<class_bool>` use_layer, :ref:`int<class_int>` layer, :ref:`bool<class_bool>` apply_lens_distortion, :ref:`Vector2<class_Vector2>` eye_center, :ref:`float<class_float>` k1, :ref:`float<class_float>` k2, :ref:`float<class_float>` upscale, :ref:`float<class_float>` aspect_ratio **)**
  288. Blits our render results to screen optionally applying lens distortion. This can only be called while processing ``_commit_views``.
  289. .. rst-class:: classref-item-separator
  290. ----
  291. .. _class_XRInterfaceExtension_method_get_color_texture:
  292. .. rst-class:: classref-method
  293. :ref:`RID<class_RID>` **get_color_texture** **(** **)**
  294. .. container:: contribute
  295. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  296. .. rst-class:: classref-item-separator
  297. ----
  298. .. _class_XRInterfaceExtension_method_get_depth_texture:
  299. .. rst-class:: classref-method
  300. :ref:`RID<class_RID>` **get_depth_texture** **(** **)**
  301. .. container:: contribute
  302. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  303. .. rst-class:: classref-item-separator
  304. ----
  305. .. _class_XRInterfaceExtension_method_get_render_target_texture:
  306. .. rst-class:: classref-method
  307. :ref:`RID<class_RID>` **get_render_target_texture** **(** :ref:`RID<class_RID>` render_target **)**
  308. Returns a valid :ref:`RID<class_RID>` for a texture to which we should render the current frame if supported by the interface.
  309. .. rst-class:: classref-item-separator
  310. ----
  311. .. _class_XRInterfaceExtension_method_get_velocity_texture:
  312. .. rst-class:: classref-method
  313. :ref:`RID<class_RID>` **get_velocity_texture** **(** **)**
  314. .. container:: contribute
  315. There is currently no description for this method. Please help us by :ref:`contributing one <doc_updating_the_class_reference>`!
  316. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  317. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  318. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  319. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  320. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  321. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  322. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`