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

Parameters to create a soft deformable actor. More...

#include <mochi_structs.h>

Inheritance diagram for superdex::SoftActorParams:
superdex::prefab::SoftActorPrefab

Public Member Functions

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

Public Attributes

ActorBoundaryElementType boundaryElementType = ActorBoundaryElementType::Default
 Finite element type for contact discretization.
ContactParams contact
 Contact mechanics parameters.
bool hasGravity = true
 If true, actor is affected by gravity.
bool hasInertia = true
 If true, actor is affected by inertial forces.
bool hasStress = true
 If true, actor is affected by internal stress/strain forces.
DynamicString layer
 Contact layer name for filtering contacts between actors.
SoftMaterialParams material = {}
 Uniform material properties.
DynamicString name
 Optional actor name.
ShapeHandle shape
 Shape handle defining the actor's geometry and other metadata.
bool useContactSkin = false
 [Experimental] Use the shape's authored contact skin for colliding contact samples.
TransformRT worldFromLocal
 Initial rotation and translation of the actor's local frame with respect to world frame.

Detailed Description

Parameters to create a soft deformable actor.

Soft actors are volumetric deformable bodies simulated using the Finite Element Method (FEM).

Note
Soft actors created via Scene::CreateSoftActor act as colliding actors via their own surface sample points but not as colliders. To create a soft actor with a collider, use experimental::CreateSoftActor with an explicit experimental::ExperimentalSoftActorParams::colliderType.
See also
Scene::CreateSoftActor, experimental::CreateSoftActor, experimental::ExperimentalSoftActorParams

Definition at line 182 of file mochi_structs.h.

Member Function Documentation

◆ operator==()

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

Member Data Documentation

◆ boundaryElementType

ActorBoundaryElementType superdex::SoftActorParams::boundaryElementType = ActorBoundaryElementType::Default

Finite element type for contact discretization.

Note
Selects quadrature on the tetrahedral boundary, or on the authored contact skin when useContactSkin is true.
See also
ActorBoundaryElementType

Definition at line 203 of file mochi_structs.h.

◆ contact

ContactParams superdex::SoftActorParams::contact

Contact mechanics parameters.

See also
ContactParams

Definition at line 193 of file mochi_structs.h.

◆ hasGravity

bool superdex::SoftActorParams::hasGravity = true

If true, actor is affected by gravity.

Note
Unless the soft actor is part of a soft-skinned actor (SoftSkinnedActorParams::softParams), at least one of hasGravity, hasInertia or hasStress must be enabled.
See also
Scene::SetGravity

Definition at line 195 of file mochi_structs.h.

◆ hasInertia

bool superdex::SoftActorParams::hasInertia = true

If true, actor is affected by inertial forces.

Note
Disable for quasi-static simulations.
Unless the soft actor is part of a soft-skinned actor (SoftSkinnedActorParams::softParams), at least one of hasGravity, hasInertia or hasStress must be enabled.

Definition at line 197 of file mochi_structs.h.

◆ hasStress

bool superdex::SoftActorParams::hasStress = true

If true, actor is affected by internal stress/strain forces.

Note
Unless the soft actor is part of a soft-skinned actor (SoftSkinnedActorParams::softParams), at least one of hasGravity, hasInertia or hasStress must be enabled.

Definition at line 199 of file mochi_structs.h.

◆ layer

DynamicString superdex::SoftActorParams::layer

Contact layer name for filtering contacts between actors.

See also
Scene::EnableLayerContactAsymmetric, Scene::EnableLayerContactSymmetric, Scene::EnableActorContactAsymmetric, Scene::EnableActorContactSymmetric

Definition at line 185 of file mochi_structs.h.

◆ material

SoftMaterialParams superdex::SoftActorParams::material = {}

Uniform material properties.

Note
If the shape contains per-element material data of the same SoftMaterialType, the per-element values from the shape take precedence over and replace these uniform values. If the shape's per-element material type differs, these uniform values are used instead.
The actor uses a single PSD strategy for all elements. By default it is the material's PSD strategy. If the shape supplies per-element material data of a matching SoftMaterialType whose PerElementSoftMaterialData::psdStrategy is specified (i.e. not MaterialPsdStrategy::MaterialDefault), that value takes precedence. If the material's PSD strategy is also specified, the two must be equal.
Non-uniform material properties can also be applied after the actor is created. See experimental::SetSoftMaterialParamsField.
See also
Actor::SetSoftMaterialParams, experimental::SetSoftMaterialParamsField

Definition at line 191 of file mochi_structs.h.

◆ name

DynamicString superdex::SoftActorParams::name

Optional actor name.

Uniqueness of names is not enforced.

Note
When used in SoftSkinnedActorParams::softParams, this is interpreted as a nested soft local name. See SoftSkinnedActorParams::softParams for additional requirements and defaulting behavior.

Definition at line 183 of file mochi_structs.h.

◆ shape

ShapeHandle superdex::SoftActorParams::shape

Shape handle defining the actor's geometry and other metadata.

Note
Actor creation fails if the shape is not a tetrahedral mesh shape or has a node that no element references.
A shape can be shared by multiple actors, even actors in different scenes.
See also
ShapeHandle, Context::LoadShapeFromFile

Definition at line 189 of file mochi_structs.h.

◆ useContactSkin

bool superdex::SoftActorParams::useContactSkin = false

[Experimental] Use the shape's authored contact skin for colliding contact samples.

Actor creation fails unless the shape has a contact skin. The tetrahedral boundary remains the collider geometry when an SDF or Deep Flow collider is enabled. This option is not supported for ROM or nested soft actors.

Note
The contact skin is exposed through Actor::GetContactSkinMesh and QueryType::ContactSkinNodePositions / QueryType::ContactSkinNodeNormals independently of this flag.
Warning
This is an experimental feature. It may be changed or removed in the future. Use at your own risk.

Definition at line 201 of file mochi_structs.h.

◆ worldFromLocal

TransformRT superdex::SoftActorParams::worldFromLocal

Initial rotation and translation of the actor's local frame with respect to world frame.

Note
When this struct is used as an entry of SoftSkinnedActorParams::softParams, this transform must be identity. The soft actor's shape must be defined directly in the reference frame of the articulated actor (see SoftSkinnedActorParams::skeletonParams). The soft-skinned actor's placement in the scene world is provided by ArticulatedActorParams::worldFromRoot in SoftSkinnedActorParams::skeletonParams.

Definition at line 187 of file mochi_structs.h.


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