summaryrefslogtreecommitdiff
path: root/modules/gdnative
diff options
context:
space:
mode:
authorMarcel Admiraal <madmiraal@users.noreply.github.com>2021-01-20 07:02:02 +0000
committerMarcel Admiraal <madmiraal@users.noreply.github.com>2021-06-04 18:14:32 +0100
commit8acd13a456050ded00f0f264ff0aa91a304f6c54 (patch)
tree1cfac709a27ff9e08302269dfaf41ae4edd5e142 /modules/gdnative
parent766c6dbb24c736eb1e24ca69eb15398eac654c2c (diff)
Rename Quat to Quaternion
Diffstat (limited to 'modules/gdnative')
-rw-r--r--modules/gdnative/gdnative/quaternion.cpp (renamed from modules/gdnative/gdnative/quat.cpp)24
-rw-r--r--modules/gdnative/gdnative/variant.cpp12
-rw-r--r--modules/gdnative/gdnative_api.json28
-rw-r--r--modules/gdnative/include/gdnative/gdnative.h4
-rw-r--r--modules/gdnative/include/gdnative/quaternion.h (renamed from modules/gdnative/include/gdnative/quat.h)26
-rw-r--r--modules/gdnative/include/gdnative/variant.h8
6 files changed, 51 insertions, 51 deletions
diff --git a/modules/gdnative/gdnative/quat.cpp b/modules/gdnative/gdnative/quaternion.cpp
index 8ebcf7c91f..62bcbbd382 100644
--- a/modules/gdnative/gdnative/quat.cpp
+++ b/modules/gdnative/gdnative/quaternion.cpp
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* quat.cpp */
+/* quaternion.cpp */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,31 +28,31 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "gdnative/quat.h"
+#include "gdnative/quaternion.h"
-#include "core/math/quat.h"
+#include "core/math/quaternion.h"
-static_assert(sizeof(godot_quat) == sizeof(Quat), "Quat size mismatch");
+static_assert(sizeof(godot_quaternion) == sizeof(Quaternion), "Quaternion size mismatch");
#ifdef __cplusplus
extern "C" {
#endif
-void GDAPI godot_quat_new(godot_quat *p_self) {
- memnew_placement(p_self, Quat);
+void GDAPI godot_quaternion_new(godot_quaternion *p_self) {
+ memnew_placement(p_self, Quaternion);
}
-void GDAPI godot_quat_new_copy(godot_quat *r_dest, const godot_quat *p_src) {
- memnew_placement(r_dest, Quat(*(Quat *)p_src));
+void GDAPI godot_quaternion_new_copy(godot_quaternion *r_dest, const godot_quaternion *p_src) {
+ memnew_placement(r_dest, Quaternion(*(Quaternion *)p_src));
}
-godot_real_t GDAPI *godot_quat_operator_index(godot_quat *p_self, godot_int p_index) {
- Quat *self = (Quat *)p_self;
+godot_real_t GDAPI *godot_quaternion_operator_index(godot_quaternion *p_self, godot_int p_index) {
+ Quaternion *self = (Quaternion *)p_self;
return (godot_real_t *)&self->operator[](p_index);
}
-const godot_real_t GDAPI *godot_quat_operator_index_const(const godot_quat *p_self, godot_int p_index) {
- const Quat *self = (const Quat *)p_self;
+const godot_real_t GDAPI *godot_quaternion_operator_index_const(const godot_quaternion *p_self, godot_int p_index) {
+ const Quaternion *self = (const Quaternion *)p_self;
return (const godot_real_t *)&self->operator[](p_index);
}
diff --git a/modules/gdnative/gdnative/variant.cpp b/modules/gdnative/gdnative/variant.cpp
index c588704627..24f50a94f5 100644
--- a/modules/gdnative/gdnative/variant.cpp
+++ b/modules/gdnative/gdnative/variant.cpp
@@ -143,10 +143,10 @@ void GDAPI godot_variant_new_plane(godot_variant *r_dest, const godot_plane *p_p
memnew_placement_custom(dest, Variant, Variant(*plane));
}
-void GDAPI godot_variant_new_quat(godot_variant *r_dest, const godot_quat *p_quat) {
+void GDAPI godot_variant_new_quaternion(godot_variant *r_dest, const godot_quaternion *p_quaternion) {
Variant *dest = (Variant *)r_dest;
- const Quat *quat = (const Quat *)p_quat;
- memnew_placement_custom(dest, Variant, Variant(*quat));
+ const Quaternion *quaternion = (const Quaternion *)p_quaternion;
+ memnew_placement_custom(dest, Variant, Variant(*quaternion));
}
void GDAPI godot_variant_new_aabb(godot_variant *r_dest, const godot_aabb *p_aabb) {
@@ -378,10 +378,10 @@ godot_plane GDAPI godot_variant_as_plane(const godot_variant *p_self) {
return raw_dest;
}
-godot_quat GDAPI godot_variant_as_quat(const godot_variant *p_self) {
- godot_quat raw_dest;
+godot_quaternion GDAPI godot_variant_as_quaternion(const godot_variant *p_self) {
+ godot_quaternion raw_dest;
const Variant *self = (const Variant *)p_self;
- Quat *dest = (Quat *)&raw_dest;
+ Quaternion *dest = (Quaternion *)&raw_dest;
*dest = *self;
return raw_dest;
}
diff --git a/modules/gdnative/gdnative_api.json b/modules/gdnative/gdnative_api.json
index ec825229ac..175a6a3c91 100644
--- a/modules/gdnative/gdnative_api.json
+++ b/modules/gdnative/gdnative_api.json
@@ -469,7 +469,7 @@
]
},
{
- "name": "godot_variant_new_quat",
+ "name": "godot_variant_new_quaternion",
"return_type": "void",
"arguments": [
[
@@ -477,8 +477,8 @@
"r_dest"
],
[
- "const godot_quat *",
- "p_quat"
+ "const godot_quaternion *",
+ "p_quaternion"
]
]
},
@@ -893,8 +893,8 @@
]
},
{
- "name": "godot_variant_as_quat",
- "return_type": "godot_quat",
+ "name": "godot_variant_as_quaternion",
+ "return_type": "godot_quaternion",
"arguments": [
[
"const godot_variant *",
@@ -3866,35 +3866,35 @@
]
},
{
- "name": "godot_quat_new",
+ "name": "godot_quaternion_new",
"return_type": "void",
"arguments": [
[
- "godot_quat *",
+ "godot_quaternion *",
"p_self"
]
]
},
{
- "name": "godot_quat_new_copy",
+ "name": "godot_quaternion_new_copy",
"return_type": "void",
"arguments": [
[
- "godot_quat *",
+ "godot_quaternion *",
"r_dest"
],
[
- "const godot_quat *",
+ "const godot_quaternion *",
"p_src"
]
]
},
{
- "name": "godot_quat_operator_index",
+ "name": "godot_quaternion_operator_index",
"return_type": "godot_real_t *",
"arguments": [
[
- "godot_quat *",
+ "godot_quaternion *",
"p_self"
],
[
@@ -3904,11 +3904,11 @@
]
},
{
- "name": "godot_quat_operator_index_const",
+ "name": "godot_quaternion_operator_index_const",
"return_type": "const godot_real_t *",
"arguments": [
[
- "const godot_quat *",
+ "const godot_quaternion *",
"p_self"
],
[
diff --git a/modules/gdnative/include/gdnative/gdnative.h b/modules/gdnative/include/gdnative/gdnative.h
index 1937748bd4..d8c290f6bd 100644
--- a/modules/gdnative/include/gdnative/gdnative.h
+++ b/modules/gdnative/include/gdnative/gdnative.h
@@ -149,9 +149,9 @@ typedef void godot_object;
#include <gdnative/plane.h>
-/////// Quat
+/////// Quaternion
-#include <gdnative/quat.h>
+#include <gdnative/quaternion.h>
/////// AABB
diff --git a/modules/gdnative/include/gdnative/quat.h b/modules/gdnative/include/gdnative/quaternion.h
index 00abdb4404..75754e6ab5 100644
--- a/modules/gdnative/include/gdnative/quat.h
+++ b/modules/gdnative/include/gdnative/quaternion.h
@@ -1,5 +1,5 @@
/*************************************************************************/
-/* quat.h */
+/* quaternion.h */
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
@@ -28,8 +28,8 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#ifndef GODOT_QUAT_H
-#define GODOT_QUAT_H
+#ifndef GODOT_QUATERNION_H
+#define GODOT_QUATERNION_H
#ifdef __cplusplus
extern "C" {
@@ -37,24 +37,24 @@ extern "C" {
#include <gdnative/math_defs.h>
-#define GODOT_QUAT_SIZE (sizeof(godot_real_t) * 4)
+#define GODOT_QUATERNION_SIZE (sizeof(godot_real_t) * 4)
-#ifndef GODOT_CORE_API_GODOT_QUAT_TYPE_DEFINED
-#define GODOT_CORE_API_GODOT_QUAT_TYPE_DEFINED
+#ifndef GODOT_CORE_API_GODOT_QUATERNION_TYPE_DEFINED
+#define GODOT_CORE_API_GODOT_QUATERNION_TYPE_DEFINED
typedef struct {
- uint8_t _dont_touch_that[GODOT_QUAT_SIZE];
-} godot_quat;
+ uint8_t _dont_touch_that[GODOT_QUATERNION_SIZE];
+} godot_quaternion;
#endif
#include <gdnative/gdnative.h>
-void GDAPI godot_quat_new(godot_quat *p_self);
-void GDAPI godot_quat_new_copy(godot_quat *r_dest, const godot_quat *p_src);
-godot_real_t GDAPI *godot_quat_operator_index(godot_quat *p_self, godot_int p_index);
-const godot_real_t GDAPI *godot_quat_operator_index_const(const godot_quat *p_self, godot_int p_index);
+void GDAPI godot_quaternion_new(godot_quaternion *p_self);
+void GDAPI godot_quaternion_new_copy(godot_quaternion *r_dest, const godot_quaternion *p_src);
+godot_real_t GDAPI *godot_quaternion_operator_index(godot_quaternion *p_self, godot_int p_index);
+const godot_real_t GDAPI *godot_quaternion_operator_index_const(const godot_quaternion *p_self, godot_int p_index);
#ifdef __cplusplus
}
#endif
-#endif // GODOT_QUAT_H
+#endif // GODOT_QUATERNION_H
diff --git a/modules/gdnative/include/gdnative/variant.h b/modules/gdnative/include/gdnative/variant.h
index 6bc6435114..dd4f76cf57 100644
--- a/modules/gdnative/include/gdnative/variant.h
+++ b/modules/gdnative/include/gdnative/variant.h
@@ -56,7 +56,7 @@ typedef enum godot_variant_type {
GODOT_VARIANT_TYPE_VECTOR3I,
GODOT_VARIANT_TYPE_TRANSFORM2D,
GODOT_VARIANT_TYPE_PLANE,
- GODOT_VARIANT_TYPE_QUAT,
+ GODOT_VARIANT_TYPE_QUATERNION,
GODOT_VARIANT_TYPE_AABB,
GODOT_VARIANT_TYPE_BASIS,
GODOT_VARIANT_TYPE_TRANSFORM3D,
@@ -177,7 +177,7 @@ typedef void (*godot_ptr_utility_function)(void *r_return, const void **p_argume
#include <gdnative/node_path.h>
#include <gdnative/packed_arrays.h>
#include <gdnative/plane.h>
-#include <gdnative/quat.h>
+#include <gdnative/quaternion.h>
#include <gdnative/rect2.h>
#include <gdnative/rid.h>
#include <gdnative/signal.h>
@@ -208,7 +208,7 @@ void GDAPI godot_variant_new_vector3(godot_variant *r_dest, const godot_vector3
void GDAPI godot_variant_new_vector3i(godot_variant *r_dest, const godot_vector3i *p_v3);
void GDAPI godot_variant_new_transform2d(godot_variant *r_dest, const godot_transform2d *p_t2d);
void GDAPI godot_variant_new_plane(godot_variant *r_dest, const godot_plane *p_plane);
-void GDAPI godot_variant_new_quat(godot_variant *r_dest, const godot_quat *p_quat);
+void GDAPI godot_variant_new_quaternion(godot_variant *r_dest, const godot_quaternion *p_quaternion);
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_transform3d(godot_variant *r_dest, const godot_transform3d *p_trans);
@@ -243,7 +243,7 @@ godot_vector3 GDAPI godot_variant_as_vector3(const godot_variant *p_self);
godot_vector3i GDAPI godot_variant_as_vector3i(const godot_variant *p_self);
godot_transform2d GDAPI godot_variant_as_transform2d(const godot_variant *p_self);
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_quaternion GDAPI godot_variant_as_quaternion(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_transform3d GDAPI godot_variant_as_transform3d(const godot_variant *p_self);