Skip to content

This is a special edition; if the community needs it, they can add specific features themselves. - #1000

Draft
baka4n wants to merge 45 commits into
dimforge:masterfrom
Polari-Stars-MC:master
Draft

This is a special edition; if the community needs it, they can add specific features themselves.#1000
baka4n wants to merge 45 commits into
dimforge:masterfrom
Polari-Stars-MC:master

Conversation

@baka4n

@baka4n baka4n commented Aug 27, 2026

Copy link
Copy Markdown

Just add a signature for me.

baka4n added 30 commits August 21, 2026 21:27
…C moving platform, dimforge#223 convex_decomposition panic, dimforge#984 CCD bullet-bullet tunnel + dimforge#305 EPA regression
…idBody/RigidBodyBuilder caps + post-solve clamp + regression tests
…ition()/angles() + set_motor_force/torque (ForceBased) + regression tests
…witness (point+normal) captured in sweep, stored on RigidBodyCcd, exposed via RigidBody::ccd_point_of_impact() + regression test
…only) + serde + dead-code allow

§9 contact friction/reaction bridge: post-solve, single-threaded, gated by
IntegrationParameters::bridge_contact_forces (default off => HEAD physics unchanged).
Solver-emergent Friction/ContactReaction kinds excluded from summation (no double-apply).
§15.1 compute_effective_force_and_torque marked #[allow(dead_code)] (legacy API kept).
§15.2 serde derives on Persistence/ForceKind/ForceEntry/KindContainer + RigidBody field
serde(default). Validated by force_containers_serde_round_trip.
Tests: 72 lib tests pass (-D warnings); 2 new bridge tests + 1 serde round-trip.
dimforge#223 dimforge#778 dimforge#548 dimforge#457 dimforge#181)

Bug fixes adopted into this fork:

  dimforge#488 character controller moving-platform penetration (drop correction cap for kinematic parents)

  dimforge#984 CCD fast dynamic-dynamic tunneling (bullet-vs-bullet + moving-target sweep)

  dimforge#993 voxel-ball solver-graph slot leak (force FULL_COMPOSITE on manifold count drop)

  dimforge#223 convex_decomposition panic on degenerate input

  dimforge#778 cylinder_x/z + round variants

  dimforge#548 ccd_point_of_impact

  dimforge#457 joint angles()/set_motor_force

  dimforge#181 max linear/angular velocity clamps

Plus persistent/transient force containers, clippy cfg fixes, and voxel_ball_tests regression.
…/axpy vs nalgebra)

Phase 1 of Full-B nalgebra->glam migration. Standalone dynamic linear-algebra
layer (src/linalg.rs) reproducing nalgebra's exact arithmetic order so existing
simulations / enhanced-determinism saves stay reproducible. DVector + views +
dot/component_mul/axpy/copy_from/norm/normalize/insert_rows/amax implemented and
proven bit-identical to na::DVector via comparison tests (3 passed, clippy clean).
…path + gemv small path) + transpose

