Skip to content

raisim::DeformableObject::Material ​

struct · #include <raisim/object/deformable/DeformableObject.hpp>

Material and solver parameters.

Public attributes ​

totalMass ​

cpp
double totalMass

Total mass (kg). Positive. It is lumped onto the particles in proportion to the triangle area around each particle (one third of every incident triangle); a particle that belongs to no triangle receives the average share. Objects without triangles split it evenly, and filled meshes lump it by volume (see MeshParticleOptions::Mode::Filled).

distanceCompliance ​

cpp
double distanceCompliance

XPBD distance compliance. 0 is rigid, larger values are softer. Negative keeps backwards compatibility by using 1 / distanceStiffness.

distanceStiffness ​

cpp
double distanceStiffness

Legacy stiffness parameter. Prefer distanceCompliance for new code.

bendCompliance ​

cpp
double bendCompliance

Bending compliance (1/(N m)): the inverse of the bending modulus D of the surface. 0 is rigid, larger values fold more easily. Negative disables bending unless bendStiffness is positive. For an isotropic plate of thickness t, D = youngsModulus * t^3 / (12 (1 - poissonRatio^2)). The bending energy is quadratic in the curvature change from the rest shape, so curved rest shapes (shells, closed meshes) keep their shape.

bendStiffness ​

cpp
double bendStiffness

Bending modulus D (N m), used as 1 / bendCompliance when bendCompliance is negative. A positive value enables automatic adjacent-triangle bending constraints.

youngsModulus ​

cpp
double youngsModulus

Young's modulus in Pa. If positive, the mesh is a continuous isotropic elastic material with this modulus and poissonRatio (co-rotated linear elasticity: linear elasticity in a frame that rotates with the material), in place of the mesh-edge distance constraints and distanceCompliance. An object with tetrahedra (World::addDeformableVolume(), or a filled mesh, see MeshParticleOptions::Mode::Filled) is an elastic solid; otherwise the triangles form a membrane of the given thickness (plane stress). The extra distance constraints (struts, addDistanceConstraint()) get the compliance L / (E A) with the cross-sectional area A: with the default A = thickness * L, 1 / (E thickness) at every length, a zero-length weld included.

poissonRatio ​

cpp
double poissonRatio

Poisson's ratio of the membrane or solid (see youngsModulus), in (-1, 0.5). Close to 0.5 a solid is nearly incompressible.

thickness ​

cpp
double thickness

Membrane thickness (m), and the default cross-sectional area thickness * L of the extra distance constraints.

crossSectionArea ​

cpp
double crossSectionArea

Cross-sectional area of the extra distance constraints. If positive, it overrides thickness * L.

damping ​

cpp
double damping

Stiffness-proportional (Rayleigh) damping time (s), nonnegative. Every distance and bending constraint resists its rate of change with a viscous force equal to damping times its elastic stiffness (integrated implicitly), so a vibration mode of angular frequency w gets the damping ratio damping * w / 2: fast, stiff modes are damped more than slow ones. A rigid constraint (zero compliance) loses its whole rate. Rigid motion is not damped. Ignored in the PBD solver mode. Use airDrag for mass-proportional damping.

airDrag ​

cpp
double airDrag

Air drag rate (1/s), nonnegative. Every particle velocity decays as exp(-airDrag * t), so a free particle under gravity g approaches the terminal speed |g| / airDrag. 0 disables drag.

collisionRadius ​

cpp
double collisionRadius

Collision sphere radius of each particle (m). Positive.

iterations ​

cpp
int iterations

Constraint solver iterations per substep (nonnegative).

substeps ​

cpp
int substeps

Substeps per world step (positive). Deformables whose particles touch step together, with the largest substep count among them.

solverMode ​

cpp
SolverMode solverMode

Constraint projection scheme.

selfCollision ​

cpp
bool selfCollision

Collide the particles of this object with each other, except pairs that already overlap in the rest shape, so that a folded cloth rests on itself. Costs a neighbor search every step.

RaiSim — physics for robotics and AI.