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

Prefab parameters for a soft actor. More...

#include <mochi_prefab.h>

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

Public Attributes

ColliderType colliderType = ColliderType::None
 [Experimental] Collision detection geometry.
std::optional< DynamicStringcomment = std::nullopt
 Optional serialized comment.
ShapeHandle flow
 [Experimental] Optional deep flow shape handle loaded from flowFile.
DynamicString flowFile {}
 [Experimental] Optional path to a deep flow shape handle for collision detection.
DynamicString renderModelFile
 Optional path to a render model file (e.g.
Quaternion renderModelRotation
 Rotation quaternion [x, y, z, w] to apply to the render model.
Real3 renderModelScale = {1_r, 1_r, 1_r}
 Scale [x, y, z] to apply to the render model.
Real3 renderModelTranslation = {}
 Translation [x, y, z] to apply to the render model.
Quaternion rotation {}
 Actor rotation quaternion [x, y, z, w] relative to the prefab's local frame (i.e., the prefab-from-local rotation).
Real3 scale {1_r, 1_r, 1_r}
 Scale [x, y, z] to bake into the shape file.
GridSdfParams sdf
 [Experimental] Parameters used to construct a grid-based Signed Distance Field (SDF) if the shape doesn't already have one.
DynamicString shapeFile {}
 Path to a model file that will be loaded and referenced via ShapeHandle.
Quaternion shapeRotation {}
 Rotation quaternion [x, y, z, w] to bake into the shape file.
Real3 shapeTranslation {}
 Translation [x, y, z] to bake into the shape file.
Real3 translation {}
 Actor translation [x, y, z] relative to the prefab's local frame (i.e., the prefab-from-local translation).
bool useRecentering = true
 [Experimental] Enable automatic recentering of the local coordinate system.
Public Attributes inherited from superdex::SoftActorParams
ActorBoundaryElementType boundaryElementType = ActorBoundaryElementType::Default
 Finite element type for boundary 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.
TransformRT worldFromLocal
 Initial rotation and translation of the actor's local frame with respect to world frame.

Additional Inherited Members

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

Detailed Description

Prefab parameters for a soft actor.

Extends SoftActorParams. The inherited SoftActorParams::worldFromLocal is replaced by the prefab-relative rotation and translation fields, and the inherited SoftActorParams::shape (a runtime ShapeHandle) is replaced by shapeFile (a path serialized to JSON. The shape is loaded at instantiation time).

Note
When used as a standalone soft actor prefab, the inherited SoftActorParams::name field need not be unique, but a name shared by more than one actor cannot be referenced by a constraint, pose controller, or contact filter.

Definition at line 86 of file mochi_prefab.h.

Member Data Documentation

◆ colliderType

ColliderType superdex::prefab::SoftActorPrefab::colliderType = ColliderType::None

[Experimental] Collision detection geometry.

Note
Determines how OTHER actors detect contact with this actor. It does not affect how this actor detects contact with other actors.
Warning
This is an experimental feature. It may be changed or removed in the future. Use at your own risk.

Definition at line 89 of file mochi_prefab.h.

◆ comment

std::optional<DynamicString> superdex::prefab::SoftActorPrefab::comment = std::nullopt

Optional serialized comment.

Definition at line 87 of file mochi_prefab.h.

◆ flow

ShapeHandle superdex::prefab::SoftActorPrefab::flow

[Experimental] Optional deep flow shape handle loaded from flowFile.

Warning
This is an experimental feature. It may be changed or removed in the future. Use at your own risk.

Definition at line 92 of file mochi_prefab.h.

◆ flowFile

DynamicString superdex::prefab::SoftActorPrefab::flowFile {}

[Experimental] Optional path to a deep flow shape handle for collision detection.

Warning
This is an experimental feature. It may be changed or removed in the future. Use at your own risk.

Definition at line 91 of file mochi_prefab.h.

◆ renderModelFile

DynamicString superdex::prefab::SoftActorPrefab::renderModelFile

Optional path to a render model file (e.g.

.glb) for visualization.

Note
SuperDex Physics does not use this field for simulation. It provides additional metadata for visualization in supported tools. Ignored if empty.

Definition at line 99 of file mochi_prefab.h.

◆ renderModelRotation

Quaternion superdex::prefab::SoftActorPrefab::renderModelRotation

Rotation quaternion [x, y, z, w] to apply to the render model.

Note
Ignored if renderModelFile is empty.

Definition at line 101 of file mochi_prefab.h.

◆ renderModelScale

Real3 superdex::prefab::SoftActorPrefab::renderModelScale = {1_r, 1_r, 1_r}

Scale [x, y, z] to apply to the render model.

Note
Ignored if renderModelFile is empty.

Definition at line 100 of file mochi_prefab.h.

◆ renderModelTranslation

Real3 superdex::prefab::SoftActorPrefab::renderModelTranslation = {}

Translation [x, y, z] to apply to the render model.

Note
Ignored if renderModelFile is empty.

Definition at line 102 of file mochi_prefab.h.

◆ rotation

Quaternion superdex::prefab::SoftActorPrefab::rotation {}

Actor rotation quaternion [x, y, z, w] relative to the prefab's local frame (i.e., the prefab-from-local rotation).

Composes with PrefabParams::rotation to produce the final world-from-local rotation.

Note
Must be finite and non-zero when used in ActorLists::soft.
Ignored when used in SoftSkinnedActorPrefab::softParams.

Definition at line 97 of file mochi_prefab.h.

◆ scale

Real3 superdex::prefab::SoftActorPrefab::scale {1_r, 1_r, 1_r}

Scale [x, y, z] to bake into the shape file.

Note
All components must be strictly positive and finite. Negative scale (mirroring) is not supported and rejected at AddToScene.
If flowFile is set, scale must be (1, 1, 1).
Non-uniform scale is supported only for shape data that supports arbitrary per-axis bake scale. Unsupported scale values are rejected when the shape is loaded.

Definition at line 94 of file mochi_prefab.h.

◆ sdf

GridSdfParams superdex::prefab::SoftActorPrefab::sdf

[Experimental] Parameters used to construct a grid-based Signed Distance Field (SDF) if the shape doesn't already have one.

Note
Ignored if colliderType is not ColliderType::Sdf.
Ignored if the shape already has a grid-based SDF.
Warning
This is an experimental feature. It may be changed or removed in the future. Use at your own risk.

Definition at line 90 of file mochi_prefab.h.

◆ shapeFile

DynamicString superdex::prefab::SoftActorPrefab::shapeFile {}

Path to a model file that will be loaded and referenced via ShapeHandle.

Definition at line 88 of file mochi_prefab.h.

◆ shapeRotation

Quaternion superdex::prefab::SoftActorPrefab::shapeRotation {}

Rotation quaternion [x, y, z, w] to bake into the shape file.

Definition at line 95 of file mochi_prefab.h.

◆ shapeTranslation

Real3 superdex::prefab::SoftActorPrefab::shapeTranslation {}

Translation [x, y, z] to bake into the shape file.

Definition at line 96 of file mochi_prefab.h.

◆ translation

Real3 superdex::prefab::SoftActorPrefab::translation {}

Actor translation [x, y, z] relative to the prefab's local frame (i.e., the prefab-from-local translation).

Composes with PrefabParams::scale, PrefabParams::rotation, and PrefabParams::translation to produce the final world-from-local translation.

Note
Must be finite when used in ActorLists::soft.
Ignored when used in SoftSkinnedActorPrefab::softParams.

Definition at line 98 of file mochi_prefab.h.

◆ useRecentering

bool superdex::prefab::SoftActorPrefab::useRecentering = true

[Experimental] Enable automatic recentering of the local coordinate system.

Note
Recentering updates the root transform as the actor moves, keeping local-space displacements small. This improves numerical stability for actors that move far from their initial position.
Ignored by soft skinned actors, which do not support recentering.
Warning
This is an experimental feature. It may be changed or removed in the future. Use at your own risk.

Definition at line 93 of file mochi_prefab.h.


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