summaryrefslogtreecommitdiff
path: root/modules/webxr
diff options
context:
space:
mode:
authorAaron Franke <arnfranke@yahoo.com>2020-10-17 01:08:21 -0400
committerAaron Franke <arnfranke@yahoo.com>2021-06-03 07:30:01 -0400
commitde3f6699a5192153e9882a62b58b9ca6cd82ee2d (patch)
tree7cee99845cc6bf2db8a48f7776efb046c7990a67 /modules/webxr
parentb80494e6331bdfbfd3c754aa225fa2a5105fb917 (diff)
Rename Transform to Transform3D in core
Diffstat (limited to 'modules/webxr')
-rw-r--r--modules/webxr/webxr_interface_js.cpp8
-rw-r--r--modules/webxr/webxr_interface_js.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/modules/webxr/webxr_interface_js.cpp b/modules/webxr/webxr_interface_js.cpp
index 06f3fe6284..a628cb0549 100644
--- a/modules/webxr/webxr_interface_js.cpp
+++ b/modules/webxr/webxr_interface_js.cpp
@@ -266,7 +266,7 @@ void WebXRInterfaceJS::uninitialize() {
};
Transform WebXRInterfaceJS::_js_matrix_to_transform(float *p_js_matrix) {
- Transform transform;
+ Transform3D transform;
transform.basis.elements[0].x = p_js_matrix[0];
transform.basis.elements[1].x = p_js_matrix[1];
@@ -305,8 +305,8 @@ Size2 WebXRInterfaceJS::get_render_targetsize() {
return render_targetsize;
};
-Transform WebXRInterfaceJS::get_transform_for_eye(XRInterface::Eyes p_eye, const Transform &p_cam_transform) {
- Transform transform_for_eye;
+Transform WebXRInterfaceJS::get_transform_for_eye(XRInterface::Eyes p_eye, const Transform3D &p_cam_transform) {
+ Transform3D transform_for_eye;
XRServer *xr_server = XRServer::get_singleton();
ERR_FAIL_NULL_V(xr_server, transform_for_eye);
@@ -399,7 +399,7 @@ void WebXRInterfaceJS::_update_tracker(int p_controller_id) {
float *tracker_matrix = godot_webxr_get_controller_transform(p_controller_id);
if (tracker_matrix) {
- Transform transform = _js_matrix_to_transform(tracker_matrix);
+ Transform3D transform = _js_matrix_to_transform(tracker_matrix);
tracker->set_position(transform.origin);
tracker->set_orientation(transform.basis);
free(tracker_matrix);
diff --git a/modules/webxr/webxr_interface_js.h b/modules/webxr/webxr_interface_js.h
index 7c841c1911..e9274a06e4 100644
--- a/modules/webxr/webxr_interface_js.h
+++ b/modules/webxr/webxr_interface_js.h
@@ -56,7 +56,7 @@ private:
bool controllers_state[2];
Size2 render_targetsize;
- Transform _js_matrix_to_transform(float *p_js_matrix);
+ Transform3D _js_matrix_to_transform(float *p_js_matrix);
void _update_tracker(int p_controller_id);
public:
@@ -84,7 +84,7 @@ public:
virtual Size2 get_render_targetsize() override;
virtual bool is_stereo() override;
- virtual Transform get_transform_for_eye(XRInterface::Eyes p_eye, const Transform &p_cam_transform) override;
+ virtual Transform get_transform_for_eye(XRInterface::Eyes p_eye, const Transform3D &p_cam_transform) override;
virtual CameraMatrix get_projection_for_eye(XRInterface::Eyes p_eye, real_t p_aspect, real_t p_z_near, real_t p_z_far) override;
virtual unsigned int get_external_texture_for_eye(XRInterface::Eyes p_eye) override;
virtual void commit_for_eye(XRInterface::Eyes p_eye, RID p_render_target, const Rect2 &p_screen_rect) override;