Skip to main content

Module dynamics

Module dynamics 

Source
Expand description

Structures related to dynamics: bodies, impulse_joints, etc.

Structs§

AxesMask
Flags affecting the behavior of the constraints solver for a given contact manifold.
BodyPair
A pair of rigid body handles.
CCDSolver
Continuous Collision Detection solver preventing fast objects from tunneling: after the solver, bodies that moved more than half their thinnest extent sweep their colliders and next_position is clamped to the earliest impact — velocities untouched, no re-solve; the residual approach resolves next step via speculative contacts.
FixedJoint
A joint that rigidly connects two bodies together (like welding them).
FixedJointBuilder
Create fixed joints using the builder pattern.
GenericJoint
A generic joint.
GenericJointBuilder
Create generic joints using the builder pattern.
ImpulseJoint
An impulse-based joint attached to two bodies.
ImpulseJointHandle
The unique identifier of a joint added to the joint set.
ImpulseJointSet
The collection that stores all joints connecting rigid bodies in your physics world.
IntegrationParameters
Configuration parameters that control the physics simulation quality and behavior.
InverseKinematicsOption
Options for the jacobian-based Inverse Kinematics solver for multibodies.
IslandManager
System that manages which bodies are active (awake) vs sleeping to optimize performance.
JointAxesMask
A bit mask identifying multiple degrees of freedom of a joint.
JointLimits
Limits that restrict a joint’s range of motion along one axis.
JointMotor
A powered motor that drives a joint toward a target position/velocity.
LockedAxes
Flags that lock specific movement axes to prevent translation or rotation.
MassProperties
The mass properties of a rigid body.
Multibody
An articulated body simulated using the reduced-coordinates approach.
MultibodyDofCoupling
A holonomic coupling between two generalized coordinates of a single Multibody, q2 = coeff · q1 + offset, enforced as a velocity-level equality constraint. This is how MuJoCo’s <equality><joint> (a polynomial joint-to-joint coupling) is represented for the linear (first-order) case — e.g. the robotiq gripper’s two driver joints moving together.
MultibodyIndex
The temporary index of a multibody added to a MultibodyJointSet.
MultibodyJoint
An joint attached to two bodies based on the reduced coordinates formalism.
MultibodyJointHandle
The unique handle of an multibody_joint added to a MultibodyJointSet.
MultibodyJointSet
A set of rigid bodies that can be handled by a physics pipeline.
MultibodyLink
One link of a multibody.
MultibodyLinkId
Indexes usable to get a multibody link from a MultibodyJointSet.
PinSlotJoint
A pin slot joint, locks all relative motion between two bodies except for translation along the joint’s principal axis and relative rotations. This joint is also known as a groove joint in Godot.
PinSlotJointBuilder
Create pin slot joints using the builder pattern.
PrismaticJoint
A sliding joint that allows movement along one axis only (like a piston or sliding door).
PrismaticJointBuilder
Create prismatic joints using the builder pattern.
RevoluteJoint
A hinge joint that allows rotation around one axis (like a door hinge or wheel axle).
RevoluteJointBuilder
Create revolute joints using the builder pattern.
RigidBody
A physical object that can move, rotate, and collide with other objects in your simulation.
RigidBodyActivation
Controls when a body goes to sleep (becomes inactive to save CPU).
RigidBodyBuilder
A builder for creating rigid bodies with custom properties.
RigidBodyCcd
Information used for Continuous-Collision-Detection.
RigidBodyChanges
Flags describing how the rigid-body has been modified by the user.
RigidBodyColliders
The set of colliders attached to this rigid-bodies.
RigidBodyDamping
Damping factors to progressively slow down a rigid-body.
RigidBodyDominance
The dominance groups of a rigid-body.
RigidBodyForces
The user-defined external forces applied to this rigid-body.
RigidBodyHandle
The unique handle of a rigid body added to a RigidBodySet.
RigidBodyIds
Internal identifiers used by the physics engine.
RigidBodyMassProps
The mass properties of a rigid-body.
RigidBodyPosition
The position of this rigid-body.
RigidBodySet
The collection that stores all rigid bodies in your physics world.
RigidBodyVelocity
The velocities of this rigid-body.
RopeJoint
A distance-limiting joint (like a rope or cable connecting two objects).
RopeJointBuilder
Create rope joints using the builder pattern.
SoftBodiesSettings
Simulation settings shared by every soft body of a world.
SoftBody
A deformable body: SoftBodyParticles linked by elastic elements (SoftBodyEdges, bending, SoftBodyCells, volume preservation, shape matching). Its hidden root rigid body (tagged by crate::dynamics::RigidBody::soft_body) must never be moved, removed or attached to joints.
SoftBodyBuilder
A builder for crate::dynamics::SoftBodys: particles are given in world space and elements reference particles by index. The generators (Self::rope, plus cloth/cuboid/sphere in 3D and polygon/disk/grid in 2D) make complete bodies; the setters build any body.
SoftBodyCell
A simplex cell of a soft body: a triangle in 2D, a tetrahedron in 3D.
SoftBodyCluster
A cluster of a soft body: a set of its particles backed by a proxy rigid body (crate::dynamics::RigidBodyType::SoftFrame) carrying its frame, gathered velocity and reduced mass. A rank-deficient one (one particle, or collinear in 3D) has no angular response.
SoftBodyEdge
A distance constraint between two particles of a soft body.
SoftBodyHandle
The unique handle of a soft body added to a super::SoftBodySet.
SoftBodyMaterial
The stiffness and damping of every soft-body constraint family: a natural_frequency (Hz) and damping_ratio per family, normalized by the constraint’s effective mass (independent of mass, substeps and timestep); a frequency far above the substep rate saturates instead of exploding.
SoftBodyParticle
One particle (point mass) of a soft body: plain state owned by its crate::dynamics::SoftBody, given its own solver body for the step when the body is awake. A pinned particle (inv_mass == 0) is kinematic: it moves at its velocity or toward its target.
SoftBodyParticleSettings
The dynamics settings shared by every particle of a soft body.
SoftBodyPiece
A soft body a tear left: the torn body itself, or a body split off it (see SoftBodyTearEvent::pieces).
SoftBodySet
A set of soft bodies that can be handled by a physics pipeline. Inserting a soft body creates its hidden root rigid body in the RigidBodySet (see SoftBody) and its colliders in the ColliderSet; removing it removes them, so never remove those yourself.
SoftBodyTearEvent
What a tear or a cut did to a soft body (see EventHandler::handle_soft_body_tear_event, crate::dynamics::SoftBodySet::tear and crate::dynamics::SoftBodySet::cut); the indices of torn_edges/torn_cells predate the tear, the others follow it, before the split.
SoftClusterRemoval
What crate::dynamics::SoftBodySet::remove_cluster (or removing a proxy rigid body) deleted: the particles only the removed cluster covered, and everything attached to them.
SoftClusterSplit
A cluster piece a tear left: where a cluster the crack ran through ended up (see SoftBodyTearEvent::clusters).
SoftCollisionMesh
A mesh a soft body collides through: a polyline (2D) or triangle mesh (3D) whose vertices follow the body’s particles, and the collider holding it. A skinned mesh carries thin features the coarse cells cannot: its vertices are barycentric combinations of the particles.
SoftJointMove
An impulse joint a tear re-attached: its proxy was split, and the piece closest to the joint’s anchor in the rest shape is not the one that kept the proxy (see SoftBodyTearEvent::moved_joints).
SoftMeshBinding
How a deformable collider follows its soft body, and the collision settings that are not the collider’s own.
SoftMeshCellBinding
Where a skinned collision-mesh vertex rides: the cell holding it, and its barycentric coordinates in that cell. The coordinates are not clamped, so a vertex the cells do not cover is bound to the closest one through an extrapolation and follows it.
SoftMeshId
Where a collision mesh lives in its soft body: the cluster owning it, and its slot in that cluster. Stable for the mesh’s whole life (removed meshes leave a dead slot).
SoftMeshRef
A collision mesh of a given soft body: what a deformable collider points back to.
SoftParticleAttachment
A particle of a soft body attached to a rigid body (see SoftBody::attach_particle): a point-to-point constraint between the particle and a point of the body.
SoftRecoverySettings
Runtime configuration of the soft-body tangle detection and recovery stack. It lives on crate::dynamics::SoftBodiesSettings::recovery (itself on IntegrationParameters::soft_bodies), so it can be changed between steps.
SoftVolumeContact
One volume constraint assembled at the last step (a bin of a pair’s volume contact, see SoftOverlapConstraint), kept for debug rendering: center, normal (from the owner body into the other side), signed volume estimate, and every entry’s position and volume gradient.
SoftVolumePiece
A piece of a soft body’s material enclosed by closed boundary elements (see SoftBody::volume_pieces): its volume constraint holds the area/volume it encloses at its rest one times the body’s volume factor.
SpringCoefficients
Coefficients for a spring, typically used for configuring constraint softness for contacts and joints.
SpringJoint
A spring joint that pulls/pushes two bodies toward a target distance (like a spring or shock absorber).
SpringJointBuilder
A SpringJoint joint using the builder pattern.

