Inheritance #

RefCounted

- AESContext
- AStar2D
- AStar3D
- AStarGrid2D
- AudioEffectInstance (1)
- AudioSample
- AudioSamplePlayback
- AudioStreamPlayback (5)
- CameraFeed
- CharFXTransform
- ConfigFile
- Crypto
- DTLSServer
- DirAccess
- ENetConnection
- EditorContextMenuPlugin
- EditorDebuggerPlugin
- EditorDebuggerSession
- EditorExportPlatform (6)
- EditorExportPlugin
- EditorExportPreset
- EditorFeatureProfile
- EditorFileSystemImportFormatSupportQuery
- EditorInspectorPlugin
- EditorResourceConversionPlugin
- EditorResourcePreviewGenerator
- EditorResourceTooltipPlugin
- EditorSceneFormatImporter (4)
- EditorScenePostImport
- EditorScenePostImportPlugin
- EditorScript
- EditorTranslationParserPlugin
- EncodedObjectAsID
- EngineProfiler
- Expression
- FileAccess
- GLTFObjectModelProperty
- HMACContext
- HTTPClient
- HashingContext
- ImageFormatLoader (1)
- JavaClass
- JavaObject
- JavaScriptObject
- KinematicCollision2D
- KinematicCollision3D
- Lightmapper (1)
- MeshConvexDecompositionSettings
- MeshDataTool
- MultiplayerAPI (2)
- Mutex
- NavigationPathQueryParameters2D
- NavigationPathQueryParameters3D
- NavigationPathQueryResult2D
- NavigationPathQueryResult3D
- Node3DGizmo (1)
- OggPacketSequencePlayback
- OpenXRAPIExtension
- PCKPacker
- PackedDataContainerRef
- PacketPeer (8)
- PhysicsPointQueryParameters2D
- PhysicsPointQueryParameters3D
- PhysicsRayQueryParameters2D
- PhysicsRayQueryParameters3D
- PhysicsShapeQueryParameters2D
- PhysicsShapeQueryParameters3D
- PhysicsTestMotionParameters2D
- PhysicsTestMotionParameters3D
- PhysicsTestMotionResult2D
- PhysicsTestMotionResult3D
- RDAttachmentFormat
- RDFramebufferPass
- RDPipelineColorBlendState
- RDPipelineColorBlendStateAttachment
- RDPipelineDepthStencilState
- RDPipelineMultisampleState
- RDPipelineRasterizationState
- RDPipelineSpecializationConstant
- RDSamplerState
- RDShaderSource
- RDTextureFormat
- RDTextureView
- RDUniform
- RDVertexAttribute
- RandomNumberGenerator
- RegEx
- RegExMatch
- RenderSceneBuffers (2)
- RenderSceneBuffersConfiguration
- Resource (103)
- ResourceFormatLoader
- ResourceFormatSaver
- ResourceImporter (16)
- SceneState
- SceneTreeTimer
- Semaphore
- SkinReference
- StreamPeer (5)
- SurfaceTool
- TCPServer
- TLSOptions
- TextLine
- TextParagraph
- TextServer (1)
- Thread
- TranslationDomain
- TriangleMesh
- Tween
- Tweener (5)
- UDPServer
- UPNP
- UPNPDevice
- WeakRef
- WebRTCPeerConnection (1)
- XMLParser
- XRInterface (4)
- XRPose
- XRTracker (2)
- ZIPPacker
- ZIPReader
XRInterfaceExtension
Table of contents

XRInterfaceExtension #

is_refcounted, is_instantiable, core, not_builtin_classes

Base class for XR interface extensions (plugins).

External XR interface plugins should inherit from this class.

Members #

Methods #

virtual func _end_frame() -> void#

Called if interface is active and queues have been submitted.

virtual const func _get_anchor_detection_is_enabled() -> bool#

Return true if anchor detection is enabled for this interface.

virtual const func _get_camera_feed_id() -> int#

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).

virtual func _get_camera_transform() -> Transform3D#

Returns the Transform3D that positions the XRCamera3D in the world.

virtual const func _get_capabilities() -> int#

Returns the capabilities of this interface.

virtual func _get_color_texture() -> RID#

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

virtual func _get_depth_texture() -> RID#

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

virtual const func _get_name() -> StringName#

Returns the name of this interface.

virtual const func _get_play_area() -> PackedVector3Array#

Returns a PackedVector3Array that represents the play areas boundaries (if applicable).

virtual const func _get_play_area_mode() -> intXRInterface.PlayAreaMode#

Returns the play area mode that sets up our play area.

virtual func _get_projection_for_view(z_far: float) -> PackedFloat64Array#

Returns the projection matrix for the given view as a PackedFloat64Array.

virtual func _get_render_target_size() -> Vector2#

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

virtual const func _get_suggested_pose_names(tracker_name: StringName) -> PackedStringArray#

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

virtual const func _get_suggested_tracker_names() -> PackedStringArray#

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

virtual const func _get_system_info() -> Dictionary#

Returns a Dictionary with system information related to this interface.

virtual const func _get_tracking_status() -> intXRInterface.TrackingStatus#

Returns a XRInterface.TrackingStatus specifying the current status of our tracking.

virtual func _get_transform_for_view(cam_transform: Transform3D) -> Transform3D#

Returns a Transform3D for a given view.

virtual func _get_velocity_texture() -> RID#

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

virtual func _get_view_count() -> int#

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

virtual func _get_vrs_texture() -> RID#

virtual func _initialize() -> bool#

Initializes the interface, returns true on success.

virtual const func _is_initialized() -> bool#

Returns true if this interface has been initialized.

virtual func _post_draw_viewport(screen_rect: Rect2) -> void#

Called after the XR Viewport draw logic has completed.

virtual func _pre_draw_viewport(render_target: RID) -> bool#

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.

virtual func _pre_render() -> void#

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

virtual func _process() -> void#

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.

virtual func _set_anchor_detection_is_enabled(enabled: bool) -> void#

Enables anchor detection on this interface if supported.

virtual const func _set_play_area_mode(mode: int enumXRInterface.PlayAreaMode) -> bool#

Set the play area mode for this interface.

virtual const func _supports_play_area_mode(mode: int enumXRInterface.PlayAreaMode) -> bool#

Returns true if this interface supports this play area mode.

virtual func _trigger_haptic_pulse(delay_sec: float) -> void#

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

virtual func _uninitialize() -> void#

Uninitialize the interface.

func add_blit(aspect_ratio: float) -> void#

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

func get_color_texture() -> RID#

func get_depth_texture() -> RID#

func get_render_target_texture(render_target: RID) -> RID#

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

func get_velocity_texture() -> RID#

Annotations #

Constants #

Constructors #

Enums #

Operators #

Signals #

Theme Items #

Tutorials #