summaryrefslogtreecommitdiff
path: root/modules/gdnative/xr
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/gdnative/xr
parentb80494e6331bdfbfd3c754aa225fa2a5105fb917 (diff)
Rename Transform to Transform3D in core
Diffstat (limited to 'modules/gdnative/xr')
-rw-r--r--modules/gdnative/xr/xr_interface_gdnative.cpp14
-rw-r--r--modules/gdnative/xr/xr_interface_gdnative.h2
2 files changed, 8 insertions, 8 deletions
diff --git a/modules/gdnative/xr/xr_interface_gdnative.cpp b/modules/gdnative/xr/xr_interface_gdnative.cpp
index 122cb5849b..21bd3093a4 100644
--- a/modules/gdnative/xr/xr_interface_gdnative.cpp
+++ b/modules/gdnative/xr/xr_interface_gdnative.cpp
@@ -173,14 +173,14 @@ Size2 XRInterfaceGDNative::get_render_targetsize() {
return *vec;
}
-Transform XRInterfaceGDNative::get_transform_for_eye(XRInterface::Eyes p_eye, const Transform &p_cam_transform) {
- Transform *ret;
+Transform3D XRInterfaceGDNative::get_transform_for_eye(XRInterface::Eyes p_eye, const Transform3D &p_cam_transform) {
+ Transform3D *ret;
- ERR_FAIL_COND_V(interface == nullptr, Transform());
+ ERR_FAIL_COND_V(interface == nullptr, Transform3D());
godot_transform t = interface->get_transform_for_eye(data, (int)p_eye, (godot_transform *)&p_cam_transform);
- ret = (Transform *)&t;
+ ret = (Transform3D *)&t;
return *ret;
}
@@ -243,13 +243,13 @@ godot_float GDAPI godot_xr_get_worldscale() {
godot_transform GDAPI godot_xr_get_reference_frame() {
godot_transform reference_frame;
- Transform *reference_frame_ptr = (Transform *)&reference_frame;
+ Transform3D *reference_frame_ptr = (Transform3D *)&reference_frame;
XRServer *xr_server = XRServer::get_singleton();
if (xr_server != nullptr) {
*reference_frame_ptr = xr_server->get_reference_frame();
} else {
- memnew_placement(&reference_frame, Transform);
+ memnew_placement(&reference_frame, Transform3D);
}
return reference_frame;
@@ -362,7 +362,7 @@ void GDAPI godot_xr_set_controller_transform(godot_int p_controller_id, godot_tr
Ref<XRPositionalTracker> tracker = xr_server->find_by_type_and_id(XRServer::TRACKER_CONTROLLER, p_controller_id);
if (tracker.is_valid()) {
- Transform *transform = (Transform *)p_transform;
+ Transform3D *transform = (Transform3D *)p_transform;
if (p_tracks_orientation) {
tracker->set_orientation(transform->basis);
}
diff --git a/modules/gdnative/xr/xr_interface_gdnative.h b/modules/gdnative/xr/xr_interface_gdnative.h
index 84bd8fc731..42098ebeff 100644
--- a/modules/gdnative/xr/xr_interface_gdnative.h
+++ b/modules/gdnative/xr/xr_interface_gdnative.h
@@ -73,7 +73,7 @@ public:
/** rendering and internal **/
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 Transform3D get_transform_for_eye(XRInterface::Eyes p_eye, const Transform3D &p_cam_transform) override;
// we expose a Vector<float> version of this function to GDNative
Vector<float> _get_projection_for_eye(XRInterface::Eyes p_eye, real_t p_aspect, real_t p_z_near, real_t p_z_far);