|
SuperDex Physics C++ API
|
Parameters for contact mechanics simulation. More...
#include <contact_params.h>
Public Member Functions | |
| ContactParams ()=default | |
| ContactParams (real penaltyCoefficient, real penaltySmoothingHalfDistance, real penaltyThresholdDefault, real penaltyThresholdExtraPadding, bool frictionWithColliderNormal, real maxAlignmentNormals, real viscousFrictionCoefficient, real coulombFrictionCoefficient, real frictionFalloffVel, real normalViscousDampingCoefficient, real distanceErrorBound, real objScale, real collidingPenaltyLengthScale) | |
| Construct ContactParams with all parameters explicitly specified. | |
| real | GetPenaltyThresholdDist (bool addPadding) const |
| Get the total contact detection threshold. | |
| bool | operator== (ContactParams const &) const =default |
Public Attributes | |
| real | collidingPenaltyLengthScale = 1_r |
| [Experimental] Length scale [m] used to correct the penalty coefficient when the colliding body integrates contact traction over a lower-than-two-dimensional manifold, such as a rod or point mass. | |
| real | coulombFrictionCoefficient = 0.5_r |
| Coulomb friction coefficient (dimensionless). | |
| real | distanceErrorBound = 0_r |
| [Experimental] Padding [m] added to the collider's bounding volume for collision culling. | |
| real | frictionFalloffVel = 0.01_r |
| Velocity threshold for Coulomb friction smoothing [m/s]. | |
| bool | frictionWithColliderNormal = true |
| Use collider's normal (normalized SDF gradient) for friction direction if true, or the colliding's surface normal at the sample point if false. | |
| real | maxAlignmentNormals = 0_r |
| Maximum normal alignment threshold. | |
| real | normalViscousDampingCoefficient = 0_r |
| Normal viscous damping coefficient [s/m]. | |
| real | objScale = 1_r |
| [Experimental] Object scale relative to default size (dimensionless). | |
| real | penaltyCoefficient = 1e9_r |
| Stiffness of the contact penalty force [Pa/m]. | |
| real | penaltySmoothingHalfDistance = 0.005_r |
| PolyReLU smoothing half-width [m]. | |
| real | penaltyThresholdDefault = 0.001_r |
| Default contact detection threshold [m]. | |
| real | penaltyThresholdExtraPadding = 0_r |
| Extra padding [m] added to the default contact detection threshold if the colliding actor has ColliderType::None or ColliderType::PointCloud. | |
| real | viscousFrictionCoefficient = 0_r |
| Viscous friction coefficient [s/m]. | |
Parameters for contact mechanics simulation.
Definition at line 38 of file contact_params.h.
|
default |
|
inline |
Construct ContactParams with all parameters explicitly specified.
Definition at line 24 of file contact_params_inl.h.
|
inline |
Get the total contact detection threshold.
| addPadding | If true, includes penaltyThresholdExtraPadding. |
Definition at line 52 of file contact_params_inl.h.
|
default |
| real superdex::ContactParams::collidingPenaltyLengthScale = 1_r |
[Experimental] Length scale [m] used to correct the penalty coefficient when the colliding body integrates contact traction over a lower-than-two-dimensional manifold, such as a rod or point mass.
E.g., the penalty is scaled by this value if the colliding body lumps contact tractions on a line, or this value squared if lumping contact forces on a point.
Definition at line 259 of file contact_params.h.
| real superdex::ContactParams::coulombFrictionCoefficient = 0.5_r |
Coulomb friction coefficient (dimensionless).
Definition at line 179 of file contact_params.h.
| real superdex::ContactParams::distanceErrorBound = 0_r |
[Experimental] Padding [m] added to the collider's bounding volume for collision culling.
Definition at line 234 of file contact_params.h.
| real superdex::ContactParams::frictionFalloffVel = 0.01_r |
Velocity threshold for Coulomb friction smoothing [m/s].
For C1Regularized, the Coulomb friction force smoothly transitions from 0 to full strength as tangential velocity increases from 0 to frictionFalloffVel (compact support). For CinfRegularized, the force asymptotically approaches full strength with no compact support boundary; frictionFalloffVel controls the regularization scale.
Definition at line 196 of file contact_params.h.
| bool superdex::ContactParams::frictionWithColliderNormal = true |
Use collider's normal (normalized SDF gradient) for friction direction if true, or the colliding's surface normal at the sample point if false.
Definition at line 144 of file contact_params.h.
| real superdex::ContactParams::maxAlignmentNormals = 0_r |
Maximum normal alignment threshold.
Normal alignment is defined as the dot product between colliding and collider normals. Contact is disabled for sample points whose normal alignment exceeds this threshold. This prevents sample points from being trapped inside the collider when penetration is large.
Definition at line 158 of file contact_params.h.
| real superdex::ContactParams::normalViscousDampingCoefficient = 0_r |
Normal viscous damping coefficient [s/m].
Damping force in the normal direction, proportional to the elastic normal contact force and the normal velocity. Analogous to viscousFrictionCoefficient but acting in the normal direction instead of tangentially.
experimental::CalibrateNormalViscousDampingCoefficient computes the coefficient that approximates a target CoR, while experimental::EffectiveCoefficientOfRestitution recovers the CoR produced by a coefficient. Definition at line 220 of file contact_params.h.
| real superdex::ContactParams::objScale = 1_r |
[Experimental] Object scale relative to default size (dimensionless).
Used by deep flow only.
Definition at line 243 of file contact_params.h.
| real superdex::ContactParams::penaltyCoefficient = 1e9_r |
Stiffness of the contact penalty force [Pa/m].
Definition at line 94 of file contact_params.h.
| real superdex::ContactParams::penaltySmoothingHalfDistance = 0.005_r |
PolyReLU smoothing half-width [m].
The penalty force transitions from 0 to linear over the decreasing distance range (penaltyThreshold, penaltyThreshold - 2 * penaltySmoothingHalfDistance).
Definition at line 106 of file contact_params.h.
| real superdex::ContactParams::penaltyThresholdDefault = 0.001_r |
Default contact detection threshold [m].
The penalty force transitions from 0 to linear over the decreasing distance range (penaltyThreshold, penaltyThreshold - 2 * penaltySmoothingHalfDistance).
Definition at line 121 of file contact_params.h.
| real superdex::ContactParams::penaltyThresholdExtraPadding = 0_r |
Extra padding [m] added to the default contact detection threshold if the colliding actor has ColliderType::None or ColliderType::PointCloud.
Definition at line 133 of file contact_params.h.
| real superdex::ContactParams::viscousFrictionCoefficient = 0_r |
Viscous friction coefficient [s/m].
Definition at line 169 of file contact_params.h.