Phase 2 of Full-B nalgebra->glam migration. DMatrix (column-major, identical layout to
nalgebra VecStorage) with gemm replicating nalgebra's exact dual dispatch:
- large dynamic matrices -> matrixmultiply::dgemm (same column-major strides)
- small/static -> per-column gemv/axcpy loop
transpose also bit-identical. 2 new bit-comparison tests (gemm both paths + transpose);
all 5 linalg tests pass, clippy clean on src/linalg.rs. matrixmultiply added as direct dep.
…lumn/view Index-IndexMut/generic LU::solve_mut/Add-AddAssign absent) + MatrixLike for SVector
…+ step 后推进软体 + 粗粒度 sleeping(岛屿式) + 查询/插入/睡眠 API
…ound_body + spring_damping_forces() + SoftBodySet::write_spring_forces (Custom(Persistent)); PhysicsWorld::step 先写软体力再积分刚体; 含路由单测
…DistanceConstraint + 四面体体积约束 + 固定顺序 Gauss-Seidel 投影 + 确定性; configure_xpbd/add_distance_constraint/add_tetrahedron; 4 XPBD 单测; lib 97 passed
…ion<SoftBody>> id-stable tombstone + count()/remove(id);SoftBody::remove_particle 拓扑修复:删粒子+连锁删弹簧/距离约束/四面体、剩余索引递减;8 软体测试仍全过)
…dd_triangle(自动注册去重结构边) + add_bending_constraint(弯曲对角线) + remove_particle 拓扑 remap
…ly_wind/clear_wind; compute_forces 与 step_xpbd predict 双求解器施力(纯外力)
…detach_particle + SoftBodySet::follow_rigid_bodies (绑定质点刚性跟随刚体平移/旋转); physics_world 接线
… (应变超阈值移除 distance constraint/spring, 并删破损三角面); step 顶部调用
…_strain,creep} + set_plasticity + apply_plasticity (超屈服应变每步把 rest_length 朝当前长度冻入 creep); step 顶部调用
…sure + pressure_forces (面法向 centroid 朝外, F=P·area/3/顶点, 闭合壳吹胀); compute_forces + step_xpbd 预测步接线
baka4n added 14 commits August 26, 2026 14:58
… + set_self_collision/clear_self_collision + solve_self_collisions (均匀空间哈希 broad-phase + 排除结构邻居 + XPBD 距离约束推开, 2*radius); MassSpring/XPBD 两路径注入
….compliance/dt^2); 新增 set_spring_stiffness / set_distance_constraint_compliance 运行时改刚度
…<SelfCollisionParams> + set/clear; SoftBodySet 加 iter + get2_mut(切片拆分保证双可变借用); solve_cross_body_collisions(world 层遍历软体对,空间哈希 + XPBD 投影); world.rs step 后调用
… set/clear; step_xpbd 四面体体积约束改用独立柔度(c/dt^2),与距离求解器解耦(可软边硬体积)
…adius,stiffness,break_distance} + set/clear; solve_cohesion(世界层空间哈希,捕获半径=2*radius,吸引到接触距离radius,可破断); 撕裂(Phase9)对偶
…pbd 速度回推后 / integrate(MassSpring) 对各自由质点 v *= (1-damping); 全局内部阻尼,jelly/slime 手感,与弹簧轴向阻尼(Phase0)/柔度(Phase13)正交
…; add/clear setter; step_xpbd 每迭代按应变符号选 stretch(α_s)/compression(α_c) 柔度; 布料抗拉伸但易折叠
…t_self/cross_collision_friction setter; solve_self_collisions 累积接触对 + step_xpbd 速度回推后 Coulomb 切向阻尼; solve_cross_body_collisions 跨体切向相对速度阻尼(min μ)
…阈值的四面体(非有限=全细分); 子体积=父/4 体积守恒; 重心质点由子四面体体积约束驱动(不加刚性边避免过约束爆炸); 返回实际细分个数
… 将 frame dt 切成 n 等份各跑一次求解器(loop 在 step 层, 不动 step_xpbd/step_mass_spring 内部); 新增 set_substeps(n) 守卫 n>=1 拒绝 0
- TearCriterion 枚举(Strain/Stress/Energy)替代单一应变阈值: 应力=|k*(len-rest)| 超限断; 能量=0.5*k*(len-rest)^2 超限断(Griffith 断裂韧性代理)
- SoftBody.tear 按准则标量评估; set_tear_stress/set_tear_energy 新增
- anisotropy: Option<Vector> 体级正交各向异性刚度轴; step_xpbd 边有效柔度=base/(n·diag·n), 沿主轴更硬
- 移除 tear() 冗余 strain 计算; clippy 干净
- ViscoelasticParams(rate_coefficient) + ThermalParams(temp/ambient/expansion/stiffness_temp_coeff)
- spring_damping_forces: 率相关硬化 k_eff=k*(1+rate*|d(strain)/dt|); 热膨胀 rest*(1+exp*ΔT) + 温度软化 k*(1-coeff*ΔT)
- set_viscoelastic/set_thermal 守卫(rate>=0, coeff*|ΔT|<1)
- dT 重命名为 delta_t 过 clippy
…implicit_euler(dt): 组装质量矩阵 M 与弹簧刚度矩阵 K, 解 (M/dt^2 - K) v = M v_n/dt^2 + f_n/dt (nalgebra DMatrix, Cholesky/LU 回退) - 无条件稳定: 高刚度弹簧下显式发散而隐式有界 - 纯参考求解器(O(n^3) 稠密), 生产大网格仍用 XPBD
@baka4n
baka4n marked this pull request as draft August 27, 2026 19:03
…g (polar rotation + deviatoric XPBD projection), tetra_rest_shapes cache + set/clear_corotated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant