mirror of
https://github.com/godotengine/godot-docs-l10n.git
synced 2026-01-05 14:10:19 +03:00
This reverts commit 57781dc0bc.
The rename, although in line with what we did in the engine, caused problems with RTD we need to fix (or push for a fix) first.
576 lines
58 KiB
ReStructuredText
576 lines
58 KiB
ReStructuredText
:github_url: hide
|
||
|
||
.. _class_XRInterfaceExtension:
|
||
|
||
XRInterfaceExtension
|
||
====================
|
||
|
||
**繼承:** :ref:`XRInterface<class_XRInterface>` **<** :ref:`RefCounted<class_RefCounted>` **<** :ref:`Object<class_Object>`
|
||
|
||
XR 介面擴充(外掛程式)的基底類別。
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
說明
|
||
----
|
||
|
||
外部 XR 介面外掛程式應繼承自這個類。
|
||
|
||
.. rst-class:: classref-introduction-group
|
||
|
||
教學
|
||
----
|
||
|
||
- :doc:`XR 文件索引 <../tutorials/xr/index>`
|
||
|
||
.. rst-class:: classref-reftable-group
|
||
|
||
方法
|
||
----
|
||
|
||
.. table::
|
||
:widths: auto
|
||
|
||
+------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`_end_frame<class_XRInterfaceExtension_private_method__end_frame>`\ (\ ) |virtual| |
|
||
+------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`_get_anchor_detection_is_enabled<class_XRInterfaceExtension_private_method__get_anchor_detection_is_enabled>`\ (\ ) |virtual| |const| |
|
||
+------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`_get_camera_feed_id<class_XRInterfaceExtension_private_method__get_camera_feed_id>`\ (\ ) |virtual| |const| |
|
||
+------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Transform3D<class_Transform3D>` | :ref:`_get_camera_transform<class_XRInterfaceExtension_private_method__get_camera_transform>`\ (\ ) |virtual| |
|
||
+------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`_get_capabilities<class_XRInterfaceExtension_private_method__get_capabilities>`\ (\ ) |virtual| |const| |
|
||
+------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`RID<class_RID>` | :ref:`_get_color_texture<class_XRInterfaceExtension_private_method__get_color_texture>`\ (\ ) |virtual| |
|
||
+------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`RID<class_RID>` | :ref:`_get_depth_texture<class_XRInterfaceExtension_private_method__get_depth_texture>`\ (\ ) |virtual| |
|
||
+------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`StringName<class_StringName>` | :ref:`_get_name<class_XRInterfaceExtension_private_method__get_name>`\ (\ ) |virtual| |const| |
|
||
+------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`PackedVector3Array<class_PackedVector3Array>` | :ref:`_get_play_area<class_XRInterfaceExtension_private_method__get_play_area>`\ (\ ) |virtual| |const| |
|
||
+------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`PlayAreaMode<enum_XRInterface_PlayAreaMode>` | :ref:`_get_play_area_mode<class_XRInterfaceExtension_private_method__get_play_area_mode>`\ (\ ) |virtual| |const| |
|
||
+------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`PackedFloat64Array<class_PackedFloat64Array>` | :ref:`_get_projection_for_view<class_XRInterfaceExtension_private_method__get_projection_for_view>`\ (\ view\: :ref:`int<class_int>`, aspect\: :ref:`float<class_float>`, z_near\: :ref:`float<class_float>`, z_far\: :ref:`float<class_float>`\ ) |virtual| |
|
||
+------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Vector2<class_Vector2>` | :ref:`_get_render_target_size<class_XRInterfaceExtension_private_method__get_render_target_size>`\ (\ ) |virtual| |
|
||
+------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_suggested_pose_names<class_XRInterfaceExtension_private_method__get_suggested_pose_names>`\ (\ tracker_name\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| |
|
||
+------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`PackedStringArray<class_PackedStringArray>` | :ref:`_get_suggested_tracker_names<class_XRInterfaceExtension_private_method__get_suggested_tracker_names>`\ (\ ) |virtual| |const| |
|
||
+------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Dictionary<class_Dictionary>` | :ref:`_get_system_info<class_XRInterfaceExtension_private_method__get_system_info>`\ (\ ) |virtual| |const| |
|
||
+------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`TrackingStatus<enum_XRInterface_TrackingStatus>` | :ref:`_get_tracking_status<class_XRInterfaceExtension_private_method__get_tracking_status>`\ (\ ) |virtual| |const| |
|
||
+------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`Transform3D<class_Transform3D>` | :ref:`_get_transform_for_view<class_XRInterfaceExtension_private_method__get_transform_for_view>`\ (\ view\: :ref:`int<class_int>`, cam_transform\: :ref:`Transform3D<class_Transform3D>`\ ) |virtual| |
|
||
+------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`RID<class_RID>` | :ref:`_get_velocity_texture<class_XRInterfaceExtension_private_method__get_velocity_texture>`\ (\ ) |virtual| |
|
||
+------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`int<class_int>` | :ref:`_get_view_count<class_XRInterfaceExtension_private_method__get_view_count>`\ (\ ) |virtual| |
|
||
+------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`RID<class_RID>` | :ref:`_get_vrs_texture<class_XRInterfaceExtension_private_method__get_vrs_texture>`\ (\ ) |virtual| |
|
||
+------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`VRSTextureFormat<enum_XRInterface_VRSTextureFormat>` | :ref:`_get_vrs_texture_format<class_XRInterfaceExtension_private_method__get_vrs_texture_format>`\ (\ ) |virtual| |
|
||
+------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`_initialize<class_XRInterfaceExtension_private_method__initialize>`\ (\ ) |virtual| |
|
||
+------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`_is_initialized<class_XRInterfaceExtension_private_method__is_initialized>`\ (\ ) |virtual| |const| |
|
||
+------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`_post_draw_viewport<class_XRInterfaceExtension_private_method__post_draw_viewport>`\ (\ render_target\: :ref:`RID<class_RID>`, screen_rect\: :ref:`Rect2<class_Rect2>`\ ) |virtual| |
|
||
+------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`_pre_draw_viewport<class_XRInterfaceExtension_private_method__pre_draw_viewport>`\ (\ render_target\: :ref:`RID<class_RID>`\ ) |virtual| |
|
||
+------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`_pre_render<class_XRInterfaceExtension_private_method__pre_render>`\ (\ ) |virtual| |
|
||
+------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`_process<class_XRInterfaceExtension_private_method__process>`\ (\ ) |virtual| |
|
||
+------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`_set_anchor_detection_is_enabled<class_XRInterfaceExtension_private_method__set_anchor_detection_is_enabled>`\ (\ enabled\: :ref:`bool<class_bool>`\ ) |virtual| |
|
||
+------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`_set_play_area_mode<class_XRInterfaceExtension_private_method__set_play_area_mode>`\ (\ mode\: :ref:`PlayAreaMode<enum_XRInterface_PlayAreaMode>`\ ) |virtual| |const| |
|
||
+------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`bool<class_bool>` | :ref:`_supports_play_area_mode<class_XRInterfaceExtension_private_method__supports_play_area_mode>`\ (\ mode\: :ref:`PlayAreaMode<enum_XRInterface_PlayAreaMode>`\ ) |virtual| |const| |
|
||
+------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`_trigger_haptic_pulse<class_XRInterfaceExtension_private_method__trigger_haptic_pulse>`\ (\ action_name\: :ref:`String<class_String>`, tracker_name\: :ref:`StringName<class_StringName>`, frequency\: :ref:`float<class_float>`, amplitude\: :ref:`float<class_float>`, duration_sec\: :ref:`float<class_float>`, delay_sec\: :ref:`float<class_float>`\ ) |virtual| |
|
||
+------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`_uninitialize<class_XRInterfaceExtension_private_method__uninitialize>`\ (\ ) |virtual| |
|
||
+------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| |void| | :ref:`add_blit<class_XRInterfaceExtension_method_add_blit>`\ (\ render_target\: :ref:`RID<class_RID>`, src_rect\: :ref:`Rect2<class_Rect2>`, dst_rect\: :ref:`Rect2i<class_Rect2i>`, use_layer\: :ref:`bool<class_bool>`, layer\: :ref:`int<class_int>`, apply_lens_distortion\: :ref:`bool<class_bool>`, eye_center\: :ref:`Vector2<class_Vector2>`, k1\: :ref:`float<class_float>`, k2\: :ref:`float<class_float>`, upscale\: :ref:`float<class_float>`, aspect_ratio\: :ref:`float<class_float>`\ ) |
|
||
+------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`RID<class_RID>` | :ref:`get_color_texture<class_XRInterfaceExtension_method_get_color_texture>`\ (\ ) |
|
||
+------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`RID<class_RID>` | :ref:`get_depth_texture<class_XRInterfaceExtension_method_get_depth_texture>`\ (\ ) |
|
||
+------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`RID<class_RID>` | :ref:`get_render_target_texture<class_XRInterfaceExtension_method_get_render_target_texture>`\ (\ render_target\: :ref:`RID<class_RID>`\ ) |
|
||
+------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
| :ref:`RID<class_RID>` | :ref:`get_velocity_texture<class_XRInterfaceExtension_method_get_velocity_texture>`\ (\ ) |
|
||
+------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
|
||
|
||
.. rst-class:: classref-section-separator
|
||
|
||
----
|
||
|
||
.. rst-class:: classref-descriptions-group
|
||
|
||
方法說明
|
||
--------
|
||
|
||
.. _class_XRInterfaceExtension_private_method__end_frame:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **_end_frame**\ (\ ) |virtual| :ref:`🔗<class_XRInterfaceExtension_private_method__end_frame>`
|
||
|
||
如果該介面處於活動狀態,並且已提交佇列,則呼叫此方法。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_XRInterfaceExtension_private_method__get_anchor_detection_is_enabled:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **_get_anchor_detection_is_enabled**\ (\ ) |virtual| |const| :ref:`🔗<class_XRInterfaceExtension_private_method__get_anchor_detection_is_enabled>`
|
||
|
||
如果此介面啟用了錨點偵測,則返回 ``true``\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_XRInterfaceExtension_private_method__get_camera_feed_id:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **_get_camera_feed_id**\ (\ ) |virtual| |const| :ref:`🔗<class_XRInterfaceExtension_private_method__get_camera_feed_id>`
|
||
|
||
返回在 :ref:`CameraServer<class_CameraServer>` 上註冊的 :ref:`CameraFeed<class_CameraFeed>` 的相機源 ID,該 ID 應在支援 AR 的裝置(如果適用)上顯示為背景。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_XRInterfaceExtension_private_method__get_camera_transform:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Transform3D<class_Transform3D>` **_get_camera_transform**\ (\ ) |virtual| :ref:`🔗<class_XRInterfaceExtension_private_method__get_camera_transform>`
|
||
|
||
返回將 :ref:`XRCamera3D<class_XRCamera3D>` 放置在世界中的 :ref:`Transform3D<class_Transform3D>`\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_XRInterfaceExtension_private_method__get_capabilities:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **_get_capabilities**\ (\ ) |virtual| |const| :ref:`🔗<class_XRInterfaceExtension_private_method__get_capabilities>`
|
||
|
||
返回該介面的功能。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_XRInterfaceExtension_private_method__get_color_texture:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`RID<class_RID>` **_get_color_texture**\ (\ ) |virtual| :ref:`🔗<class_XRInterfaceExtension_private_method__get_color_texture>`
|
||
|
||
返回接受算繪結果的顏色紋理(如果適用)。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_XRInterfaceExtension_private_method__get_depth_texture:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`RID<class_RID>` **_get_depth_texture**\ (\ ) |virtual| :ref:`🔗<class_XRInterfaceExtension_private_method__get_depth_texture>`
|
||
|
||
返回接受算繪結果的深度紋理(如果適用)。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_XRInterfaceExtension_private_method__get_name:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`StringName<class_StringName>` **_get_name**\ (\ ) |virtual| |const| :ref:`🔗<class_XRInterfaceExtension_private_method__get_name>`
|
||
|
||
返回該介面的名稱。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_XRInterfaceExtension_private_method__get_play_area:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`PackedVector3Array<class_PackedVector3Array>` **_get_play_area**\ (\ ) |virtual| |const| :ref:`🔗<class_XRInterfaceExtension_private_method__get_play_area>`
|
||
|
||
Returns a :ref:`PackedVector3Array<class_PackedVector3Array>` that represents the play areas boundaries (if applicable).
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_XRInterfaceExtension_private_method__get_play_area_mode:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`PlayAreaMode<enum_XRInterface_PlayAreaMode>` **_get_play_area_mode**\ (\ ) |virtual| |const| :ref:`🔗<class_XRInterfaceExtension_private_method__get_play_area_mode>`
|
||
|
||
Returns the play area mode that sets up our play area.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_XRInterfaceExtension_private_method__get_projection_for_view:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`PackedFloat64Array<class_PackedFloat64Array>` **_get_projection_for_view**\ (\ view\: :ref:`int<class_int>`, aspect\: :ref:`float<class_float>`, z_near\: :ref:`float<class_float>`, z_far\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_XRInterfaceExtension_private_method__get_projection_for_view>`
|
||
|
||
返回給定試圖的投影矩陣,形式為 :ref:`PackedFloat64Array<class_PackedFloat64Array>`\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_XRInterfaceExtension_private_method__get_render_target_size:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Vector2<class_Vector2>` **_get_render_target_size**\ (\ ) |virtual| :ref:`🔗<class_XRInterfaceExtension_private_method__get_render_target_size>`
|
||
|
||
返回我們在這個介面上的算繪目標大小,覆蓋標記為 XR 視口的 :ref:`Viewport<class_Viewport>` 的大小。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_XRInterfaceExtension_private_method__get_suggested_pose_names:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`PackedStringArray<class_PackedStringArray>` **_get_suggested_pose_names**\ (\ tracker_name\: :ref:`StringName<class_StringName>`\ ) |virtual| |const| :ref:`🔗<class_XRInterfaceExtension_private_method__get_suggested_pose_names>`
|
||
|
||
返回一個 :ref:`PackedStringArray<class_PackedStringArray>`\ ,其中包含由此介面配置的姿勢名稱。請注意,使用者的配置可以覆蓋此列表。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_XRInterfaceExtension_private_method__get_suggested_tracker_names:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`PackedStringArray<class_PackedStringArray>` **_get_suggested_tracker_names**\ (\ ) |virtual| |const| :ref:`🔗<class_XRInterfaceExtension_private_method__get_suggested_tracker_names>`
|
||
|
||
返回一個 :ref:`PackedStringArray<class_PackedStringArray>`\ ,其中包含由此介面配置的追蹤器名稱。請注意,使用者的配置可以覆蓋此列表。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_XRInterfaceExtension_private_method__get_system_info:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Dictionary<class_Dictionary>` **_get_system_info**\ (\ ) |virtual| |const| :ref:`🔗<class_XRInterfaceExtension_private_method__get_system_info>`
|
||
|
||
返回包含與這個介面相關的系統資訊的 :ref:`Dictionary<class_Dictionary>`\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_XRInterfaceExtension_private_method__get_tracking_status:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`TrackingStatus<enum_XRInterface_TrackingStatus>` **_get_tracking_status**\ (\ ) |virtual| |const| :ref:`🔗<class_XRInterfaceExtension_private_method__get_tracking_status>`
|
||
|
||
Returns an :ref:`TrackingStatus<enum_XRInterface_TrackingStatus>` specifying the current status of our tracking.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_XRInterfaceExtension_private_method__get_transform_for_view:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`Transform3D<class_Transform3D>` **_get_transform_for_view**\ (\ view\: :ref:`int<class_int>`, cam_transform\: :ref:`Transform3D<class_Transform3D>`\ ) |virtual| :ref:`🔗<class_XRInterfaceExtension_private_method__get_transform_for_view>`
|
||
|
||
返回給定視圖的 :ref:`Transform3D<class_Transform3D>`\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_XRInterfaceExtension_private_method__get_velocity_texture:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`RID<class_RID>` **_get_velocity_texture**\ (\ ) |virtual| :ref:`🔗<class_XRInterfaceExtension_private_method__get_velocity_texture>`
|
||
|
||
返回作為算繪目標的速度紋理(如果適用)。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_XRInterfaceExtension_private_method__get_view_count:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`int<class_int>` **_get_view_count**\ (\ ) |virtual| :ref:`🔗<class_XRInterfaceExtension_private_method__get_view_count>`
|
||
|
||
返回此介面所需的視圖數量,1 代表單目平面視圖,2 代表雙目立體視圖。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_XRInterfaceExtension_private_method__get_vrs_texture:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`RID<class_RID>` **_get_vrs_texture**\ (\ ) |virtual| :ref:`🔗<class_XRInterfaceExtension_private_method__get_vrs_texture>`
|
||
|
||
.. container:: contribute
|
||
|
||
There is currently no description for this method. Please help us by `contributing one <https://contributing.godotengine.org/en/latest/documentation/class_reference.html>`__!
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_XRInterfaceExtension_private_method__get_vrs_texture_format:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`VRSTextureFormat<enum_XRInterface_VRSTextureFormat>` **_get_vrs_texture_format**\ (\ ) |virtual| :ref:`🔗<class_XRInterfaceExtension_private_method__get_vrs_texture_format>`
|
||
|
||
Returns the format of the texture returned by :ref:`_get_vrs_texture()<class_XRInterfaceExtension_private_method__get_vrs_texture>`.
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_XRInterfaceExtension_private_method__initialize:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **_initialize**\ (\ ) |virtual| :ref:`🔗<class_XRInterfaceExtension_private_method__initialize>`
|
||
|
||
初始化該介面,成功時返回 ``true``\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_XRInterfaceExtension_private_method__is_initialized:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **_is_initialized**\ (\ ) |virtual| |const| :ref:`🔗<class_XRInterfaceExtension_private_method__is_initialized>`
|
||
|
||
如果這個介面已初始化,則返回 ``true``\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_XRInterfaceExtension_private_method__post_draw_viewport:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **_post_draw_viewport**\ (\ render_target\: :ref:`RID<class_RID>`, screen_rect\: :ref:`Rect2<class_Rect2>`\ ) |virtual| :ref:`🔗<class_XRInterfaceExtension_private_method__post_draw_viewport>`
|
||
|
||
在 XR :ref:`Viewport<class_Viewport>` 繪製邏輯完成後呼叫。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_XRInterfaceExtension_private_method__pre_draw_viewport:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **_pre_draw_viewport**\ (\ render_target\: :ref:`RID<class_RID>`\ ) |virtual| :ref:`🔗<class_XRInterfaceExtension_private_method__pre_draw_viewport>`
|
||
|
||
如果這是我們的主要 **XRInterfaceExtension**\ ,則在我們開始為每個活動的 XR :ref:`Viewport<class_Viewport>` 處理 :ref:`Viewport<class_Viewport>` 之前呼叫,如果該視口應該被算繪,則返回 ``true``\ 。如果使用者摘下頭戴式裝置,XR 介面可能會返回 ``false``\ ,我們可以暫停算繪。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_XRInterfaceExtension_private_method__pre_render:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **_pre_render**\ (\ ) |virtual| :ref:`🔗<class_XRInterfaceExtension_private_method__pre_render>`
|
||
|
||
如果這個 **XRInterfaceExtension** 在算繪開始前處於啟動狀態,則會呼叫這個函式,大多數 XR 介面都會在此時進行追蹤同步。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_XRInterfaceExtension_private_method__process:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **_process**\ (\ ) |virtual| :ref:`🔗<class_XRInterfaceExtension_private_method__process>`
|
||
|
||
如果這個 **XRInterfaceExtension** 在呼叫我們的物理和遊戲處理前處於啟動狀態,則會呼叫這個函式。大多數 XR 介面都會在此時更新其 :ref:`XRPositionalTracker<class_XRPositionalTracker>`\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_XRInterfaceExtension_private_method__set_anchor_detection_is_enabled:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **_set_anchor_detection_is_enabled**\ (\ enabled\: :ref:`bool<class_bool>`\ ) |virtual| :ref:`🔗<class_XRInterfaceExtension_private_method__set_anchor_detection_is_enabled>`
|
||
|
||
如果支援,則在此介面上啟用錨點偵測。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_XRInterfaceExtension_private_method__set_play_area_mode:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **_set_play_area_mode**\ (\ mode\: :ref:`PlayAreaMode<enum_XRInterface_PlayAreaMode>`\ ) |virtual| |const| :ref:`🔗<class_XRInterfaceExtension_private_method__set_play_area_mode>`
|
||
|
||
設定該介面的遊玩區域模式。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_XRInterfaceExtension_private_method__supports_play_area_mode:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`bool<class_bool>` **_supports_play_area_mode**\ (\ mode\: :ref:`PlayAreaMode<enum_XRInterface_PlayAreaMode>`\ ) |virtual| |const| :ref:`🔗<class_XRInterfaceExtension_private_method__supports_play_area_mode>`
|
||
|
||
如果該介面支援該遊玩區域模式,則返回 ``true``\ 。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_XRInterfaceExtension_private_method__trigger_haptic_pulse:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **_trigger_haptic_pulse**\ (\ action_name\: :ref:`String<class_String>`, tracker_name\: :ref:`StringName<class_StringName>`, frequency\: :ref:`float<class_float>`, amplitude\: :ref:`float<class_float>`, duration_sec\: :ref:`float<class_float>`, delay_sec\: :ref:`float<class_float>`\ ) |virtual| :ref:`🔗<class_XRInterfaceExtension_private_method__trigger_haptic_pulse>`
|
||
|
||
在指定的追蹤器上觸發一次觸覺脈衝。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_XRInterfaceExtension_private_method__uninitialize:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **_uninitialize**\ (\ ) |virtual| :ref:`🔗<class_XRInterfaceExtension_private_method__uninitialize>`
|
||
|
||
將該介面取消初始化。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_XRInterfaceExtension_method_add_blit:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
|void| **add_blit**\ (\ render_target\: :ref:`RID<class_RID>`, src_rect\: :ref:`Rect2<class_Rect2>`, dst_rect\: :ref:`Rect2i<class_Rect2i>`, use_layer\: :ref:`bool<class_bool>`, layer\: :ref:`int<class_int>`, apply_lens_distortion\: :ref:`bool<class_bool>`, eye_center\: :ref:`Vector2<class_Vector2>`, k1\: :ref:`float<class_float>`, k2\: :ref:`float<class_float>`, upscale\: :ref:`float<class_float>`, aspect_ratio\: :ref:`float<class_float>`\ ) :ref:`🔗<class_XRInterfaceExtension_method_add_blit>`
|
||
|
||
將我們的算繪結果傳輸到螢幕上,還可以在此過程中套用鏡頭失真。只能在處理 ``_commit_views`` 時呼叫。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_XRInterfaceExtension_method_get_color_texture:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`RID<class_RID>` **get_color_texture**\ (\ ) :ref:`🔗<class_XRInterfaceExtension_method_get_color_texture>`
|
||
|
||
.. container:: contribute
|
||
|
||
There is currently no description for this method. Please help us by `contributing one <https://contributing.godotengine.org/en/latest/documentation/class_reference.html>`__!
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_XRInterfaceExtension_method_get_depth_texture:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`RID<class_RID>` **get_depth_texture**\ (\ ) :ref:`🔗<class_XRInterfaceExtension_method_get_depth_texture>`
|
||
|
||
.. container:: contribute
|
||
|
||
There is currently no description for this method. Please help us by `contributing one <https://contributing.godotengine.org/en/latest/documentation/class_reference.html>`__!
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_XRInterfaceExtension_method_get_render_target_texture:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`RID<class_RID>` **get_render_target_texture**\ (\ render_target\: :ref:`RID<class_RID>`\ ) :ref:`🔗<class_XRInterfaceExtension_method_get_render_target_texture>`
|
||
|
||
如果介面支援,則返回一個紋理的有效 :ref:`RID<class_RID>`\ ,我們應更將目前影格算繪至該紋理。
|
||
|
||
.. rst-class:: classref-item-separator
|
||
|
||
----
|
||
|
||
.. _class_XRInterfaceExtension_method_get_velocity_texture:
|
||
|
||
.. rst-class:: classref-method
|
||
|
||
:ref:`RID<class_RID>` **get_velocity_texture**\ (\ ) :ref:`🔗<class_XRInterfaceExtension_method_get_velocity_texture>`
|
||
|
||
.. container:: contribute
|
||
|
||
There is currently no description for this method. Please help us by `contributing one <https://contributing.godotengine.org/en/latest/documentation/class_reference.html>`__!
|
||
|
||
.. |virtual| replace:: :abbr:`virtual (本方法通常需要使用者覆寫才能生效。)`
|
||
.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)`
|
||
.. |const| replace:: :abbr:`const (本方法沒有副作用。不會修改該實例的任何成員變數。)`
|
||
.. |vararg| replace:: :abbr:`vararg (本方法除了這裡描述的參數外,還可以接受任意數量的參數。)`
|
||
.. |constructor| replace:: :abbr:`constructor (本方法用於建構一個型別。)`
|
||
.. |static| replace:: :abbr:`static (本方法無需實例即可呼叫,因此可以直接使用類別名稱呼叫。)`
|
||
.. |operator| replace:: :abbr:`operator (本方法描述將本型別作為左運算元時可用的有效運算子。)`
|
||
.. |bitfield| replace:: :abbr:`BitField (此值是由下列旗標組成的位元遮罩整數。)`
|
||
.. |void| replace:: :abbr:`void (無回傳值。)`
|