SuperDex Physics C++ API
Loading...
Searching...
No Matches
superdex::ConstraintParams Struct Reference

Base constraint parameters. More...

#include <mochi_structs.h>

Inheritance diagram for superdex::ConstraintParams:
superdex::Articulated3dRotationRangeConstraintParams superdex::Articulated3dRotationTargetConstraintParams superdex::ArticulatedSingleDofRangeConstraintParams superdex::ArticulatedSingleDofTargetConstraintParams superdex::DeformableNodePositionConstraintParams superdex::DeformableNodeToDeformableNodeConstraintParams superdex::DeformableNodeToRigidConstraintParams superdex::JointRotationRangeConstraintParams superdex::JointRotationTrackingConstraintParams superdex::RigidPivotPositionConstraintParams superdex::RigidPivotRotationConstraintParams superdex::RigidPivotToRigidTargetConstraintParams superdex::RigidPrismaticJointConstraintParams superdex::RigidSphericalJointConstraintParams superdex::RodElementRotationToRigidConstraintParams

Public Member Functions

bool operator== (ConstraintParams const &) const =default

Public Attributes

real damping = 0_r
 Constraint damping coefficient.
real saturation = -1_r
 Saturation distance [m] or angle [rad].
real stiffness = 1e6_r
 Constraint stiffness coefficient.

Detailed Description

Base constraint parameters.

All constraint types inherit from this struct and add their specific parameters. Constraints apply forces and torques using a spring-damper model. Without saturation, the stiffness contribution is proportional to displacement or angular deviation, and the damping contribution is proportional to the corresponding linear or angular velocity. Their respective coefficients are stiffness and damping. saturation limits only the stiffness contribution.

Note
SuperDex Physics uses the International System of Units (SI) by default. Other units can be used, but doing so requires overwriting all dimensional default parameters (material, contact, constraints, solver, etc.) to ensure all units remain consistent.
See also
ConstraintType

Definition at line 269 of file mochi_structs.h.

Member Function Documentation

◆ operator==()

bool superdex::ConstraintParams::operator== ( ConstraintParams const & ) const
default

Member Data Documentation

◆ damping

real superdex::ConstraintParams::damping = 0_r

Constraint damping coefficient.

[N·s/m] for translation constraints, [N·m·s/rad] for rotation constraints. Must be non-negative and finite.

Definition at line 272 of file mochi_structs.h.

◆ saturation

real superdex::ConstraintParams::saturation = -1_r

Saturation distance [m] or angle [rad].

A negative value disables saturation. Must be finite and non-zero.

Note
When enabled, saturation smoothly limits the magnitude of the elastic (stiffness) contribution to stiffness * saturation. The damping contribution is separate and is not limited by saturation.

Definition at line 274 of file mochi_structs.h.

◆ stiffness

real superdex::ConstraintParams::stiffness = 1e6_r

Constraint stiffness coefficient.

[N/m] for translation constraints, [N·m/rad] for rotation constraints. Must be non-negative and finite.

Definition at line 270 of file mochi_structs.h.


The documentation for this struct was generated from the following files: