diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2017-12-06 21:36:34 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2017-12-07 08:02:00 +0100 |
commit | 13c2ff932089db24841bb971b645141218bd8586 (patch) | |
tree | 1fc056e9e5531b9d039ecfcf19602cdce33222d2 /servers/physics_2d | |
parent | a8ceb7e3f213216e4fb103a6a8687d007632f788 (diff) |
Style: Apply new clang-format 5.0 style to all files
Diffstat (limited to 'servers/physics_2d')
-rw-r--r-- | servers/physics_2d/area_2d_sw.cpp | 6 | ||||
-rw-r--r-- | servers/physics_2d/body_2d_sw.cpp | 7 | ||||
-rw-r--r-- | servers/physics_2d/body_pair_2d_sw.cpp | 6 | ||||
-rw-r--r-- | servers/physics_2d/joints_2d_sw.cpp | 12 | ||||
-rw-r--r-- | servers/physics_2d/joints_2d_sw.h | 4 | ||||
-rw-r--r-- | servers/physics_2d/physics_2d_server_wrap_mt.cpp | 4 |
6 files changed, 22 insertions, 17 deletions
diff --git a/servers/physics_2d/area_2d_sw.cpp b/servers/physics_2d/area_2d_sw.cpp index 6c0bc2c186..d73619ba13 100644 --- a/servers/physics_2d/area_2d_sw.cpp +++ b/servers/physics_2d/area_2d_sw.cpp @@ -238,8 +238,10 @@ void Area2DSW::call_queries() { //get_space()->area_remove_from_monitor_query_list(&monitor_query_list); } -Area2DSW::Area2DSW() - : CollisionObject2DSW(TYPE_AREA), monitor_query_list(this), moved_list(this) { +Area2DSW::Area2DSW() : + CollisionObject2DSW(TYPE_AREA), + monitor_query_list(this), + moved_list(this) { _set_static(true); //areas are not active by default space_override_mode = Physics2DServer::AREA_SPACE_OVERRIDE_DISABLED; diff --git a/servers/physics_2d/body_2d_sw.cpp b/servers/physics_2d/body_2d_sw.cpp index eb5fb5a729..2bdde244df 100644 --- a/servers/physics_2d/body_2d_sw.cpp +++ b/servers/physics_2d/body_2d_sw.cpp @@ -650,8 +650,11 @@ void Body2DSW::set_force_integration_callback(ObjectID p_id, const StringName &p } } -Body2DSW::Body2DSW() - : CollisionObject2DSW(TYPE_BODY), active_list(this), inertia_update_list(this), direct_state_query_list(this) { +Body2DSW::Body2DSW() : + CollisionObject2DSW(TYPE_BODY), + active_list(this), + inertia_update_list(this), + direct_state_query_list(this) { mode = Physics2DServer::BODY_MODE_RIGID; active = true; diff --git a/servers/physics_2d/body_pair_2d_sw.cpp b/servers/physics_2d/body_pair_2d_sw.cpp index 828b90e5d0..b106b37db0 100644 --- a/servers/physics_2d/body_pair_2d_sw.cpp +++ b/servers/physics_2d/body_pair_2d_sw.cpp @@ -417,7 +417,7 @@ bool BodyPair2DSW::setup(real_t p_step) { c.bias = -bias * inv_dt * MIN(0.0f, -depth + max_penetration); c.depth = depth; -//c.acc_bias_impulse=0; + //c.acc_bias_impulse=0; #ifdef ACCUMULATE_IMPULSES { @@ -500,8 +500,8 @@ void BodyPair2DSW::solve(real_t p_step) { } } -BodyPair2DSW::BodyPair2DSW(Body2DSW *p_A, int p_shape_A, Body2DSW *p_B, int p_shape_B) - : Constraint2DSW(_arr, 2) { +BodyPair2DSW::BodyPair2DSW(Body2DSW *p_A, int p_shape_A, Body2DSW *p_B, int p_shape_B) : + Constraint2DSW(_arr, 2) { A = p_A; B = p_B; diff --git a/servers/physics_2d/joints_2d_sw.cpp b/servers/physics_2d/joints_2d_sw.cpp index 897e145a3e..caeb62d74f 100644 --- a/servers/physics_2d/joints_2d_sw.cpp +++ b/servers/physics_2d/joints_2d_sw.cpp @@ -178,8 +178,8 @@ real_t PinJoint2DSW::get_param(Physics2DServer::PinJointParam p_param) const { ERR_FAIL_V(0); } -PinJoint2DSW::PinJoint2DSW(const Vector2 &p_pos, Body2DSW *p_body_a, Body2DSW *p_body_b) - : Joint2DSW(_arr, p_body_b ? 2 : 1) { +PinJoint2DSW::PinJoint2DSW(const Vector2 &p_pos, Body2DSW *p_body_a, Body2DSW *p_body_b) : + Joint2DSW(_arr, p_body_b ? 2 : 1) { A = p_body_a; B = p_body_b; @@ -323,8 +323,8 @@ void GrooveJoint2DSW::solve(real_t p_step) { B->apply_impulse(rB, j); } -GrooveJoint2DSW::GrooveJoint2DSW(const Vector2 &p_a_groove1, const Vector2 &p_a_groove2, const Vector2 &p_b_anchor, Body2DSW *p_body_a, Body2DSW *p_body_b) - : Joint2DSW(_arr, 2) { +GrooveJoint2DSW::GrooveJoint2DSW(const Vector2 &p_a_groove1, const Vector2 &p_a_groove2, const Vector2 &p_b_anchor, Body2DSW *p_body_a, Body2DSW *p_body_b) : + Joint2DSW(_arr, 2) { A = p_body_a; B = p_body_b; @@ -432,8 +432,8 @@ real_t DampedSpringJoint2DSW::get_param(Physics2DServer::DampedStringParam p_par ERR_FAIL_V(0); } -DampedSpringJoint2DSW::DampedSpringJoint2DSW(const Vector2 &p_anchor_a, const Vector2 &p_anchor_b, Body2DSW *p_body_a, Body2DSW *p_body_b) - : Joint2DSW(_arr, 2) { +DampedSpringJoint2DSW::DampedSpringJoint2DSW(const Vector2 &p_anchor_a, const Vector2 &p_anchor_b, Body2DSW *p_body_a, Body2DSW *p_body_b) : + Joint2DSW(_arr, 2) { A = p_body_a; B = p_body_b; diff --git a/servers/physics_2d/joints_2d_sw.h b/servers/physics_2d/joints_2d_sw.h index 11cb41d9d1..0e5e8012b6 100644 --- a/servers/physics_2d/joints_2d_sw.h +++ b/servers/physics_2d/joints_2d_sw.h @@ -50,8 +50,8 @@ public: _FORCE_INLINE_ real_t get_max_bias() const { return max_bias; } virtual Physics2DServer::JointType get_type() const = 0; - Joint2DSW(Body2DSW **p_body_ptr = NULL, int p_body_count = 0) - : Constraint2DSW(p_body_ptr, p_body_count) { + Joint2DSW(Body2DSW **p_body_ptr = NULL, int p_body_count = 0) : + Constraint2DSW(p_body_ptr, p_body_count) { bias = 0; max_force = max_bias = 3.40282e+38; }; diff --git a/servers/physics_2d/physics_2d_server_wrap_mt.cpp b/servers/physics_2d/physics_2d_server_wrap_mt.cpp index f92ed18de2..0e5bd82599 100644 --- a/servers/physics_2d/physics_2d_server_wrap_mt.cpp +++ b/servers/physics_2d/physics_2d_server_wrap_mt.cpp @@ -151,8 +151,8 @@ void Physics2DServerWrapMT::finish() { memdelete(step_sem); } -Physics2DServerWrapMT::Physics2DServerWrapMT(Physics2DServer *p_contained, bool p_create_thread) - : command_queue(p_create_thread) { +Physics2DServerWrapMT::Physics2DServerWrapMT(Physics2DServer *p_contained, bool p_create_thread) : + command_queue(p_create_thread) { physics_2d_server = p_contained; create_thread = p_create_thread; |