diff options
author | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2021-04-19 18:38:11 -0700 |
---|---|---|
committer | PouleyKetchoupp <pouleyketchoup@gmail.com> | 2021-04-26 18:26:00 -0700 |
commit | 448c41a3e4ba4ae7f1ffc3138ecfb7f85a6c8435 (patch) | |
tree | facfb77ec057c1aeafdd9549dbae8d0728778cae /servers/physics_3d/joints/slider_joint_3d_sw.h | |
parent | 639b02f4541be289a10f2e7bc80fd1ea67e4cf32 (diff) | |
download | redot-engine-448c41a3e4ba4ae7f1ffc3138ecfb7f85a6c8435.tar.gz |
Godot Physics collisions and solver processed on threads
Use ThreadWorkPool to process physics step tasks in multiple threads. Collisions are all processed in parallel and solving impulses is
processed in parallel for rigid body islands.
Additional changes:
- Proper islands for soft bodies linked to active bodies
- All moving areas are on separate islands (can be parallelized)
- Fix inconsistencies with body islands (Kinematic bodies could link
bodies together or not depending on the processing order)
- Completely prevent static bodies to be active (it could cause islands
to be wrongly created and cause dangerous multi-threading operations as
well as inconsistencies in created islands)
- Apply impulses only on dynamic bodies to avoid unsafe multi-threaded
operations (static bodies can be on multiple islands)
- Removed inverted iterations when populating body islands, it's now
faster in regular order (maybe after fixing inconsistencies)
Diffstat (limited to 'servers/physics_3d/joints/slider_joint_3d_sw.h')
-rw-r--r-- | servers/physics_3d/joints/slider_joint_3d_sw.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/servers/physics_3d/joints/slider_joint_3d_sw.h b/servers/physics_3d/joints/slider_joint_3d_sw.h index f52f6ace27..ef5891d0f9 100644 --- a/servers/physics_3d/joints/slider_joint_3d_sw.h +++ b/servers/physics_3d/joints/slider_joint_3d_sw.h @@ -240,10 +240,10 @@ public: void set_param(PhysicsServer3D::SliderJointParam p_param, real_t p_value); real_t get_param(PhysicsServer3D::SliderJointParam p_param) const; - bool setup(real_t p_step); - void solve(real_t p_step); + virtual bool setup(real_t p_step) override; + virtual void solve(real_t p_step) override; - virtual PhysicsServer3D::JointType get_type() const { return PhysicsServer3D::JOINT_TYPE_SLIDER; } + virtual PhysicsServer3D::JointType get_type() const override { return PhysicsServer3D::JOINT_TYPE_SLIDER; } }; #endif // SLIDER_JOINT_SW_H |