diff options
| author | Rémi Verschelde | 2017-03-05 16:44:50 +0100 |
|---|---|---|
| committer | Rémi Verschelde | 2017-03-05 16:44:50 +0100 |
| commit | 5dbf1809c6e3e905b94b8764e99491e608122261 (patch) | |
| tree | 5e5a5360db15d86d59ec8c6e4f7eb511388c5a9a /scene/3d/collision_object.h | |
| parent | 45438e9918d421b244bfd7776a30e67dc7f2d3e3 (diff) | |
| download | godot-5dbf180.tar.gz godot-5dbf180.tar.zst godot-5dbf180.zip | |
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/collision_object.h')
| -rw-r--r-- | scene/3d/collision_object.h | 36 |
1 files changed, 16 insertions, 20 deletions
diff --git a/scene/3d/collision_object.h b/scene/3d/collision_object.h index b89b7e336..9b124cf27 100644 --- a/scene/3d/collision_object.h +++ b/scene/3d/collision_object.h @@ -34,7 +34,7 @@ class CollisionObject : public Spatial { - GDCLASS( CollisionObject, Spatial ); + GDCLASS(CollisionObject, Spatial); bool area; RID rid; @@ -42,12 +42,11 @@ class CollisionObject : public Spatial { struct ShapeData { Transform xform; Ref<Shape> shape; - bool trigger; - - ShapeData() { - trigger=false; - } + bool trigger; + ShapeData() { + trigger = false; + } }; bool capture_input_on_drag; @@ -57,30 +56,28 @@ class CollisionObject : public Spatial { void _update_pickable(); void _update_shapes(); -friend class CollisionShape; -friend class CollisionPolygon; + friend class CollisionShape; + friend class CollisionPolygon; void _update_shapes_from_children(); -protected: +protected: CollisionObject(RID p_rid, bool p_area); void _notification(int p_what); - bool _set(const StringName& p_name, const Variant& p_value); - bool _get(const StringName& p_name,Variant &r_ret) const; - void _get_property_list( List<PropertyInfo> *p_list) const; + bool _set(const StringName &p_name, const Variant &p_value); + bool _get(const StringName &p_name, Variant &r_ret) const; + void _get_property_list(List<PropertyInfo> *p_list) const; static void _bind_methods(); -friend class Viewport; - virtual void _input_event(Node* p_camera,const InputEvent& p_input_event,const Vector3& p_pos, const Vector3& p_normal, int p_shape); + friend class Viewport; + virtual void _input_event(Node *p_camera, const InputEvent &p_input_event, const Vector3 &p_pos, const Vector3 &p_normal, int p_shape); virtual void _mouse_enter(); virtual void _mouse_exit(); public: - - - void add_shape(const Ref<Shape>& p_shape, const Transform& p_transform=Transform()); + void add_shape(const Ref<Shape> &p_shape, const Transform &p_transform = Transform()); int get_shape_count() const; - void set_shape(int p_shape_idx, const Ref<Shape>& p_shape); - void set_shape_transform(int p_shape_idx, const Transform& p_transform); + void set_shape(int p_shape_idx, const Ref<Shape> &p_shape); + void set_shape_transform(int p_shape_idx, const Transform &p_transform); Ref<Shape> get_shape(int p_shape_idx) const; Transform get_shape_transform(int p_shape_idx) const; void remove_shape(int p_shape_idx); @@ -94,7 +91,6 @@ public: void set_capture_input_on_drag(bool p_capture); bool get_capture_input_on_drag() const; - _FORCE_INLINE_ RID get_rid() const { return rid; } CollisionObject(); |
