diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-06-03 23:07:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-03 23:07:21 +0200 |
commit | 5d9cab3aeb3c62df6b7b44e6e68c0ebbb67f7a45 (patch) | |
tree | 619055aeb386211fb83a7c861ab0f79a34aedb2d /modules/gdnative/include | |
parent | ea2a0b54554c09999d74212925322e8c7b2437e0 (diff) | |
parent | 0ac4051c00898b316ae11e7075d3f3a9e3c46be3 (diff) |
Merge pull request #38430 from aaronfranke/transform3d
Diffstat (limited to 'modules/gdnative/include')
-rw-r--r-- | modules/gdnative/include/gdnative/gdnative.h | 4 | ||||
-rw-r--r-- | modules/gdnative/include/gdnative/transform_3d.h (renamed from modules/gdnative/include/gdnative/transform.h) | 24 | ||||
-rw-r--r-- | modules/gdnative/include/gdnative/variant.h | 6 | ||||
-rw-r--r-- | modules/gdnative/include/xr/godot_xr.h | 6 |
4 files changed, 21 insertions, 19 deletions
diff --git a/modules/gdnative/include/gdnative/gdnative.h b/modules/gdnative/include/gdnative/gdnative.h index 9af9226a79..1937748bd4 100644 --- a/modules/gdnative/include/gdnative/gdnative.h +++ b/modules/gdnative/include/gdnative/gdnative.h @@ -161,9 +161,9 @@ typedef void godot_object; #include <gdnative/basis.h> -/////// Transform +/////// Transform3D -#include <gdnative/transform.h> +#include <gdnative/transform_3d.h> /////// Color diff --git a/modules/gdnative/include/gdnative/transform.h b/modules/gdnative/include/gdnative/transform_3d.h index 3861b5683a..97ad451e9b 100644 --- a/modules/gdnative/include/gdnative/transform.h +++ b/modules/gdnative/include/gdnative/transform_3d.h @@ -1,5 +1,5 @@ /*************************************************************************/ -/* transform.h */ +/* transform_3d.h */ /*************************************************************************/ /* This file is part of: */ /* GODOT ENGINE */ @@ -28,8 +28,8 @@ /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /*************************************************************************/ -#ifndef GODOT_TRANSFORM_H -#define GODOT_TRANSFORM_H +#ifndef GODOT_TRANSFORM3D_H +#define GODOT_TRANSFORM3D_H #ifdef __cplusplus extern "C" { @@ -37,22 +37,24 @@ extern "C" { #include <gdnative/math_defs.h> -#define GODOT_TRANSFORM_SIZE (sizeof(godot_real_t) * 12) +#define GODOT_TRANSFORM3D_SIZE (sizeof(godot_real_t) * 12) -#ifndef GODOT_CORE_API_GODOT_TRANSFORM_TYPE_DEFINED -#define GODOT_CORE_API_GODOT_TRANSFORM_TYPE_DEFINED +#ifndef GODOT_CORE_API_GODOT_TRANSFORM3D_TYPE_DEFINED +#define GODOT_CORE_API_GODOT_TRANSFORM3D_TYPE_DEFINED typedef struct { - uint8_t _dont_touch_that[GODOT_TRANSFORM_SIZE]; -} godot_transform; + uint8_t _dont_touch_that[GODOT_TRANSFORM3D_SIZE]; +} godot_transform3d; #endif #include <gdnative/gdnative.h> -void GDAPI godot_transform_new(godot_transform *p_self); -void GDAPI godot_transform_new_copy(godot_transform *r_dest, const godot_transform *p_src); +void GDAPI godot_transform3d_new(godot_transform3d *p_self); +void GDAPI godot_transform3d_new_copy(godot_transform3d *r_dest, const godot_transform3d *p_src); +godot_vector3 GDAPI *godot_transform3d_operator_index(godot_transform3d *p_self, godot_int p_index); +const godot_vector3 GDAPI *godot_transform3d_operator_index_const(const godot_transform3d *p_self, godot_int p_index); #ifdef __cplusplus } #endif -#endif // GODOT_TRANSFORM_H +#endif // GODOT_TRANSFORM3D_H diff --git a/modules/gdnative/include/gdnative/variant.h b/modules/gdnative/include/gdnative/variant.h index 3e06ed9aa4..60392e0cd7 100644 --- a/modules/gdnative/include/gdnative/variant.h +++ b/modules/gdnative/include/gdnative/variant.h @@ -183,8 +183,8 @@ typedef void (*godot_ptr_utility_function)(void *r_return, const void **p_argume #include <gdnative/signal.h> #include <gdnative/string.h> #include <gdnative/string_name.h> -#include <gdnative/transform.h> #include <gdnative/transform2d.h> +#include <gdnative/transform_3d.h> #include <gdnative/variant.h> #include <gdnative/vector2.h> #include <gdnative/vector3.h> @@ -211,7 +211,7 @@ void GDAPI godot_variant_new_plane(godot_variant *r_dest, const godot_plane *p_p void GDAPI godot_variant_new_quat(godot_variant *r_dest, const godot_quat *p_quat); void GDAPI godot_variant_new_aabb(godot_variant *r_dest, const godot_aabb *p_aabb); void GDAPI godot_variant_new_basis(godot_variant *r_dest, const godot_basis *p_basis); -void GDAPI godot_variant_new_transform(godot_variant *r_dest, const godot_transform *p_trans); +void GDAPI godot_variant_new_transform3d(godot_variant *r_dest, const godot_transform3d *p_trans); void GDAPI godot_variant_new_color(godot_variant *r_dest, const godot_color *p_color); void GDAPI godot_variant_new_string_name(godot_variant *r_dest, const godot_string_name *p_s); void GDAPI godot_variant_new_node_path(godot_variant *r_dest, const godot_node_path *p_np); @@ -246,7 +246,7 @@ godot_plane GDAPI godot_variant_as_plane(const godot_variant *p_self); godot_quat GDAPI godot_variant_as_quat(const godot_variant *p_self); godot_aabb GDAPI godot_variant_as_aabb(const godot_variant *p_self); 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_transform3d GDAPI godot_variant_as_transform3d(const godot_variant *p_self); godot_color GDAPI godot_variant_as_color(const godot_variant *p_self); godot_string_name GDAPI godot_variant_as_string_name(const godot_variant *p_self); godot_node_path GDAPI godot_variant_as_node_path(const godot_variant *p_self); diff --git a/modules/gdnative/include/xr/godot_xr.h b/modules/gdnative/include/xr/godot_xr.h index 7eaf1c7ec3..e09244f3f9 100644 --- a/modules/gdnative/include/xr/godot_xr.h +++ b/modules/gdnative/include/xr/godot_xr.h @@ -57,7 +57,7 @@ typedef struct { godot_bool (*initialize)(void *); void (*uninitialize)(void *); godot_vector2 (*get_render_targetsize)(const void *); - godot_transform (*get_transform_for_eye)(void *, godot_int, godot_transform *); + godot_transform3d (*get_transform_for_eye)(void *, godot_int, godot_transform3d *); void (*fill_projection_for_eye)(void *, godot_float *, godot_int, godot_float, godot_float, godot_float); void (*commit_for_eye)(void *, godot_int, godot_rid *, godot_rect2 *); void (*process)(void *); @@ -70,7 +70,7 @@ void GDAPI godot_xr_register_interface(const godot_xr_interface_gdnative *p_inte // helper functions to access XRServer data godot_float GDAPI godot_xr_get_worldscale(); -godot_transform GDAPI godot_xr_get_reference_frame(); +godot_transform3d GDAPI godot_xr_get_reference_frame(); // helper functions for rendering void GDAPI godot_xr_blit(godot_int p_eye, godot_rid *p_render_target, godot_rect2 *p_rect); @@ -79,7 +79,7 @@ godot_int GDAPI godot_xr_get_texid(godot_rid *p_render_target); // helper functions for updating XR controllers godot_int GDAPI godot_xr_add_controller(char *p_device_name, godot_int p_hand, godot_bool p_tracks_orientation, godot_bool p_tracks_position); void GDAPI godot_xr_remove_controller(godot_int p_controller_id); -void GDAPI godot_xr_set_controller_transform(godot_int p_controller_id, godot_transform *p_transform, godot_bool p_tracks_orientation, godot_bool p_tracks_position); +void GDAPI godot_xr_set_controller_transform(godot_int p_controller_id, godot_transform3d *p_transform, godot_bool p_tracks_orientation, godot_bool p_tracks_position); void GDAPI godot_xr_set_controller_button(godot_int p_controller_id, godot_int p_button, godot_bool p_is_pressed); void GDAPI godot_xr_set_controller_axis(godot_int p_controller_id, godot_int p_axis, godot_float p_value, godot_bool p_can_be_negative); godot_float GDAPI godot_xr_get_controller_rumble(godot_int p_controller_id); |