diff options
author | Bastiaan Olij <mux213@gmail.com> | 2021-06-27 21:51:30 +1000 |
---|---|---|
committer | Bastiaan Olij <mux213@gmail.com> | 2021-10-19 21:17:04 +1100 |
commit | 96b707215dea18bce739c60f3486cceade4c4f4f (patch) | |
tree | 8be945764483894cbfff9adcba5caf9beb73862c /servers/xr/xr_interface_extension.h | |
parent | 4387f9645b1f54755506804770ba15c6c9cd5094 (diff) |
Add support for returning the play area from XRInterface
Diffstat (limited to 'servers/xr/xr_interface_extension.h')
-rw-r--r-- | servers/xr/xr_interface_extension.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/servers/xr/xr_interface_extension.h b/servers/xr/xr_interface_extension.h index 50fc576c33..763526de96 100644 --- a/servers/xr/xr_interface_extension.h +++ b/servers/xr/xr_interface_extension.h @@ -75,7 +75,15 @@ public: GDVIRTUAL6(_trigger_haptic_pulse, const String &, const StringName &, double, double, double, double); /** specific to VR **/ - // nothing yet + virtual bool supports_play_area_mode(XRInterface::PlayAreaMode p_mode) override; /* query if this interface supports this play area mode */ + virtual XRInterface::PlayAreaMode get_play_area_mode() const override; /* get the current play area mode */ + virtual bool set_play_area_mode(XRInterface::PlayAreaMode p_mode) override; /* change the play area mode, note that this should return false if the mode is not available */ + virtual PackedVector3Array get_play_area() const override; /* if available, returns an array of vectors denoting the play area the player can move around in */ + + GDVIRTUAL1RC(bool, _supports_play_area_mode, XRInterface::PlayAreaMode); + GDVIRTUAL0RC(uint32_t, _get_play_area_mode); + GDVIRTUAL1RC(bool, _set_play_area_mode, uint32_t); + GDVIRTUAL0RC(PackedVector3Array, _get_play_area); /** specific to AR **/ virtual bool get_anchor_detection_is_enabled() const override; |