Description
SolverVBD.reset() (tracked and added under #3256) resets rigid bodies, joints, and cables per world, but does not reset deformables (cloth and volumetric soft bodies). Particle StateFlags.PARTICLE_Q / StateFlags.PARTICLE_QD are currently ignored, and the method warns that particle resets are unsupported.
This requests first-class masked deformable reset support so cloth and soft-body particles can be restored to their model defaults per world, matching the rigid reset semantics.
Requested behavior
reset() honors StateFlags.PARTICLE_Q / StateFlags.PARTICLE_QD, copying model.particle_q / model.particle_qd into the state for particles in the worlds selected by world_mask.
- Same masking semantics as the rigid path:
world_mask=None also resets global (world == -1) particles; an explicit mask excludes them.
- Works when an external solver integrates the bodies, and for particle-only models.
- Covers both cloth and volumetric (tet) soft bodies through a single path.
Notes on scope
Unlike the rigid side, the particle side needs no solver-history cold-starting: particle_q_prev is rebaselined from the incoming state at the start of every step(), self-contact and body-particle contact buffers are rebuilt per step (no match-index warm-start path for soft contacts), and tet/cloth elasticity is stateless. So the deliverable is the masked state copy plus removing the unsupported-particle warning and documenting the behavior (including regenerating contacts after moving particles, and rebuild_bvh for large displacements with self-contact).
Motivation / Use Case
Acceptance criteria
Description
SolverVBD.reset()(tracked and added under #3256) resets rigid bodies, joints, and cables per world, but does not reset deformables (cloth and volumetric soft bodies). ParticleStateFlags.PARTICLE_Q/StateFlags.PARTICLE_QDare currently ignored, and the method warns that particle resets are unsupported.This requests first-class masked deformable reset support so cloth and soft-body particles can be restored to their model defaults per world, matching the rigid reset semantics.
Requested behavior
reset()honorsStateFlags.PARTICLE_Q/StateFlags.PARTICLE_QD, copyingmodel.particle_q/model.particle_qdinto the state for particles in the worlds selected byworld_mask.world_mask=Nonealso resets global (world == -1) particles; an explicit mask excludes them.Notes on scope
Unlike the rigid side, the particle side needs no solver-history cold-starting:
particle_q_previs rebaselined from the incoming state at the start of everystep(), self-contact and body-particle contact buffers are rebuilt per step (no match-index warm-start path for soft contacts), and tet/cloth elasticity is stateless. So the deliverable is the masked state copy plus removing the unsupported-particle warning and documenting the behavior (including regenerating contacts after moving particles, andrebuild_bvhfor large displacements with self-contact).Motivation / Use Case
Acceptance criteria
SolverVBD.reset()resets cloth and soft-body particles per world viaPARTICLE_Q/PARTICLE_QD.