Rename Transform to Transform3D in GDNative

This commit is contained in:
Aaron Franke 2020-05-03 05:47:42 -04:00
parent a3c29ed899
commit 39e28c49ed
No known key found for this signature in database
GPG key ID: 40A1750B977E56BF
8 changed files with 42 additions and 40 deletions

View file

@ -161,9 +161,9 @@ typedef void godot_object;
#include <gdnative/basis.h>
/////// Transform
/////// Transform3D
#include <gdnative/transform.h>
#include <gdnative/transform_3d.h>
/////// Color

View file

@ -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

View file

@ -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);

View file

@ -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);