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

Parameters controlling recentering behavior for standalone soft, shell, and rod actors. More...

#include <mochi_structs.h>

Public Member Functions

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

Public Attributes

real rotationEpsilonDeg = 0_r
 Minimum rotation threshold [degrees] to apply recentering.
real translationEpsilon = 0_r
 Minimum translation threshold [m] to apply recentering.
bool useRecentering = true
 Whether recentering is enabled.

Detailed Description

Parameters controlling recentering behavior for standalone soft, shell, and rod actors.

Recentering transfers bulk motion from local simulation coordinates into the actor's root transform. This makes the root transform approximately follow the actor while keeping local displacements small, even when the actor travels far from its initial position. Keeping local values near the scale of the actor reduces floating-point roundoff and loss of precision.

Soft actors recenter both translation and rotation around a rigid pivot, typically near the center of mass. Shell and rod actors use a pivot node near the centroid of the reference mesh. Because that pivot carries no rotation, they recenter translation only and rotationEpsilonDeg has no effect.

Note
World-space boundary condition targets remain valid under recentering. Targets recomputed from the current root transform (e.g. by re-adding Actor::AddBoundaryConditionConstrainedNodesAtRest after the actor has moved) follow the recentered frame instead of staying fixed in world space.
When recentering is disabled, local-space displacement values can become very large if the actor moves far from its starting position. This may be problematic due to finite-precision arithmetic.
When recentering is enabled, the root transform follows the actor, and local-space data (displacements, DoF values, and node positions) are expressed relative to it. For soft actors it rotates and translates, so local-space displacements reflect only deformation. For shell and rod actors it only translates, so local-space displacements still include global rotation.
See also
Actor::GetRecenteringParams, Actor::SetRecenteringParams

Definition at line 88 of file mochi_structs.h.

Member Function Documentation

◆ operator==()

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

Member Data Documentation

◆ rotationEpsilonDeg

real superdex::RecenteringParams::rotationEpsilonDeg = 0_r

Minimum rotation threshold [degrees] to apply recentering.

Note
Recentering is applied if either rotation or translation change more than their respective thresholds.

Definition at line 91 of file mochi_structs.h.

◆ translationEpsilon

real superdex::RecenteringParams::translationEpsilon = 0_r

Minimum translation threshold [m] to apply recentering.

Note
Recentering is applied if either rotation or translation change more than their respective thresholds.

Definition at line 93 of file mochi_structs.h.

◆ useRecentering

bool superdex::RecenteringParams::useRecentering = true

Whether recentering is enabled.

Definition at line 89 of file mochi_structs.h.


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