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

Link parameters for an articulated actor prefab. More...

#include <mochi_prefab.h>

Inheritance diagram for superdex::prefab::ArticulatedLinkPrefab:
superdex::ArticulatedLinkParams

Public Member Functions

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

Public Attributes

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.
DynamicString shapeFile
 Path to a simulation model file defining the geometry of the rigid link actor.
Quaternion shapeRotation
 Rotation quaternion [x, y, z, w] to bake into the shape file.
Real3 shapeScale = {1_r, 1_r, 1_r}
 Scale [x, y, z] to bake into the shape file.
Real3 shapeTranslation = {}
 Translation [x, y, z] to bake into the shape file.
Public Attributes inherited from superdex::ArticulatedLinkParams
ActorBoundaryElementType boundaryElementType = ActorBoundaryElementType::Default
 Finite element type for boundary discretization.
std::optional< BoundarySubsamplingParamsboundarySubsampling
 Optional subsampling for boundary integrals such as contact.
std::optional< Real3centerOfMass
 Position [m] of the center of mass in the link actor's local frame.
ColliderType colliderType = ColliderType::Auto
 Collision detection geometry.
ContactParams contact
 Contact mechanics parameters.
std::optional< realdensity
 Uniform density [kg/m³] of the actor.
bool hasGravity = true
 If true, the link actor will be affected by gravity.
DynamicString layer
 Contact layer name for filtering contacts between actors.
std::optional< realmass
 Total mass [kg] of the actor.
std::optional< Real6momentOfInertia
 Moment of inertia tensor [kg·m²] at the center of mass in the actor's local frame.
DynamicString name
 Link local name.
TransformRT parentJointFromLink
 Rotation and translation of the link with respect to the parent joint.
int parentLink = -1
 Index of the parent link in ArticulatedActorParams::links, or -1 for the root.
ShapeHandle shape
 Shape handle defining the actor's geometry and other metadata.

Detailed Description

Link parameters for an articulated actor prefab.

Extends ArticulatedLinkParams. The inherited ArticulatedLinkParams::shape (a runtime ShapeHandle) is replaced by shapeFile (a path serialized to JSON. The shape is loaded at instantiation time). Inherited link local-name requirements apply: names must not contain forward slash, backslash, or embedded NUL characters, and must be unique within the parent articulated actor's nested actor namespace after default-name assignment.

Definition at line 109 of file mochi_prefab.h.

Member Function Documentation

◆ operator==()

bool superdex::prefab::ArticulatedLinkPrefab::operator== ( ArticulatedLinkPrefab const & ) const
default

Member Data Documentation

◆ renderModelFile

DynamicString superdex::prefab::ArticulatedLinkPrefab::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 114 of file mochi_prefab.h.

◆ renderModelRotation

Quaternion superdex::prefab::ArticulatedLinkPrefab::renderModelRotation

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

Note
Ignored if renderModelFile is empty.

Definition at line 116 of file mochi_prefab.h.

◆ renderModelScale

Real3 superdex::prefab::ArticulatedLinkPrefab::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 115 of file mochi_prefab.h.

◆ renderModelTranslation

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

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

Note
Ignored if renderModelFile is empty.

Definition at line 117 of file mochi_prefab.h.

◆ shapeFile

DynamicString superdex::prefab::ArticulatedLinkPrefab::shapeFile

Path to a simulation model file defining the geometry of the rigid link actor.

Note
Leave empty for dummy links.

Definition at line 110 of file mochi_prefab.h.

◆ shapeRotation

Quaternion superdex::prefab::ArticulatedLinkPrefab::shapeRotation

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

Note
Ignored if shapeFile is empty.

Definition at line 112 of file mochi_prefab.h.

◆ shapeScale

Real3 superdex::prefab::ArticulatedLinkPrefab::shapeScale = {1_r, 1_r, 1_r}

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

Note
Ignored if shapeFile is empty.
All components must be non-zero and finite. Negative scale mirrors the link shape.
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.
If ArticulatedLinkParams::mass, ArticulatedLinkParams::centerOfMass, or ArticulatedLinkParams::momentOfInertia are set explicitly, they are transformed consistently with the final per-axis scale applied to the link at AddToScene. If they are left unset, they are computed from the scaled shape.

Definition at line 111 of file mochi_prefab.h.

◆ shapeTranslation

Real3 superdex::prefab::ArticulatedLinkPrefab::shapeTranslation = {}

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

Note
Ignored if shapeFile is empty.

Definition at line 113 of file mochi_prefab.h.


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