summaryrefslogtreecommitdiff
path: root/modules/gdnative
diff options
context:
space:
mode:
Diffstat (limited to 'modules/gdnative')
-rw-r--r--modules/gdnative/gdnative/transform.cpp6
-rw-r--r--modules/gdnative/gdnative/variant.cpp4
-rw-r--r--modules/gdnative/register_types.cpp2
-rw-r--r--modules/gdnative/xr/xr_interface_gdnative.cpp14
-rw-r--r--modules/gdnative/xr/xr_interface_gdnative.h2
5 files changed, 14 insertions, 14 deletions
diff --git a/modules/gdnative/gdnative/transform.cpp b/modules/gdnative/gdnative/transform.cpp
index bfaaa13db2..1a6be4b521 100644
--- a/modules/gdnative/gdnative/transform.cpp
+++ b/modules/gdnative/gdnative/transform.cpp
@@ -32,18 +32,18 @@
#include "core/math/transform.h"
-static_assert(sizeof(godot_transform) == sizeof(Transform), "Transform size mismatch");
+static_assert(sizeof(godot_transform) == sizeof(Transform3D), "Transform3D size mismatch");
#ifdef __cplusplus
extern "C" {
#endif
void GDAPI godot_transform_new(godot_transform *p_self) {
- memnew_placement(p_self, Transform);
+ memnew_placement(p_self, Transform3D);
}
void GDAPI godot_transform_new_copy(godot_transform *r_dest, const godot_transform *p_src) {
- memnew_placement(r_dest, Transform(*(Transform *)p_src));
+ memnew_placement(r_dest, Transform3D(*(Transform3D *)p_src));
}
#ifdef __cplusplus
diff --git a/modules/gdnative/gdnative/variant.cpp b/modules/gdnative/gdnative/variant.cpp
index 7801e21ab2..1256d05c24 100644
--- a/modules/gdnative/gdnative/variant.cpp
+++ b/modules/gdnative/gdnative/variant.cpp
@@ -163,7 +163,7 @@ void GDAPI godot_variant_new_basis(godot_variant *r_dest, const godot_basis *p_b
void GDAPI godot_variant_new_transform(godot_variant *r_dest, const godot_transform *p_trans) {
Variant *dest = (Variant *)r_dest;
- const Transform *trans = (const Transform *)p_trans;
+ const Transform3D *trans = (const Transform3D *)p_trans;
memnew_placement_custom(dest, Variant, Variant(*trans));
}
@@ -405,7 +405,7 @@ godot_basis GDAPI godot_variant_as_basis(const godot_variant *p_self) {
godot_transform GDAPI godot_variant_as_transform(const godot_variant *p_self) {
godot_transform raw_dest;
const Variant *self = (const Variant *)p_self;
- Transform *dest = (Transform *)&raw_dest;
+ Transform3D *dest = (Transform3D *)&raw_dest;
*dest = *self;
return raw_dest;
}
diff --git a/modules/gdnative/register_types.cpp b/modules/gdnative/register_types.cpp
index d08bde9e23..cf19c0c44c 100644
--- a/modules/gdnative/register_types.cpp
+++ b/modules/gdnative/register_types.cpp
@@ -363,7 +363,7 @@ void unregister_gdnative_types() {
print_line(String("aabb:\t") + itos(sizeof(AABB)));
print_line(String("rid:\t") + itos(sizeof(RID)));
print_line(String("string:\t") + itos(sizeof(String)));
- print_line(String("transform:\t") + itos(sizeof(Transform)));
+ print_line(String("transform:\t") + itos(sizeof(Transform3D)));
print_line(String("transfo2D:\t") + itos(sizeof(Transform2D)));
print_line(String("variant:\t") + itos(sizeof(Variant)));
print_line(String("vector2:\t") + itos(sizeof(Vector2)));
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);