diff options
author | reduz <reduzio@gmail.com> | 2022-03-10 08:17:38 +0100 |
---|---|---|
committer | reduz <reduzio@gmail.com> | 2022-03-10 12:28:11 +0100 |
commit | 6f51eca1e3045571ccc68414a922e8b0229111f0 (patch) | |
tree | 8aee693d8f1972009c5788f34fcebfd6c681e9e1 /modules/csg | |
parent | 741bbb9d7c95dfd810c113ca935a8f16238b5334 (diff) |
Discern between virtual and abstract class bindings
* Previous "virtual" classes (which can't be instantiated) are not corretly named "abstract".
* Added a new "virtual" category for classes, they can't be instantiated from the editor, but can be inherited from script and extensions.
* Converted a large amount of classes from "abstract" to "virtual" where it makes sense.
Most classes that make sense have been converted. Missing:
* Physics servers
* VideoStream
* Script* classes.
which will go in a separate PR due to the complexity involved.
Diffstat (limited to 'modules/csg')
-rw-r--r-- | modules/csg/csg_shape.cpp | 4 | ||||
-rw-r--r-- | modules/csg/csg_shape.h | 1 | ||||
-rw-r--r-- | modules/csg/register_types.cpp | 4 |
3 files changed, 2 insertions, 7 deletions
diff --git a/modules/csg/csg_shape.cpp b/modules/csg/csg_shape.cpp index fec2d3137c..137df52215 100644 --- a/modules/csg/csg_shape.cpp +++ b/modules/csg/csg_shape.cpp @@ -491,10 +491,6 @@ Vector<Vector3> CSGShape3D::get_brush_faces() { return faces; } -Vector<Face3> CSGShape3D::get_faces(uint32_t p_usage_flags) const { - return Vector<Face3>(); -} - void CSGShape3D::_notification(int p_what) { switch (p_what) { case NOTIFICATION_PARENTED: { diff --git a/modules/csg/csg_shape.h b/modules/csg/csg_shape.h index d16250e30d..4721d0c11c 100644 --- a/modules/csg/csg_shape.h +++ b/modules/csg/csg_shape.h @@ -128,7 +128,6 @@ public: virtual Vector<Vector3> get_brush_faces(); virtual AABB get_aabb() const override; - virtual Vector<Face3> get_faces(uint32_t p_usage_flags) const override; void set_use_collision(bool p_enable); bool is_using_collision() const; diff --git a/modules/csg/register_types.cpp b/modules/csg/register_types.cpp index f01907bef3..f8db42b1a9 100644 --- a/modules/csg/register_types.cpp +++ b/modules/csg/register_types.cpp @@ -36,8 +36,8 @@ void register_csg_types() { #ifndef _3D_DISABLED - GDREGISTER_VIRTUAL_CLASS(CSGShape3D); - GDREGISTER_VIRTUAL_CLASS(CSGPrimitive3D); + GDREGISTER_ABSTRACT_CLASS(CSGShape3D); + GDREGISTER_ABSTRACT_CLASS(CSGPrimitive3D); GDREGISTER_CLASS(CSGMesh3D); GDREGISTER_CLASS(CSGSphere3D); GDREGISTER_CLASS(CSGBox3D); |