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

Parameters for creating a constraint coupling a deformable node to a rigid actor. More...

#include <mochi_structs.h>

Inheritance diagram for superdex::DeformableNodeToRigidConstraintParams:
superdex::ConstraintParams superdex::prefab::DeformableNodeToRigidConstraintPrefab

Public Attributes

ActorHandle deformableActor {}
 Actor handle identifying the deformable actor.
int deformableNodeIndex = -1
 Node index in the deformable actor's reference simulation mesh, as returned by Actor::GetMesh.
bool findClosest = false
 Whether to automatically select a boundary node of the deformable actor.
bool fixToDeformablePos = true
 When true, the coupling position on the rigid actor is auto-computed to match the deformable node's initial position (in the rigid actor's frame), so the constraint starts at zero deviation, and rigidLocalPos is ignored.
ActorHandle rigidActor {}
 Actor handle identifying the rigid actor.
Real3 rigidLocalPos {}
 Coupling position [m] in rigid actor's local frame.
Public Attributes inherited from superdex::ConstraintParams
real damping = 0_r
 Constraint damping coefficient.
real saturation = -1_r
 Saturation distance [m] or angle [rad].
real stiffness = 1e6_r
 Constraint stiffness coefficient.

Additional Inherited Members

Public Member Functions inherited from superdex::ConstraintParams
bool operator== (ConstraintParams const &) const =default

Detailed Description

Parameters for creating a constraint coupling a deformable node to a rigid actor.

See also
Scene::CreateDeformableNodeToRigidConstraint, ConstraintType::DeformableNodeToRigid

Definition at line 325 of file mochi_structs.h.

Member Data Documentation

◆ deformableActor

ActorHandle superdex::DeformableNodeToRigidConstraintParams::deformableActor {}

Actor handle identifying the deformable actor.

Definition at line 332 of file mochi_structs.h.

◆ deformableNodeIndex

int superdex::DeformableNodeToRigidConstraintParams::deformableNodeIndex = -1

Node index in the deformable actor's reference simulation mesh, as returned by Actor::GetMesh.

Ignored if findClosest is true; otherwise it must identify a node in that mesh.

Definition at line 328 of file mochi_structs.h.

◆ findClosest

bool superdex::DeformableNodeToRigidConstraintParams::findClosest = false

Whether to automatically select a boundary node of the deformable actor.

Note
When true, selection is based on proximity to rigidLocalPos transformed to world space by the rigid actor's transform at constraint creation. Selection uses the deformable actor's undeformed reference simulation mesh, and deformableNodeIndex is ignored.
When true, the deformable actor must be a soft actor (shell and rod actors are not supported).

Definition at line 334 of file mochi_structs.h.

◆ fixToDeformablePos

bool superdex::DeformableNodeToRigidConstraintParams::fixToDeformablePos = true

When true, the coupling position on the rigid actor is auto-computed to match the deformable node's initial position (in the rigid actor's frame), so the constraint starts at zero deviation, and rigidLocalPos is ignored.

Note
When findClosest is also true, rigidLocalPos is still used as the search point that selects which deformable node is picked.

Definition at line 336 of file mochi_structs.h.

◆ rigidActor

ActorHandle superdex::DeformableNodeToRigidConstraintParams::rigidActor {}

Actor handle identifying the rigid actor.

Definition at line 330 of file mochi_structs.h.

◆ rigidLocalPos

Real3 superdex::DeformableNodeToRigidConstraintParams::rigidLocalPos {}

Coupling position [m] in rigid actor's local frame.

Note
When fixToDeformablePos is true, this field is ignored and the coupling position is auto-computed based on the deformable node's initial position in the rigid actor's frame.
When findClosest is also true, this field is still used as the search point that selects which deformable node is picked.

Definition at line 326 of file mochi_structs.h.


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