summaryrefslogtreecommitdiffstats
path: root/modules/webxr/webxr_interface.h
diff options
context:
space:
mode:
authorDavid Snopek <dsnopek@gmail.com>2022-11-18 20:43:11 -0600
committerDavid Snopek <dsnopek@gmail.com>2022-12-01 21:46:30 -0600
commit310bf39cd3f8c0e9ac6602e37fa9d65ca0d1c2e1 (patch)
tree0bca28bf11f672052a182e9cbe8c26c1ad23e44d /modules/webxr/webxr_interface.h
parent84c404f6bcce9ba112118d77afd6bd70a92774d1 (diff)
downloadredot-engine-310bf39cd3f8c0e9ac6602e37fa9d65ca0d1c2e1.tar.gz
Get WebXR fully working in Godot 4!
Diffstat (limited to 'modules/webxr/webxr_interface.h')
-rw-r--r--modules/webxr/webxr_interface.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/modules/webxr/webxr_interface.h b/modules/webxr/webxr_interface.h
index 801643bfa6..1afeb5bab0 100644
--- a/modules/webxr/webxr_interface.h
+++ b/modules/webxr/webxr_interface.h
@@ -45,6 +45,13 @@ protected:
static void _bind_methods();
public:
+ enum TargetRayMode {
+ TARGET_RAY_MODE_UNKNOWN,
+ TARGET_RAY_MODE_GAZE,
+ TARGET_RAY_MODE_TRACKED_POINTER,
+ TARGET_RAY_MODE_SCREEN,
+ };
+
virtual void is_session_supported(const String &p_session_mode) = 0;
virtual void set_session_mode(String p_session_mode) = 0;
virtual String get_session_mode() const = 0;
@@ -55,9 +62,12 @@ public:
virtual void set_requested_reference_space_types(String p_requested_reference_space_types) = 0;
virtual String get_requested_reference_space_types() const = 0;
virtual String get_reference_space_type() const = 0;
- virtual Ref<XRPositionalTracker> get_controller(int p_controller_id) const = 0;
+ virtual bool is_input_source_active(int p_input_source_id) const = 0;
+ virtual Ref<XRPositionalTracker> get_input_source_tracker(int p_input_source_id) const = 0;
+ virtual TargetRayMode get_input_source_target_ray_mode(int p_input_source_id) const = 0;
virtual String get_visibility_state() const = 0;
- virtual PackedVector3Array get_bounds_geometry() const = 0;
};
+VARIANT_ENUM_CAST(WebXRInterface::TargetRayMode);
+
#endif // WEBXR_INTERFACE_H