raisim::DeformableObject::Material
struct · #include <raisim/object/deformable/DeformableObject.hpp>
Material and solver parameters.
Public attributes
totalMass
double totalMassTotal 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
double distanceComplianceXPBD distance compliance. 0 is rigid, larger values are softer. Negative keeps backwards compatibility by using 1 / distanceStiffness.
distanceStiffness
double distanceStiffnessLegacy stiffness parameter. Prefer distanceCompliance for new code.
bendCompliance
double bendComplianceBending 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
double bendStiffnessBending modulus D (N m), used as 1 / bendCompliance when bendCompliance is negative. A positive value enables automatic adjacent-triangle bending constraints.
youngsModulus
double youngsModulusYoung'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
double poissonRatioPoisson's ratio of the membrane or solid (see youngsModulus), in (-1, 0.5). Close to 0.5 a solid is nearly incompressible.
thickness
double thicknessMembrane thickness (m), and the default cross-sectional area thickness * L of the extra distance constraints.
crossSectionArea
double crossSectionAreaCross-sectional area of the extra distance constraints. If positive, it overrides thickness * L.
damping
double dampingStiffness-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
double airDragAir 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
double collisionRadiusCollision sphere radius of each particle (m). Positive.
iterations
int iterationsConstraint solver iterations per substep (nonnegative).
substeps
int substepsSubsteps per world step (positive). Deformables whose particles touch step together, with the largest substep count among them.
solverMode
SolverMode solverModeConstraint projection scheme.
selfCollision
bool selfCollisionCollide 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.