Use struct instead of class for core structures
parent
4e5d0ee3a8
commit
0455f72ede
|
@ -362,7 +362,7 @@ def generate_builtin_class_header(builtin_api, size, used_classes, fully_used_cl
|
||||||
result.append("")
|
result.append("")
|
||||||
|
|
||||||
for type_name in used_classes:
|
for type_name in used_classes:
|
||||||
if is_native_struct(type_name):
|
if is_struct_type(type_name):
|
||||||
result.append(f"struct {type_name};")
|
result.append(f"struct {type_name};")
|
||||||
else:
|
else:
|
||||||
result.append(f"class {type_name};")
|
result.append(f"class {type_name};")
|
||||||
|
@ -1109,7 +1109,7 @@ def generate_engine_class_header(class_api, used_classes, fully_used_classes, us
|
||||||
result.append("")
|
result.append("")
|
||||||
|
|
||||||
for type_name in used_classes:
|
for type_name in used_classes:
|
||||||
if is_native_struct(type_name):
|
if is_struct_type(type_name):
|
||||||
result.append(f"struct {type_name};")
|
result.append(f"struct {type_name};")
|
||||||
else:
|
else:
|
||||||
result.append(f"class {type_name};")
|
result.append(f"class {type_name};")
|
||||||
|
@ -1826,15 +1826,18 @@ def is_pod_type(type_name):
|
||||||
|
|
||||||
|
|
||||||
def is_included_type(type_name):
|
def is_included_type(type_name):
|
||||||
"""
|
# Types which we already have implemented.
|
||||||
Those are types for which we already have a class file implemented.
|
return is_included_struct_type(type_name) or type_name in ["ObjectID"]
|
||||||
"""
|
|
||||||
|
|
||||||
|
def is_included_struct_type(type_name):
|
||||||
|
# Struct types which we already have implemented.
|
||||||
return type_name in [
|
return type_name in [
|
||||||
"AABB",
|
"AABB",
|
||||||
"Basis",
|
"Basis",
|
||||||
"Color",
|
"Color",
|
||||||
"ObjectID",
|
|
||||||
"Plane",
|
"Plane",
|
||||||
|
"Projection",
|
||||||
"Quaternion",
|
"Quaternion",
|
||||||
"Rect2",
|
"Rect2",
|
||||||
"Rect2i",
|
"Rect2i",
|
||||||
|
@ -1846,7 +1849,6 @@ def is_included_type(type_name):
|
||||||
"Vector3i",
|
"Vector3i",
|
||||||
"Vector4",
|
"Vector4",
|
||||||
"Vector4i",
|
"Vector4i",
|
||||||
"Projection",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
@ -1922,9 +1924,10 @@ def is_engine_class(type_name):
|
||||||
return type_name == "Object" or type_name in engine_classes
|
return type_name == "Object" or type_name in engine_classes
|
||||||
|
|
||||||
|
|
||||||
def is_native_struct(type_name):
|
def is_struct_type(type_name):
|
||||||
|
# This is used to determine which keyword to use for forward declarations.
|
||||||
global native_structures
|
global native_structures
|
||||||
return type_name in native_structures
|
return is_included_struct_type(type_name) or type_name in native_structures
|
||||||
|
|
||||||
|
|
||||||
def is_refcounted(type_name):
|
def is_refcounted(type_name):
|
||||||
|
|
|
@ -72,6 +72,10 @@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef _NO_DISCARD_
|
||||||
|
#define _NO_DISCARD_ [[nodiscard]]
|
||||||
|
#endif
|
||||||
|
|
||||||
// Windows badly defines a lot of stuff we'll never use. Undefine it.
|
// Windows badly defines a lot of stuff we'll never use. Undefine it.
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#undef min // override standard definition
|
#undef min // override standard definition
|
||||||
|
|
|
@ -43,12 +43,7 @@
|
||||||
|
|
||||||
namespace godot {
|
namespace godot {
|
||||||
|
|
||||||
class AABB {
|
struct _NO_DISCARD_ AABB {
|
||||||
_FORCE_INLINE_ GDNativeTypePtr _native_ptr() const { return (void *)this; }
|
|
||||||
|
|
||||||
friend class Variant;
|
|
||||||
|
|
||||||
public:
|
|
||||||
Vector3 position;
|
Vector3 position;
|
||||||
Vector3 size;
|
Vector3 size;
|
||||||
|
|
||||||
|
|
|
@ -37,12 +37,7 @@
|
||||||
|
|
||||||
namespace godot {
|
namespace godot {
|
||||||
|
|
||||||
class Basis {
|
struct _NO_DISCARD_ Basis {
|
||||||
_FORCE_INLINE_ GDNativeTypePtr _native_ptr() const { return (void *)this; }
|
|
||||||
|
|
||||||
friend class Variant;
|
|
||||||
|
|
||||||
public:
|
|
||||||
Vector3 rows[3] = {
|
Vector3 rows[3] = {
|
||||||
Vector3(1, 0, 0),
|
Vector3(1, 0, 0),
|
||||||
Vector3(0, 1, 0),
|
Vector3(0, 1, 0),
|
||||||
|
|
|
@ -37,12 +37,7 @@ namespace godot {
|
||||||
|
|
||||||
class String;
|
class String;
|
||||||
|
|
||||||
class Color {
|
struct _NO_DISCARD_ Color {
|
||||||
_FORCE_INLINE_ GDNativeTypePtr _native_ptr() const { return (void *)this; }
|
|
||||||
|
|
||||||
friend class Variant;
|
|
||||||
|
|
||||||
public:
|
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
float r;
|
float r;
|
||||||
|
|
|
@ -37,12 +37,7 @@
|
||||||
|
|
||||||
namespace godot {
|
namespace godot {
|
||||||
|
|
||||||
class Plane {
|
struct _NO_DISCARD_ Plane {
|
||||||
_FORCE_INLINE_ GDNativeTypePtr _native_ptr() const { return (void *)this; }
|
|
||||||
|
|
||||||
friend class Variant;
|
|
||||||
|
|
||||||
public:
|
|
||||||
Vector3 normal;
|
Vector3 normal;
|
||||||
real_t d = 0;
|
real_t d = 0;
|
||||||
|
|
||||||
|
|
|
@ -39,18 +39,13 @@
|
||||||
|
|
||||||
namespace godot {
|
namespace godot {
|
||||||
|
|
||||||
class AABB;
|
struct AABB;
|
||||||
class Plane;
|
struct Plane;
|
||||||
class Rect2;
|
struct Rect2;
|
||||||
class Transform3D;
|
struct Transform3D;
|
||||||
class Vector2;
|
struct Vector2;
|
||||||
|
|
||||||
class Projection {
|
struct _NO_DISCARD_ Projection {
|
||||||
_FORCE_INLINE_ GDNativeTypePtr _native_ptr() const { return (void *)this; }
|
|
||||||
|
|
||||||
friend class Variant;
|
|
||||||
|
|
||||||
public:
|
|
||||||
enum Planes {
|
enum Planes {
|
||||||
PLANE_NEAR,
|
PLANE_NEAR,
|
||||||
PLANE_FAR,
|
PLANE_FAR,
|
||||||
|
|
|
@ -36,12 +36,7 @@
|
||||||
|
|
||||||
namespace godot {
|
namespace godot {
|
||||||
|
|
||||||
class Quaternion {
|
struct _NO_DISCARD_ Quaternion {
|
||||||
_FORCE_INLINE_ GDNativeTypePtr _native_ptr() const { return (void *)this; }
|
|
||||||
|
|
||||||
friend class Variant;
|
|
||||||
|
|
||||||
public:
|
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
real_t x;
|
real_t x;
|
||||||
|
|
|
@ -37,16 +37,11 @@
|
||||||
|
|
||||||
namespace godot {
|
namespace godot {
|
||||||
|
|
||||||
class Rect2i;
|
|
||||||
class String;
|
class String;
|
||||||
class Transform2D;
|
struct Rect2i;
|
||||||
|
struct Transform2D;
|
||||||
|
|
||||||
class Rect2 {
|
struct _NO_DISCARD_ Rect2 {
|
||||||
_FORCE_INLINE_ GDNativeTypePtr _native_ptr() const { return (void *)this; }
|
|
||||||
|
|
||||||
friend class Variant;
|
|
||||||
|
|
||||||
public:
|
|
||||||
Point2 position;
|
Point2 position;
|
||||||
Size2 size;
|
Size2 size;
|
||||||
|
|
||||||
|
|
|
@ -37,15 +37,10 @@
|
||||||
|
|
||||||
namespace godot {
|
namespace godot {
|
||||||
|
|
||||||
class Rect2;
|
|
||||||
class String;
|
class String;
|
||||||
|
struct Rect2;
|
||||||
|
|
||||||
class Rect2i {
|
struct _NO_DISCARD_ Rect2i {
|
||||||
_FORCE_INLINE_ GDNativeTypePtr _native_ptr() const { return (void *)this; }
|
|
||||||
|
|
||||||
friend class Variant;
|
|
||||||
|
|
||||||
public:
|
|
||||||
Point2i position;
|
Point2i position;
|
||||||
Size2i size;
|
Size2i size;
|
||||||
|
|
||||||
|
|
|
@ -39,12 +39,7 @@
|
||||||
|
|
||||||
namespace godot {
|
namespace godot {
|
||||||
|
|
||||||
class Transform2D {
|
struct _NO_DISCARD_ Transform2D {
|
||||||
_FORCE_INLINE_ GDNativeTypePtr _native_ptr() const { return (void *)this; }
|
|
||||||
|
|
||||||
friend class Variant;
|
|
||||||
|
|
||||||
public:
|
|
||||||
// Warning #1: basis of Transform2D is stored differently from Basis. In terms of columns array, the basis matrix looks like "on paper":
|
// Warning #1: basis of Transform2D is stored differently from Basis. In terms of columns array, the basis matrix looks like "on paper":
|
||||||
// M = (columns[0][0] columns[1][0])
|
// M = (columns[0][0] columns[1][0])
|
||||||
// (columns[0][1] columns[1][1])
|
// (columns[0][1] columns[1][1])
|
||||||
|
|
|
@ -39,12 +39,7 @@
|
||||||
|
|
||||||
namespace godot {
|
namespace godot {
|
||||||
|
|
||||||
class Transform3D {
|
struct _NO_DISCARD_ Transform3D {
|
||||||
_FORCE_INLINE_ GDNativeTypePtr _native_ptr() const { return (void *)this; }
|
|
||||||
|
|
||||||
friend class Variant;
|
|
||||||
|
|
||||||
public:
|
|
||||||
Basis basis;
|
Basis basis;
|
||||||
Vector3 origin;
|
Vector3 origin;
|
||||||
|
|
||||||
|
|
|
@ -37,14 +37,9 @@
|
||||||
namespace godot {
|
namespace godot {
|
||||||
|
|
||||||
class String;
|
class String;
|
||||||
class Vector2i;
|
struct Vector2i;
|
||||||
|
|
||||||
class Vector2 {
|
struct _NO_DISCARD_ Vector2 {
|
||||||
_FORCE_INLINE_ GDNativeTypePtr _native_ptr() const { return (void *)this; }
|
|
||||||
|
|
||||||
friend class Variant;
|
|
||||||
|
|
||||||
public:
|
|
||||||
static const int AXIS_COUNT = 2;
|
static const int AXIS_COUNT = 2;
|
||||||
|
|
||||||
enum Axis {
|
enum Axis {
|
||||||
|
|
|
@ -37,14 +37,9 @@
|
||||||
namespace godot {
|
namespace godot {
|
||||||
|
|
||||||
class String;
|
class String;
|
||||||
class Vector2;
|
struct Vector2;
|
||||||
|
|
||||||
class Vector2i {
|
struct _NO_DISCARD_ Vector2i {
|
||||||
_FORCE_INLINE_ GDNativeTypePtr _native_ptr() const { return (void *)this; }
|
|
||||||
|
|
||||||
friend class Variant;
|
|
||||||
|
|
||||||
public:
|
|
||||||
static const int AXIS_COUNT = 2;
|
static const int AXIS_COUNT = 2;
|
||||||
|
|
||||||
enum Axis {
|
enum Axis {
|
||||||
|
|
|
@ -36,17 +36,12 @@
|
||||||
|
|
||||||
namespace godot {
|
namespace godot {
|
||||||
|
|
||||||
class Basis;
|
|
||||||
class String;
|
class String;
|
||||||
class Vector2;
|
struct Basis;
|
||||||
class Vector3i;
|
struct Vector2;
|
||||||
|
struct Vector3i;
|
||||||
|
|
||||||
class Vector3 {
|
struct _NO_DISCARD_ Vector3 {
|
||||||
_FORCE_INLINE_ GDNativeTypePtr _native_ptr() const { return (void *)this; }
|
|
||||||
|
|
||||||
friend class Variant;
|
|
||||||
|
|
||||||
public:
|
|
||||||
static const int AXIS_COUNT = 3;
|
static const int AXIS_COUNT = 3;
|
||||||
|
|
||||||
enum Axis {
|
enum Axis {
|
||||||
|
|
|
@ -37,14 +37,9 @@
|
||||||
namespace godot {
|
namespace godot {
|
||||||
|
|
||||||
class String;
|
class String;
|
||||||
class Vector3;
|
struct Vector3;
|
||||||
|
|
||||||
class Vector3i {
|
struct _NO_DISCARD_ Vector3i {
|
||||||
_FORCE_INLINE_ GDNativeTypePtr _native_ptr() const { return (void *)this; }
|
|
||||||
|
|
||||||
friend class Variant;
|
|
||||||
|
|
||||||
public:
|
|
||||||
static const int AXIS_COUNT = 3;
|
static const int AXIS_COUNT = 3;
|
||||||
|
|
||||||
enum Axis {
|
enum Axis {
|
||||||
|
|
|
@ -38,12 +38,7 @@ namespace godot {
|
||||||
|
|
||||||
class String;
|
class String;
|
||||||
|
|
||||||
class Vector4 {
|
struct _NO_DISCARD_ Vector4 {
|
||||||
_FORCE_INLINE_ GDNativeTypePtr _native_ptr() const { return (void *)this; }
|
|
||||||
|
|
||||||
friend class Variant;
|
|
||||||
|
|
||||||
public:
|
|
||||||
static const int AXIS_COUNT = 4;
|
static const int AXIS_COUNT = 4;
|
||||||
|
|
||||||
enum Axis {
|
enum Axis {
|
||||||
|
|
|
@ -37,14 +37,9 @@
|
||||||
namespace godot {
|
namespace godot {
|
||||||
|
|
||||||
class String;
|
class String;
|
||||||
class Vector4;
|
struct Vector4;
|
||||||
|
|
||||||
class Vector4i {
|
struct _NO_DISCARD_ Vector4i {
|
||||||
_FORCE_INLINE_ GDNativeTypePtr _native_ptr() const { return (void *)this; }
|
|
||||||
|
|
||||||
friend class Variant;
|
|
||||||
|
|
||||||
public:
|
|
||||||
static const int AXIS_COUNT = 4;
|
static const int AXIS_COUNT = 4;
|
||||||
|
|
||||||
enum Axis {
|
enum Axis {
|
||||||
|
|
|
@ -107,67 +107,67 @@ Variant::Variant(const String &v) {
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant::Variant(const Vector2 &v) {
|
Variant::Variant(const Vector2 &v) {
|
||||||
from_type_constructor[VECTOR2](_native_ptr(), v._native_ptr());
|
from_type_constructor[VECTOR2](_native_ptr(), (GDNativeTypePtr)&v);
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant::Variant(const Vector2i &v) {
|
Variant::Variant(const Vector2i &v) {
|
||||||
from_type_constructor[VECTOR2I](_native_ptr(), v._native_ptr());
|
from_type_constructor[VECTOR2I](_native_ptr(), (GDNativeTypePtr)&v);
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant::Variant(const Rect2 &v) {
|
Variant::Variant(const Rect2 &v) {
|
||||||
from_type_constructor[RECT2](_native_ptr(), v._native_ptr());
|
from_type_constructor[RECT2](_native_ptr(), (GDNativeTypePtr)&v);
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant::Variant(const Rect2i &v) {
|
Variant::Variant(const Rect2i &v) {
|
||||||
from_type_constructor[RECT2I](_native_ptr(), v._native_ptr());
|
from_type_constructor[RECT2I](_native_ptr(), (GDNativeTypePtr)&v);
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant::Variant(const Vector3 &v) {
|
Variant::Variant(const Vector3 &v) {
|
||||||
from_type_constructor[VECTOR3](_native_ptr(), v._native_ptr());
|
from_type_constructor[VECTOR3](_native_ptr(), (GDNativeTypePtr)&v);
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant::Variant(const Vector3i &v) {
|
Variant::Variant(const Vector3i &v) {
|
||||||
from_type_constructor[VECTOR3I](_native_ptr(), v._native_ptr());
|
from_type_constructor[VECTOR3I](_native_ptr(), (GDNativeTypePtr)&v);
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant::Variant(const Transform2D &v) {
|
Variant::Variant(const Transform2D &v) {
|
||||||
from_type_constructor[TRANSFORM2D](_native_ptr(), v._native_ptr());
|
from_type_constructor[TRANSFORM2D](_native_ptr(), (GDNativeTypePtr)&v);
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant::Variant(const Vector4 &v) {
|
Variant::Variant(const Vector4 &v) {
|
||||||
from_type_constructor[VECTOR4](_native_ptr(), v._native_ptr());
|
from_type_constructor[VECTOR4](_native_ptr(), (GDNativeTypePtr)&v);
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant::Variant(const Vector4i &v) {
|
Variant::Variant(const Vector4i &v) {
|
||||||
from_type_constructor[VECTOR4I](_native_ptr(), v._native_ptr());
|
from_type_constructor[VECTOR4I](_native_ptr(), (GDNativeTypePtr)&v);
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant::Variant(const Plane &v) {
|
Variant::Variant(const Plane &v) {
|
||||||
from_type_constructor[PLANE](_native_ptr(), v._native_ptr());
|
from_type_constructor[PLANE](_native_ptr(), (GDNativeTypePtr)&v);
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant::Variant(const Quaternion &v) {
|
Variant::Variant(const Quaternion &v) {
|
||||||
from_type_constructor[QUATERNION](_native_ptr(), v._native_ptr());
|
from_type_constructor[QUATERNION](_native_ptr(), (GDNativeTypePtr)&v);
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant::Variant(const godot::AABB &v) {
|
Variant::Variant(const godot::AABB &v) {
|
||||||
from_type_constructor[AABB](_native_ptr(), v._native_ptr());
|
from_type_constructor[AABB](_native_ptr(), (GDNativeTypePtr)&v);
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant::Variant(const Basis &v) {
|
Variant::Variant(const Basis &v) {
|
||||||
from_type_constructor[BASIS](_native_ptr(), v._native_ptr());
|
from_type_constructor[BASIS](_native_ptr(), (GDNativeTypePtr)&v);
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant::Variant(const Transform3D &v) {
|
Variant::Variant(const Transform3D &v) {
|
||||||
from_type_constructor[TRANSFORM3D](_native_ptr(), v._native_ptr());
|
from_type_constructor[TRANSFORM3D](_native_ptr(), (GDNativeTypePtr)&v);
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant::Variant(const Projection &v) {
|
Variant::Variant(const Projection &v) {
|
||||||
from_type_constructor[PROJECTION](_native_ptr(), v._native_ptr());
|
from_type_constructor[PROJECTION](_native_ptr(), (GDNativeTypePtr)&v);
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant::Variant(const Color &v) {
|
Variant::Variant(const Color &v) {
|
||||||
from_type_constructor[COLOR](_native_ptr(), v._native_ptr());
|
from_type_constructor[COLOR](_native_ptr(), (GDNativeTypePtr)&v);
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant::Variant(const StringName &v) {
|
Variant::Variant(const StringName &v) {
|
||||||
|
@ -289,97 +289,97 @@ Variant::operator String() const {
|
||||||
|
|
||||||
Variant::operator Vector2() const {
|
Variant::operator Vector2() const {
|
||||||
Vector2 result;
|
Vector2 result;
|
||||||
to_type_constructor[VECTOR2](result._native_ptr(), _native_ptr());
|
to_type_constructor[VECTOR2]((GDNativeTypePtr)&result, _native_ptr());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant::operator Vector2i() const {
|
Variant::operator Vector2i() const {
|
||||||
Vector2i result;
|
Vector2i result;
|
||||||
to_type_constructor[VECTOR2I](result._native_ptr(), _native_ptr());
|
to_type_constructor[VECTOR2I]((GDNativeTypePtr)&result, _native_ptr());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant::operator Rect2() const {
|
Variant::operator Rect2() const {
|
||||||
Rect2 result;
|
Rect2 result;
|
||||||
to_type_constructor[RECT2](result._native_ptr(), _native_ptr());
|
to_type_constructor[RECT2]((GDNativeTypePtr)&result, _native_ptr());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant::operator Rect2i() const {
|
Variant::operator Rect2i() const {
|
||||||
Rect2i result;
|
Rect2i result;
|
||||||
to_type_constructor[RECT2I](result._native_ptr(), _native_ptr());
|
to_type_constructor[RECT2I]((GDNativeTypePtr)&result, _native_ptr());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant::operator Vector3() const {
|
Variant::operator Vector3() const {
|
||||||
Vector3 result;
|
Vector3 result;
|
||||||
to_type_constructor[VECTOR3](result._native_ptr(), _native_ptr());
|
to_type_constructor[VECTOR3]((GDNativeTypePtr)&result, _native_ptr());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant::operator Vector3i() const {
|
Variant::operator Vector3i() const {
|
||||||
Vector3i result;
|
Vector3i result;
|
||||||
to_type_constructor[VECTOR3I](result._native_ptr(), _native_ptr());
|
to_type_constructor[VECTOR3I]((GDNativeTypePtr)&result, _native_ptr());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant::operator Transform2D() const {
|
Variant::operator Transform2D() const {
|
||||||
Transform2D result;
|
Transform2D result;
|
||||||
to_type_constructor[TRANSFORM2D](result._native_ptr(), _native_ptr());
|
to_type_constructor[TRANSFORM2D]((GDNativeTypePtr)&result, _native_ptr());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant::operator Vector4() const {
|
Variant::operator Vector4() const {
|
||||||
Vector4 result;
|
Vector4 result;
|
||||||
to_type_constructor[VECTOR4](result._native_ptr(), _native_ptr());
|
to_type_constructor[VECTOR4]((GDNativeTypePtr)&result, _native_ptr());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant::operator Vector4i() const {
|
Variant::operator Vector4i() const {
|
||||||
Vector4i result;
|
Vector4i result;
|
||||||
to_type_constructor[VECTOR4I](result._native_ptr(), _native_ptr());
|
to_type_constructor[VECTOR4I]((GDNativeTypePtr)&result, _native_ptr());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant::operator Plane() const {
|
Variant::operator Plane() const {
|
||||||
Plane result;
|
Plane result;
|
||||||
to_type_constructor[PLANE](result._native_ptr(), _native_ptr());
|
to_type_constructor[PLANE]((GDNativeTypePtr)&result, _native_ptr());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant::operator Quaternion() const {
|
Variant::operator Quaternion() const {
|
||||||
Quaternion result;
|
Quaternion result;
|
||||||
to_type_constructor[QUATERNION](result._native_ptr(), _native_ptr());
|
to_type_constructor[QUATERNION]((GDNativeTypePtr)&result, _native_ptr());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant::operator godot::AABB() const {
|
Variant::operator godot::AABB() const {
|
||||||
godot::AABB result;
|
godot::AABB result;
|
||||||
to_type_constructor[AABB](result._native_ptr(), _native_ptr());
|
to_type_constructor[AABB]((GDNativeTypePtr)&result, _native_ptr());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant::operator Basis() const {
|
Variant::operator Basis() const {
|
||||||
Basis result;
|
Basis result;
|
||||||
to_type_constructor[BASIS](result._native_ptr(), _native_ptr());
|
to_type_constructor[BASIS]((GDNativeTypePtr)&result, _native_ptr());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant::operator Transform3D() const {
|
Variant::operator Transform3D() const {
|
||||||
Transform3D result;
|
Transform3D result;
|
||||||
to_type_constructor[TRANSFORM3D](result._native_ptr(), _native_ptr());
|
to_type_constructor[TRANSFORM3D]((GDNativeTypePtr)&result, _native_ptr());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant::operator Projection() const {
|
Variant::operator Projection() const {
|
||||||
Projection result;
|
Projection result;
|
||||||
to_type_constructor[PROJECTION](result._native_ptr(), _native_ptr());
|
to_type_constructor[PROJECTION]((GDNativeTypePtr)&result, _native_ptr());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant::operator Color() const {
|
Variant::operator Color() const {
|
||||||
Color result;
|
Color result;
|
||||||
to_type_constructor[COLOR](result._native_ptr(), _native_ptr());
|
to_type_constructor[COLOR]((GDNativeTypePtr)&result, _native_ptr());
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue