diff options
author | Bastiaan Olij <mux213@gmail.com> | 2021-08-29 16:05:11 +1000 |
---|---|---|
committer | Bastiaan Olij <mux213@gmail.com> | 2021-10-17 12:12:20 +1100 |
commit | 5d1ea92daf3eb2b9d7688b43568e8f2d0b7c0ab8 (patch) | |
tree | 8fed193d6a1d3edd0be647294690fc5091812a31 /servers/xr/xr_interface_extension.cpp | |
parent | c2a616f3ecc5fa0ee7d85507b971e7578000a562 (diff) | |
download | redot-engine-5d1ea92daf3eb2b9d7688b43568e8f2d0b7c0ab8.tar.gz |
Rework XR positional trackers
Diffstat (limited to 'servers/xr/xr_interface_extension.cpp')
-rw-r--r-- | servers/xr/xr_interface_extension.cpp | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/servers/xr/xr_interface_extension.cpp b/servers/xr/xr_interface_extension.cpp index 7fdf90770d..9e97233a75 100644 --- a/servers/xr/xr_interface_extension.cpp +++ b/servers/xr/xr_interface_extension.cpp @@ -41,8 +41,6 @@ void XRInterfaceExtension::_bind_methods() { GDVIRTUAL_BIND(_initialize); GDVIRTUAL_BIND(_uninitialize); - GDVIRTUAL_BIND(_get_tracking_status); - GDVIRTUAL_BIND(_get_render_target_size); GDVIRTUAL_BIND(_get_view_count); GDVIRTUAL_BIND(_get_camera_transform); @@ -54,6 +52,13 @@ void XRInterfaceExtension::_bind_methods() { GDVIRTUAL_BIND(_process); GDVIRTUAL_BIND(_notification, "what"); + /** input and output **/ + + GDVIRTUAL_BIND(_get_suggested_tracker_names); + GDVIRTUAL_BIND(_get_suggested_pose_names, "tracker_name"); + GDVIRTUAL_BIND(_get_tracking_status); + GDVIRTUAL_BIND(_trigger_haptic_pulse, "action_name", "tracker_name", "frequency", "amplitude", "duration_sec", "delay_sec"); + // we don't have any properties specific to VR yet.... // but we do have properties specific to AR.... @@ -111,6 +116,22 @@ void XRInterfaceExtension::uninitialize() { GDVIRTUAL_CALL(_uninitialize); } +PackedStringArray XRInterfaceExtension::get_suggested_tracker_names() const { + PackedStringArray arr; + + GDVIRTUAL_CALL(_get_suggested_tracker_names, arr); + + return arr; +} + +PackedStringArray XRInterfaceExtension::get_suggested_pose_names(const StringName &p_tracker_name) const { + PackedStringArray arr; + + GDVIRTUAL_CALL(_get_suggested_pose_names, p_tracker_name, arr); + + return arr; +} + XRInterface::TrackingStatus XRInterfaceExtension::get_tracking_status() const { uint32_t status; @@ -121,6 +142,10 @@ XRInterface::TrackingStatus XRInterfaceExtension::get_tracking_status() const { return XR_UNKNOWN_TRACKING; } +void XRInterfaceExtension::trigger_haptic_pulse(const String &p_action_name, const StringName &p_tracker_name, double p_frequency, double p_amplitude, double p_duration_sec, double p_delay_sec) { + GDVIRTUAL_CALL(_trigger_haptic_pulse, p_action_name, p_tracker_name, p_frequency, p_amplitude, p_duration_sec, p_delay_sec); +} + /** these will only be implemented on AR interfaces, so we want dummies for VR **/ bool XRInterfaceExtension::get_anchor_detection_is_enabled() const { bool enabled; |