summaryrefslogtreecommitdiff
path: root/scene/resources/world_2d.h
diff options
context:
space:
mode:
Diffstat (limited to 'scene/resources/world_2d.h')
-rw-r--r--scene/resources/world_2d.h22
1 files changed, 8 insertions, 14 deletions
diff --git a/scene/resources/world_2d.h b/scene/resources/world_2d.h
index ae13367421..65f89c8f64 100644
--- a/scene/resources/world_2d.h
+++ b/scene/resources/world_2d.h
@@ -35,7 +35,7 @@
#include "core/io/resource.h"
#include "servers/physics_server_2d.h"
-class VisibilityNotifier2D;
+class VisibleOnScreenNotifier2D;
class Viewport;
struct SpatialIndexer2D;
@@ -44,31 +44,25 @@ class World2D : public Resource {
RID canvas;
RID space;
+ RID navigation_map;
- SpatialIndexer2D *indexer;
+ Set<Viewport *> viewports;
protected:
static void _bind_methods();
friend class Viewport;
- friend class VisibilityNotifier2D;
- void _register_viewport(Viewport *p_viewport, const Rect2 &p_rect);
- void _update_viewport(Viewport *p_viewport, const Rect2 &p_rect);
+ void _register_viewport(Viewport *p_viewport);
void _remove_viewport(Viewport *p_viewport);
- void _register_notifier(VisibilityNotifier2D *p_notifier, const Rect2 &p_rect);
- void _update_notifier(VisibilityNotifier2D *p_notifier, const Rect2 &p_rect);
- void _remove_notifier(VisibilityNotifier2D *p_notifier);
-
- void _update();
-
public:
- RID get_canvas();
- RID get_space();
+ RID get_canvas() const;
+ RID get_space() const;
+ RID get_navigation_map() const;
PhysicsDirectSpaceState2D *get_direct_space_state();
- void get_viewport_list(List<Viewport *> *r_viewports);
+ _FORCE_INLINE_ const Set<Viewport *> &get_viewports() { return viewports; }
World2D();
~World2D();