novaphy.solvers.IPCConfig¶
Configuration object for SolverIPC. It resolves to None when NovaPhy is
built without IPC.
Attributes¶
| Attribute | Description |
|---|---|
dt |
Fixed time step in seconds. |
gravity |
Gravity vector captured by the libuipc scene. |
d_hat |
IPC contact-distance threshold in meters. |
kappa |
Barrier/contact stiffness in pascals. |
friction |
Default friction coefficient. |
contact_resistance |
Contact-resistance override in pascals. |
body_kappa |
Affine-body stiffness in pascals. |
mass_density |
Default mass density in kg/m³. |
shell_thickness |
Half-thickness for triangle-mesh and heightfield shells. |
newton_max_iter |
Maximum libuipc Newton iterations per step. |
newton_tol |
Newton velocity and transrate tolerance. |
dt and gravity must match the values supplied to subsequent
SolverIPC.step(...) calls and the bound model.
Example¶
import novaphy
if novaphy.has_ipc():
cfg = novaphy.solvers.SolverIPC.Config()
cfg.dt = 1.0 / 60.0
cfg.d_hat = 0.005
cfg.friction = 0.6
solver = novaphy.solvers.SolverIPC(model, cfg)