Attention: Here be dragons

This is the latest (unstable) version of this documentation, which may document features not available in or compatible with released stable versions of Godot.

XRInterfaceExtension

Hérite de : XRInterface < RefCounted < Object

Classe de base pour une implémentation d’interface XR.

Description

Les plugins d'interface XR externes devraient hériter de cette classe.

Tutoriels

Méthodes

void

_end_frame() virtual

bool

_get_anchor_detection_is_enabled() virtual const

int

_get_camera_feed_id() virtual const

Transform3D

_get_camera_transform() virtual

int

_get_capabilities() virtual const

RID

_get_color_texture() virtual

RID

_get_depth_texture() virtual

StringName

_get_name() virtual const

PackedVector3Array

_get_play_area() virtual const

PlayAreaMode

_get_play_area_mode() virtual const

PackedFloat64Array

_get_projection_for_view(view: int, aspect: float, z_near: float, z_far: float) virtual

Vector2

_get_render_target_size() virtual

PackedStringArray

_get_suggested_pose_names(tracker_name: StringName) virtual const

PackedStringArray

_get_suggested_tracker_names() virtual const

Dictionary

_get_system_info() virtual const

TrackingStatus

_get_tracking_status() virtual const

Transform3D

_get_transform_for_view(view: int, cam_transform: Transform3D) virtual

RID

_get_velocity_texture() virtual

int

_get_view_count() virtual

RID

_get_vrs_texture() virtual

VRSTextureFormat

_get_vrs_texture_format() virtual

bool

_initialize() virtual

bool

_is_initialized() virtual const

void

_post_draw_viewport(render_target: RID, screen_rect: Rect2) virtual

bool

_pre_draw_viewport(render_target: RID) virtual

void

_pre_render() virtual

void

_process() virtual

void

_set_anchor_detection_is_enabled(enabled: bool) virtual

bool

_set_play_area_mode(mode: PlayAreaMode) virtual const

bool

_supports_play_area_mode(mode: PlayAreaMode) virtual const

void

_trigger_haptic_pulse(action_name: String, tracker_name: StringName, frequency: float, amplitude: float, duration_sec: float, delay_sec: float) virtual

void

_uninitialize() virtual

void

add_blit(render_target: RID, src_rect: Rect2, dst_rect: Rect2i, use_layer: bool, layer: int, apply_lens_distortion: bool, eye_center: Vector2, k1: float, k2: float, upscale: float, aspect_ratio: float)

RID

get_color_texture()

RID

get_depth_texture()

RID

get_render_target_texture(render_target: RID)

RID

get_velocity_texture()


Descriptions des méthodes

void _end_frame() virtual 🔗

Called if interface is active and queues have been submitted.


bool _get_anchor_detection_is_enabled() virtual const 🔗

Renvoie true si la détection d'ancrage est activée sur cette interface.


int _get_camera_feed_id() virtual const 🔗

Returns the camera feed ID for the CameraFeed registered with the CameraServer that should be presented as the background on an AR capable device (if applicable).


Transform3D _get_camera_transform() virtual 🔗

Renvoie la Transform3D qui positionne la XRCamera3D dans le monde.


int _get_capabilities() virtual const 🔗

Returns the capabilities of this interface.


RID _get_color_texture() virtual 🔗

Return color texture into which to render (if applicable).


RID _get_depth_texture() virtual 🔗

Return depth texture into which to render (if applicable).


StringName _get_name() virtual const 🔗

Renvoie le nom de cette interface.


PackedVector3Array _get_play_area() virtual const 🔗

Renvoie un PackedVector3Array qui représente les limites de la zone de jeu (le cas échéant).


PlayAreaMode _get_play_area_mode() virtual const 🔗

Renvoie le mode de zone de jeu qui configure notre zone de jeu.


PackedFloat64Array _get_projection_for_view(view: int, aspect: float, z_near: float, z_far: float) virtual 🔗

Renvoie la matrice de projection pour la vue donnée en tant que PackedFloat64Array.


Vector2 _get_render_target_size() virtual 🔗

Returns the size of our render target for this interface, this overrides the size of the Viewport marked as the xr viewport.


PackedStringArray _get_suggested_pose_names(tracker_name: StringName) virtual const 🔗

Returns a PackedStringArray with pose names configured by this interface. Note that user configuration can override this list.


PackedStringArray _get_suggested_tracker_names() virtual const 🔗

Returns a PackedStringArray with tracker names configured by this interface. Note that user configuration can override this list.


Dictionary _get_system_info() virtual const 🔗

Returns a Dictionary with system information related to this interface.


TrackingStatus _get_tracking_status() virtual const 🔗

Renvoie le statut actuel de notre suivi.


Transform3D _get_transform_for_view(view: int, cam_transform: Transform3D) virtual 🔗

Renvoie une Transform3D pour une vue donnée.


RID _get_velocity_texture() virtual 🔗

Return velocity texture into which to render (if applicable).


int _get_view_count() virtual 🔗

Returns the number of views this interface requires, 1 for mono, 2 for stereoscopic.


RID _get_vrs_texture() virtual 🔗

There is currently no description for this method. Please help us by contributing one!


VRSTextureFormat _get_vrs_texture_format() virtual 🔗

Retourne le format de la texture retournée par _get_vrs_texture().


bool _initialize() virtual 🔗

Initialise l'interface, renvoie true en cas de succès.


bool _is_initialized() virtual const 🔗

Renvoie true si cette interface a été initialisée.


void _post_draw_viewport(render_target: RID, screen_rect: Rect2) virtual 🔗

Called after the XR Viewport draw logic has completed.


bool _pre_draw_viewport(render_target: RID) virtual 🔗

Called if this is our primary XRInterfaceExtension before we start processing a Viewport for every active XR 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.


void _pre_render() virtual 🔗

Called if this XRInterfaceExtension is active before rendering starts. Most XR interfaces will sync tracking at this point in time.


void _process() virtual 🔗

Called if this XRInterfaceExtension is active before our physics and game process is called. Most XR interfaces will update its XRPositionalTrackers at this point in time.


void _set_anchor_detection_is_enabled(enabled: bool) virtual 🔗

Active la détection d'ancrage sur cette interface si elle est supportée.


bool _set_play_area_mode(mode: PlayAreaMode) virtual const 🔗

Set the play area mode for this interface.


bool _supports_play_area_mode(mode: PlayAreaMode) virtual const 🔗

Renvoie true si cette interface supporte ce mode de zone de jeu.


void _trigger_haptic_pulse(action_name: String, tracker_name: StringName, frequency: float, amplitude: float, duration_sec: float, delay_sec: float) virtual 🔗

Triggers a haptic pulse to be emitted on the specified tracker.


void _uninitialize() virtual 🔗

Désinitialise l'interface.


void add_blit(render_target: RID, src_rect: Rect2, dst_rect: Rect2i, use_layer: bool, layer: int, apply_lens_distortion: bool, eye_center: Vector2, k1: float, k2: float, upscale: float, aspect_ratio: float) 🔗

Blits our render results to screen optionally applying lens distortion. This can only be called while processing _commit_views.


RID get_color_texture() 🔗

There is currently no description for this method. Please help us by contributing one!


RID get_depth_texture() 🔗

There is currently no description for this method. Please help us by contributing one!


RID get_render_target_texture(render_target: RID) 🔗

Returns a valid RID for a texture to which we should render the current frame if supported by the interface.


RID get_velocity_texture() 🔗

There is currently no description for this method. Please help us by contributing one!