add API for setting repulsion stiffness

This commit is contained in:
Xuchen Han
2020-04-27 17:42:45 -07:00
parent 301cad8a09
commit ae3526254d
6 changed files with 42 additions and 13 deletions
@@ -8226,6 +8226,10 @@ void constructUrdfDeformable(const struct SharedMemoryCommand& clientCmd, UrdfDe
{
deformable.m_friction = loadSoftBodyArgs.m_frictionCoeff;
}
if (clientCmd.m_updateFlags & LOAD_SOFT_BODY_SET_REPULSION_STIFFNESS)
{
deformable.m_repulsionStiffness = loadSoftBodyArgs.m_repulsionStiffness;
}
#endif
}
@@ -8443,6 +8447,7 @@ bool PhysicsServerCommandProcessor::processDeformable(const UrdfDeformable& defo
psb->setCollisionFlags(0);
psb->setTotalMass(deformable.m_mass);
psb->setSelfCollision(useSelfCollision);
psb->setSpringStiffness(deformable.m_repulsionStiffness);
}
#endif //SKIP_DEFORMABLE_BODY
#ifndef SKIP_SOFT_BODY_MULTI_BODY_DYNAMICS_WORLD