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 /scene/3d/visual_instance_3d.cpp | |
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 'scene/3d/visual_instance_3d.cpp')
-rw-r--r-- | scene/3d/visual_instance_3d.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scene/3d/visual_instance_3d.cpp b/scene/3d/visual_instance_3d.cpp index d8dffe6c7d..b8a68cdca9 100644 --- a/scene/3d/visual_instance_3d.cpp +++ b/scene/3d/visual_instance_3d.cpp @@ -32,6 +32,14 @@ #include "scene/scene_string_names.h" +AABB VisualInstance3D::get_aabb() const { + AABB ret; + if (GDVIRTUAL_CALL(_get_aabb, ret)) { + return ret; + } + return AABB(); +} + AABB VisualInstance3D::get_transformed_aabb() const { return get_global_transform().xform(get_aabb()); } @@ -115,6 +123,7 @@ void VisualInstance3D::_bind_methods() { ClassDB::bind_method(D_METHOD("get_transformed_aabb"), &VisualInstance3D::get_transformed_aabb); + GDVIRTUAL_BIND(_get_aabb); ADD_PROPERTY(PropertyInfo(Variant::INT, "layers", PROPERTY_HINT_LAYERS_3D_RENDER), "set_layer_mask", "get_layer_mask"); } |