diff options
| author | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-01-13 16:31:02 +0100 |
|---|---|---|
| committer | Claudius "keldu" Holeksa <mail@keldu.de> | 2026-01-13 16:31:02 +0100 |
| commit | 1b8ff0752a7622534199e0d8e8c2801967eed4ba (patch) | |
| tree | 0c1b03bb796c5e649e681aa3339dd6b9f7f84cd2 /lib/core/c++ | |
| parent | 49a8fc2ebe34b3f45db4295b3e01b47af9773ab6 (diff) | |
| download | libs-lbm-1b8ff0752a7622534199e0d8e8c2801967eed4ba.tar.gz | |
Reworking the packages sets
Diffstat (limited to 'lib/core/c++')
| -rw-r--r-- | lib/core/c++/particle/particle.hpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/core/c++/particle/particle.hpp b/lib/core/c++/particle/particle.hpp index cea80f0..557707d 100644 --- a/lib/core/c++/particle/particle.hpp +++ b/lib/core/c++/particle/particle.hpp @@ -91,6 +91,25 @@ constexpr auto verlet_step_lambda = [](saw::data<sch::Particle<T,D>>& particle, pos = pos_new; }; +template<typename T, uint64_t D> +constexpr auto handle_collision = [](saw::data<sch::Particle<T,D>>& left, saw::data<sch::Particle<T,D>>& right){ + auto& rb_l = left.template get<"rigid_body">(); + auto& rb_r = right.template get<"rigid_body">(); + + auto& pos_l = rb_l.template get<"position">(); + auto& pos_old_l = rb_l.template get<"position_old">(); + auto vel_l = pos_l - pos_old_l; + auto& mass_l = left.template get<"mass">(); + + + /** + * E to 0 + */ + + + +}; + template<typename T, uint64_t D> constexpr auto broadphase_collision_distance = [](saw::data<sch::Particle<T,D>>& left, saw::data<sch::Particle<T,D>>& right) -> std::pair<bool,saw::data<sch::Scalar<T>>>{ |
