:github_url: hide .. Generated automatically by doc/tools/make_rst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the XRInterfaceExtension.xml source instead. .. The source is found in doc/classes or modules//doc_classes. .. _class_XRInterfaceExtension: XRInterfaceExtension ==================== **Inherits:** :ref:`XRInterface` **<** :ref:`RefCounted` **<** :ref:`Object` Base class for XR interface extensions (plugins). Description ----------- External XR interface plugins should inherit from this class. Methods ------- +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_commit_views` **(** :ref:`RID` render_target, :ref:`Rect2` screen_rect **)** |virtual| | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`_get_anchor_detection_is_enabled` **(** **)** |virtual| |const| | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_get_camera_feed_id` **(** **)** |virtual| |const| | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform3D` | :ref:`_get_camera_transform` **(** **)** |virtual| | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_get_capabilities` **(** **)** |virtual| |const| | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`StringName` | :ref:`_get_name` **(** **)** |virtual| |const| | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedVector3Array` | :ref:`_get_play_area` **(** **)** |virtual| |const| | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_get_play_area_mode` **(** **)** |virtual| |const| | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedFloat64Array` | :ref:`_get_projection_for_view` **(** :ref:`int` view, :ref:`float` aspect, :ref:`float` z_near, :ref:`float` z_far **)** |virtual| | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`_get_render_target_size` **(** **)** |virtual| | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`_get_suggested_pose_names` **(** :ref:`StringName` tracker_name **)** |virtual| |const| | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`_get_suggested_tracker_names` **(** **)** |virtual| |const| | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_get_tracking_status` **(** **)** |virtual| |const| | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Transform3D` | :ref:`_get_transform_for_view` **(** :ref:`int` view, :ref:`Transform3D` cam_transform **)** |virtual| | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_get_view_count` **(** **)** |virtual| | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`_initialize` **(** **)** |virtual| | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`_is_initialized` **(** **)** |virtual| |const| | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_notification` **(** :ref:`int` what **)** |virtual| | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_process` **(** **)** |virtual| | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_set_anchor_detection_is_enabled` **(** :ref:`bool` enabled **)** |virtual| | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`_set_play_area_mode` **(** :ref:`int` mode **)** |virtual| |const| | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`_supports_play_area_mode` **(** :ref:`PlayAreaMode` mode **)** |virtual| |const| | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_trigger_haptic_pulse` **(** :ref:`String` action_name, :ref:`StringName` tracker_name, :ref:`float` frequency, :ref:`float` amplitude, :ref:`float` duration_sec, :ref:`float` delay_sec **)** |virtual| | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_uninitialize` **(** **)** |virtual| | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`add_blit` **(** :ref:`RID` render_target, :ref:`Rect2` src_rect, :ref:`Rect2i` dst_rect, :ref:`bool` use_layer, :ref:`int` layer, :ref:`bool` apply_lens_distortion, :ref:`Vector2` eye_center, :ref:`float` k1, :ref:`float` k2, :ref:`float` upscale, :ref:`float` aspect_ratio **)** | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`RID` | :ref:`get_render_target_texture` **(** :ref:`RID` render_target **)** | +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ Method Descriptions ------------------- .. _class_XRInterfaceExtension_method__commit_views: - void **_commit_views** **(** :ref:`RID` render_target, :ref:`Rect2` screen_rect **)** |virtual| ---- .. _class_XRInterfaceExtension_method__get_anchor_detection_is_enabled: - :ref:`bool` **_get_anchor_detection_is_enabled** **(** **)** |virtual| |const| ---- .. _class_XRInterfaceExtension_method__get_camera_feed_id: - :ref:`int` **_get_camera_feed_id** **(** **)** |virtual| |const| ---- .. _class_XRInterfaceExtension_method__get_camera_transform: - :ref:`Transform3D` **_get_camera_transform** **(** **)** |virtual| ---- .. _class_XRInterfaceExtension_method__get_capabilities: - :ref:`int` **_get_capabilities** **(** **)** |virtual| |const| ---- .. _class_XRInterfaceExtension_method__get_name: - :ref:`StringName` **_get_name** **(** **)** |virtual| |const| ---- .. _class_XRInterfaceExtension_method__get_play_area: - :ref:`PackedVector3Array` **_get_play_area** **(** **)** |virtual| |const| ---- .. _class_XRInterfaceExtension_method__get_play_area_mode: - :ref:`int` **_get_play_area_mode** **(** **)** |virtual| |const| ---- .. _class_XRInterfaceExtension_method__get_projection_for_view: - :ref:`PackedFloat64Array` **_get_projection_for_view** **(** :ref:`int` view, :ref:`float` aspect, :ref:`float` z_near, :ref:`float` z_far **)** |virtual| ---- .. _class_XRInterfaceExtension_method__get_render_target_size: - :ref:`Vector2` **_get_render_target_size** **(** **)** |virtual| ---- .. _class_XRInterfaceExtension_method__get_suggested_pose_names: - :ref:`PackedStringArray` **_get_suggested_pose_names** **(** :ref:`StringName` tracker_name **)** |virtual| |const| ---- .. _class_XRInterfaceExtension_method__get_suggested_tracker_names: - :ref:`PackedStringArray` **_get_suggested_tracker_names** **(** **)** |virtual| |const| ---- .. _class_XRInterfaceExtension_method__get_tracking_status: - :ref:`int` **_get_tracking_status** **(** **)** |virtual| |const| ---- .. _class_XRInterfaceExtension_method__get_transform_for_view: - :ref:`Transform3D` **_get_transform_for_view** **(** :ref:`int` view, :ref:`Transform3D` cam_transform **)** |virtual| ---- .. _class_XRInterfaceExtension_method__get_view_count: - :ref:`int` **_get_view_count** **(** **)** |virtual| ---- .. _class_XRInterfaceExtension_method__initialize: - :ref:`bool` **_initialize** **(** **)** |virtual| ---- .. _class_XRInterfaceExtension_method__is_initialized: - :ref:`bool` **_is_initialized** **(** **)** |virtual| |const| ---- .. _class_XRInterfaceExtension_method__notification: - void **_notification** **(** :ref:`int` what **)** |virtual| ---- .. _class_XRInterfaceExtension_method__process: - void **_process** **(** **)** |virtual| ---- .. _class_XRInterfaceExtension_method__set_anchor_detection_is_enabled: - void **_set_anchor_detection_is_enabled** **(** :ref:`bool` enabled **)** |virtual| ---- .. _class_XRInterfaceExtension_method__set_play_area_mode: - :ref:`bool` **_set_play_area_mode** **(** :ref:`int` mode **)** |virtual| |const| ---- .. _class_XRInterfaceExtension_method__supports_play_area_mode: - :ref:`bool` **_supports_play_area_mode** **(** :ref:`PlayAreaMode` mode **)** |virtual| |const| ---- .. _class_XRInterfaceExtension_method__trigger_haptic_pulse: - void **_trigger_haptic_pulse** **(** :ref:`String` action_name, :ref:`StringName` tracker_name, :ref:`float` frequency, :ref:`float` amplitude, :ref:`float` duration_sec, :ref:`float` delay_sec **)** |virtual| ---- .. _class_XRInterfaceExtension_method__uninitialize: - void **_uninitialize** **(** **)** |virtual| ---- .. _class_XRInterfaceExtension_method_add_blit: - void **add_blit** **(** :ref:`RID` render_target, :ref:`Rect2` src_rect, :ref:`Rect2i` dst_rect, :ref:`bool` use_layer, :ref:`int` layer, :ref:`bool` apply_lens_distortion, :ref:`Vector2` eye_center, :ref:`float` k1, :ref:`float` k2, :ref:`float` upscale, :ref:`float` aspect_ratio **)** Blits our render results to screen optionally applying lens distortion. This can only be called while processing ``_commit_views``. ---- .. _class_XRInterfaceExtension_method_get_render_target_texture: - :ref:`RID` **get_render_target_texture** **(** :ref:`RID` render_target **)** .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`