summaryrefslogtreecommitdiffstats
path: root/scene/3d/visibility_notifier.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2017-03-05 16:44:50 +0100
committerRémi Verschelde <rverschelde@gmail.com>2017-03-05 16:44:50 +0100
commit5dbf1809c6e3e905b94b8764e99491e608122261 (patch)
tree5e5a5360db15d86d59ec8c6e4f7eb511388c5a9a /scene/3d/visibility_notifier.h
parent45438e9918d421b244bfd7776a30e67dc7f2d3e3 (diff)
downloadredot-engine-5dbf1809c6e3e905b94b8764e99491e608122261.tar.gz
A Whole New World (clang-format edition)
I can show you the code Pretty, with proper whitespace Tell me, coder, now when did You last write readable code? I can open your eyes Make you see your bad indent Force you to respect the style The core devs agreed upon A whole new world A new fantastic code format A de facto standard With some sugar Enforced with clang-format A whole new world A dazzling style we all dreamed of And when we read it through It's crystal clear That now we're in a whole new world of code
Diffstat (limited to 'scene/3d/visibility_notifier.h')
-rw-r--r--scene/3d/visibility_notifier.h33
1 files changed, 13 insertions, 20 deletions
diff --git a/scene/3d/visibility_notifier.h b/scene/3d/visibility_notifier.h
index aa53e1bcd1..09c1175bf1 100644
--- a/scene/3d/visibility_notifier.h
+++ b/scene/3d/visibility_notifier.h
@@ -34,39 +34,36 @@
class Camera;
class VisibilityNotifier : public Spatial {
- GDCLASS(VisibilityNotifier,Spatial);
+ GDCLASS(VisibilityNotifier, Spatial);
- Set<Camera*> cameras;
+ Set<Camera *> cameras;
Rect3 aabb;
protected:
-
virtual void _screen_enter() {}
virtual void _screen_exit() {}
void _notification(int p_what);
static void _bind_methods();
-friend class SpatialIndexer;
+ friend class SpatialIndexer;
- void _enter_camera(Camera* p_camera);
- void _exit_camera(Camera* p_camera);
+ void _enter_camera(Camera *p_camera);
+ void _exit_camera(Camera *p_camera);
public:
-
- void set_aabb(const Rect3& p_aabb);
+ void set_aabb(const Rect3 &p_aabb);
Rect3 get_aabb() const;
bool is_on_screen() const;
VisibilityNotifier();
};
-
class VisibilityEnabler : public VisibilityNotifier {
- GDCLASS(VisibilityEnabler,VisibilityNotifier);
-public:
+ GDCLASS(VisibilityEnabler, VisibilityNotifier);
+public:
enum Enabler {
ENABLER_PAUSE_ANIMATIONS,
ENABLER_FREEZE_BODIES,
@@ -74,33 +71,29 @@ public:
};
protected:
-
virtual void _screen_enter();
virtual void _screen_exit();
bool visible;
- void _find_nodes(Node* p_node);
+ void _find_nodes(Node *p_node);
- Map<Node*,Variant> nodes;
- void _node_removed(Node* p_node);
+ Map<Node *, Variant> nodes;
+ void _node_removed(Node *p_node);
bool enabler[ENABLER_MAX];
- void _change_node_state(Node* p_node,bool p_enabled);
+ void _change_node_state(Node *p_node, bool p_enabled);
void _notification(int p_what);
static void _bind_methods();
public:
-
- void set_enabler(Enabler p_enabler,bool p_enable);
+ void set_enabler(Enabler p_enabler, bool p_enable);
bool is_enabler_enabled(Enabler p_enabler) const;
VisibilityEnabler();
-
};
VARIANT_ENUM_CAST(VisibilityEnabler::Enabler);
-
#endif // VISIBILITY_NOTIFIER_H