Enums§

CoefficientCombineRule
How to combine friction/restitution values when two colliders touch.
JointAxis
Identifiers of degrees of freedoms of a joint.
JointEnabled
Enum indicating whether or not a joint is enabled.
MotorModel
How motor stiffness/damping values are interpreted (mass-dependent vs mass-independent).
RigidBodyAdditionalMassProps
Mass and angular inertia added to a rigid-body on top of its attached colliders’ contributions.
RigidBodyType
The type of a rigid body, determining how it responds to forces and movement.
SoftBindingError
Why a mesh could not be bound to a cluster (crate::geometry::ColliderSet::insert_deformable).
SoftBodyCellModel
The constitutive model of a soft body’s cells (triangles in 2D, tetrahedra in 3D).
SoftBodyEdgeKind
The role of a soft-body edge (distance constraint).
SoftEdgePlasticFlow
Which strains make a soft-body edge flow plastically (see SoftBodyMaterial::edge_plastic_yield).
SoftMeshBindingMode
How a collision mesh should be bound to its cluster, requested at insertion (crate::geometry::ColliderSet::insert_deformable).
SoftMeshMapping
How a collision mesh’s vertices are mapped onto a soft body’s computational mesh, as resolved at insertion (see crate::dynamics::SoftMeshBinding for the request).
SoftPatchConstraints
What the per-point constraints of the features a volume constraint acts on do (see SoftRecoverySettings::overlap_patch_constraints).

Constants§

SOFT_BODY_MAX_CONSTRAINT_PARTICLES
Number of particles a soft-body constraint can touch (a simplex cell).

Functions§

unit_joint_friction_constraint
Generates the dry-friction (MuJoCo frictionloss) velocity constraint for one generalized DoF.
unit_joint_limit_constraint
Initializes and generate the velocity constraints applicable to the multibody links attached to this multibody_joint.
unit_joint_motor_constraint
Initializes and generate the velocity constraints applicable to the multibody links attached to this multibody_joint.

Type Aliases§

BodyStatusDeprecated
The type of a body, governing the way it is affected by external forces.