summaryrefslogtreecommitdiff
path: root/modules/mono/mono_gd
diff options
context:
space:
mode:
authorFerenc Arn <tagcup@yahoo.com>2017-11-16 21:09:00 -0500
committerFerenc Arn <tagcup@yahoo.com>2017-11-17 11:01:41 -0500
commitd28763a4c1792dc00fde3d151eaea54f9cf2b8a9 (patch)
tree7abd311b6e672829bd751fbf4d9135b60f2f9913 /modules/mono/mono_gd
parentb44cb4e3b9b573a3cbbd6f71aff81e6c3465d84b (diff)
Rename Rect3 to AABB.
Fixes #12973.
Diffstat (limited to 'modules/mono/mono_gd')
-rw-r--r--modules/mono/mono_gd/gd_mono_field.cpp6
-rw-r--r--modules/mono/mono_gd/gd_mono_marshal.cpp16
-rw-r--r--modules/mono/mono_gd/gd_mono_marshal.h8
-rw-r--r--modules/mono/mono_gd/gd_mono_utils.cpp6
-rw-r--r--modules/mono/mono_gd/gd_mono_utils.h4
5 files changed, 20 insertions, 20 deletions
diff --git a/modules/mono/mono_gd/gd_mono_field.cpp b/modules/mono/mono_gd/gd_mono_field.cpp
index 1643f8cfc5..1bee1115a6 100644
--- a/modules/mono/mono_gd/gd_mono_field.cpp
+++ b/modules/mono/mono_gd/gd_mono_field.cpp
@@ -129,8 +129,8 @@ void GDMonoField::set_value(MonoObject *p_object, const Variant &p_value) {
if (tclass == CACHED_CLASS(Transform))
SET_FROM_STRUCT_AND_BREAK(Transform);
- if (tclass == CACHED_CLASS(Rect3))
- SET_FROM_STRUCT_AND_BREAK(Rect3);
+ if (tclass == CACHED_CLASS(AABB))
+ SET_FROM_STRUCT_AND_BREAK(AABB);
if (tclass == CACHED_CLASS(Color))
SET_FROM_STRUCT_AND_BREAK(Color);
@@ -229,7 +229,7 @@ void GDMonoField::set_value(MonoObject *p_object, const Variant &p_value) {
case Variant::TRANSFORM2D: SET_FROM_STRUCT_AND_BREAK(Transform2D);
case Variant::PLANE: SET_FROM_STRUCT_AND_BREAK(Plane);
case Variant::QUAT: SET_FROM_STRUCT_AND_BREAK(Quat);
- case Variant::RECT3: SET_FROM_STRUCT_AND_BREAK(Rect3);
+ case Variant::AABB: SET_FROM_STRUCT_AND_BREAK(AABB);
case Variant::BASIS: SET_FROM_STRUCT_AND_BREAK(Basis);
case Variant::TRANSFORM: SET_FROM_STRUCT_AND_BREAK(Transform);
case Variant::COLOR: SET_FROM_STRUCT_AND_BREAK(Color);
diff --git a/modules/mono/mono_gd/gd_mono_marshal.cpp b/modules/mono/mono_gd/gd_mono_marshal.cpp
index 01392447f3..9c415951bb 100644
--- a/modules/mono/mono_gd/gd_mono_marshal.cpp
+++ b/modules/mono/mono_gd/gd_mono_marshal.cpp
@@ -104,8 +104,8 @@ Variant::Type managed_to_variant_type(const ManagedType &p_type) {
if (tclass == CACHED_CLASS(Transform))
return Variant::TRANSFORM;
- if (tclass == CACHED_CLASS(Rect3))
- return Variant::RECT3;
+ if (tclass == CACHED_CLASS(AABB))
+ return Variant::AABB;
if (tclass == CACHED_CLASS(Color))
return Variant::COLOR;
@@ -297,8 +297,8 @@ MonoObject *variant_to_mono_object(const Variant *p_var, const ManagedType &p_ty
if (tclass == CACHED_CLASS(Transform))
RETURN_BOXED_STRUCT(Transform, p_var);
- if (tclass == CACHED_CLASS(Rect3))
- RETURN_BOXED_STRUCT(Rect3, p_var);
+ if (tclass == CACHED_CLASS(AABB))
+ RETURN_BOXED_STRUCT(AABB, p_var);
if (tclass == CACHED_CLASS(Color))
RETURN_BOXED_STRUCT(Color, p_var);
@@ -394,8 +394,8 @@ MonoObject *variant_to_mono_object(const Variant *p_var, const ManagedType &p_ty
RETURN_BOXED_STRUCT(Plane, p_var);
case Variant::QUAT:
RETURN_BOXED_STRUCT(Quat, p_var);
- case Variant::RECT3:
- RETURN_BOXED_STRUCT(Rect3, p_var);
+ case Variant::AABB:
+ RETURN_BOXED_STRUCT(AABB, p_var);
case Variant::BASIS:
RETURN_BOXED_STRUCT(Basis, p_var);
case Variant::TRANSFORM:
@@ -518,8 +518,8 @@ Variant mono_object_to_variant(MonoObject *p_obj, const ManagedType &p_type) {
if (tclass == CACHED_CLASS(Transform))
RETURN_UNBOXED_STRUCT(Transform, p_obj);
- if (tclass == CACHED_CLASS(Rect3))
- RETURN_UNBOXED_STRUCT(Rect3, p_obj);
+ if (tclass == CACHED_CLASS(AABB))
+ RETURN_UNBOXED_STRUCT(AABB, p_obj);
if (tclass == CACHED_CLASS(Color))
RETURN_UNBOXED_STRUCT(Color, p_obj);
diff --git a/modules/mono/mono_gd/gd_mono_marshal.h b/modules/mono/mono_gd/gd_mono_marshal.h
index 9f403b787f..443e947fb5 100644
--- a/modules/mono/mono_gd/gd_mono_marshal.h
+++ b/modules/mono/mono_gd/gd_mono_marshal.h
@@ -197,10 +197,10 @@ Dictionary mono_object_to_Dictionary(MonoObject *p_dict);
Basis(m_in[0], m_in[1], m_in[2], m_in[3], m_in[4], m_in[5], m_in[6], m_in[7], m_in[8]), \
Vector3(m_in[9], m_in[10], m_in[11]));
-// Rect3
+// AABB
-#define MARSHALLED_OUT_Rect3(m_in, m_out) real_t m_out[6] = { m_in.position.x, m_in.position.y, m_in.position.z, m_in.size.x, m_in.size.y, m_in.size.z };
-#define MARSHALLED_IN_Rect3(m_in, m_out) Rect3 m_out(Vector3(m_in[0], m_in[1], m_in[2]), Vector3(m_in[3], m_in[4], m_in[5]));
+#define MARSHALLED_OUT_AABB(m_in, m_out) real_t m_out[6] = { m_in.position.x, m_in.position.y, m_in.position.z, m_in.size.x, m_in.size.y, m_in.size.z };
+#define MARSHALLED_IN_AABB(m_in, m_out) AABB m_out(Vector3(m_in[0], m_in[1], m_in[2]), Vector3(m_in[3], m_in[4], m_in[5]));
// Color
@@ -214,6 +214,6 @@ Dictionary mono_object_to_Dictionary(MonoObject *p_dict);
#endif
-} // GDMonoMarshal
+} // namespace GDMonoMarshal
#endif // GDMONOMARSHAL_H
diff --git a/modules/mono/mono_gd/gd_mono_utils.cpp b/modules/mono/mono_gd/gd_mono_utils.cpp
index 53e45002c4..1cccd0ad9d 100644
--- a/modules/mono/mono_gd/gd_mono_utils.cpp
+++ b/modules/mono/mono_gd/gd_mono_utils.cpp
@@ -80,7 +80,7 @@ void MonoCache::clear_members() {
class_Basis = NULL;
class_Quat = NULL;
class_Transform = NULL;
- class_Rect3 = NULL;
+ class_AABB = NULL;
class_Color = NULL;
class_Plane = NULL;
class_NodePath = NULL;
@@ -147,7 +147,7 @@ void update_godot_api_cache() {
CACHE_CLASS_AND_CHECK(Basis, GODOT_API_CLASS(Basis));
CACHE_CLASS_AND_CHECK(Quat, GODOT_API_CLASS(Quat));
CACHE_CLASS_AND_CHECK(Transform, GODOT_API_CLASS(Transform));
- CACHE_CLASS_AND_CHECK(Rect3, GODOT_API_CLASS(Rect3));
+ CACHE_CLASS_AND_CHECK(AABB, GODOT_API_CLASS(AABB));
CACHE_CLASS_AND_CHECK(Color, GODOT_API_CLASS(Color));
CACHE_CLASS_AND_CHECK(Plane, GODOT_API_CLASS(Plane));
CACHE_CLASS_AND_CHECK(NodePath, GODOT_API_CLASS(NodePath));
@@ -364,4 +364,4 @@ String get_exception_name_and_message(MonoObject *p_ex) {
return res;
}
-}
+} // namespace GDMonoUtils
diff --git a/modules/mono/mono_gd/gd_mono_utils.h b/modules/mono/mono_gd/gd_mono_utils.h
index ebb5d28e4d..c38f8c5af5 100644
--- a/modules/mono/mono_gd/gd_mono_utils.h
+++ b/modules/mono/mono_gd/gd_mono_utils.h
@@ -82,7 +82,7 @@ struct MonoCache {
GDMonoClass *class_Basis;
GDMonoClass *class_Quat;
GDMonoClass *class_Transform;
- GDMonoClass *class_Rect3;
+ GDMonoClass *class_AABB;
GDMonoClass *class_Color;
GDMonoClass *class_Plane;
GDMonoClass *class_NodePath;
@@ -166,7 +166,7 @@ MonoDomain *create_domain(const String &p_friendly_name);
String get_exception_name_and_message(MonoObject *p_ex);
-} // GDMonoUtils
+} // namespace GDMonoUtils
#define NATIVE_GDMONOCLASS_NAME(m_class) (GDMonoMarshal::mono_string_to_godot((MonoString *)m_class->get_field(BINDINGS_NATIVE_NAME_FIELD)->get_value(NULL)))