diff options
Diffstat (limited to 'servers/xr_server.cpp')
-rw-r--r-- | servers/xr_server.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/servers/xr_server.cpp b/servers/xr_server.cpp index 5678071857..c27656047f 100644 --- a/servers/xr_server.cpp +++ b/servers/xr_server.cpp @@ -101,25 +101,25 @@ void XRServer::set_world_scale(real_t p_world_scale) { world_scale = p_world_scale; }; -Transform XRServer::get_world_origin() const { +Transform3D XRServer::get_world_origin() const { return world_origin; }; -void XRServer::set_world_origin(const Transform &p_world_origin) { +void XRServer::set_world_origin(const Transform3D &p_world_origin) { world_origin = p_world_origin; }; -Transform XRServer::get_reference_frame() const { +Transform3D XRServer::get_reference_frame() const { return reference_frame; }; void XRServer::center_on_hmd(RotationMode p_rotation_mode, bool p_keep_height) { if (primary_interface != nullptr) { // clear our current reference frame or we'll end up double adjusting it - reference_frame = Transform(); + reference_frame = Transform3D(); // requesting our EYE_MONO transform should return our current HMD position - Transform new_reference_frame = primary_interface->get_transform_for_eye(XRInterface::EYE_MONO, Transform()); + Transform3D new_reference_frame = primary_interface->get_camera_transform(); // remove our tilt if (p_rotation_mode == 1) { @@ -145,10 +145,10 @@ void XRServer::center_on_hmd(RotationMode p_rotation_mode, bool p_keep_height) { }; }; -Transform XRServer::get_hmd_transform() { - Transform hmd_transform; +Transform3D XRServer::get_hmd_transform() { + Transform3D hmd_transform; if (primary_interface != nullptr) { - hmd_transform = primary_interface->get_transform_for_eye(XRInterface::EYE_MONO, hmd_transform); + hmd_transform = primary_interface->get_camera_transform(); }; return hmd_transform; }; @@ -164,7 +164,7 @@ void XRServer::add_interface(const Ref<XRInterface> &p_interface) { }; interfaces.push_back(p_interface); - emit_signal("interface_added", p_interface->get_name()); + emit_signal(SNAME("interface_added"), p_interface->get_name()); }; void XRServer::remove_interface(const Ref<XRInterface> &p_interface) { @@ -182,7 +182,7 @@ void XRServer::remove_interface(const Ref<XRInterface> &p_interface) { print_verbose("XR: Removed interface" + p_interface->get_name()); - emit_signal("interface_removed", p_interface->get_name()); + emit_signal(SNAME("interface_removed"), p_interface->get_name()); interfaces.remove(idx); }; @@ -269,7 +269,7 @@ void XRServer::add_tracker(Ref<XRPositionalTracker> p_tracker) { ERR_FAIL_COND(p_tracker.is_null()); trackers.push_back(p_tracker); - emit_signal("tracker_added", p_tracker->get_tracker_name(), p_tracker->get_tracker_type(), p_tracker->get_tracker_id()); + emit_signal(SNAME("tracker_added"), p_tracker->get_tracker_name(), p_tracker->get_tracker_type(), p_tracker->get_tracker_id()); }; void XRServer::remove_tracker(Ref<XRPositionalTracker> p_tracker) { @@ -285,7 +285,7 @@ void XRServer::remove_tracker(Ref<XRPositionalTracker> p_tracker) { ERR_FAIL_COND(idx == -1); - emit_signal("tracker_removed", p_tracker->get_tracker_name(), p_tracker->get_tracker_type(), p_tracker->get_tracker_id()); + emit_signal(SNAME("tracker_removed"), p_tracker->get_tracker_name(), p_tracker->get_tracker_type(), p_tracker->get_tracker_id()); trackers.remove(idx); }; |