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

Parameters describing a single rigid link within an articulated actor. More...

#include <mochi_structs.h>

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

Public Member Functions

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

Public Attributes

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

Parameters describing a single rigid link within an articulated actor.

Each link is a rigid body in the articulation's kinematic tree. Mirrors RigidActorParams for the per-link rigid-body properties (shape, mass, inertia, contact), and adds tree-structure fields (parentLink, parentJointFromLink). Pose and velocity at creation time come from the articulated body, not from per-link fields.

See also
ArticulatedActorParams, ArticulatedJointParams, RigidActorParams

Definition at line 201 of file mochi_structs.h.

Member Function Documentation

◆ operator==()

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

Member Data Documentation

◆ boundaryElementType

ActorBoundaryElementType superdex::ArticulatedLinkParams::boundaryElementType = ActorBoundaryElementType::Default

Finite element type for boundary discretization.

Note
Affects accuracy and performance of contact and boundary integrals.

Definition at line 214 of file mochi_structs.h.

◆ boundarySubsampling

std::optional<BoundarySubsamplingParams> superdex::ArticulatedLinkParams::boundarySubsampling

Optional subsampling for boundary integrals such as contact.

Note
Reduces computational cost by using fewer sample points.
For best performance, combine subsampling with boundaryElementType = ActorBoundaryElementType::P1Q1.

Definition at line 215 of file mochi_structs.h.

◆ centerOfMass

std::optional<Real3> superdex::ArticulatedLinkParams::centerOfMass

Position [m] of the center of mass in the link actor's local frame.

Note
If not set, computed automatically from geometry.
Usually combined with explicit momentOfInertia.
See also
momentOfInertia

Definition at line 212 of file mochi_structs.h.

◆ colliderType

ColliderType superdex::ArticulatedLinkParams::colliderType = ColliderType::Auto

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.

Definition at line 207 of file mochi_structs.h.

◆ contact

ContactParams superdex::ArticulatedLinkParams::contact

Contact mechanics parameters.

Definition at line 208 of file mochi_structs.h.

◆ density

std::optional<real> superdex::ArticulatedLinkParams::density

Uniform density [kg/m³] of the actor.

Must be positive if provided.

Note
Specify either density or mass, but not both.
If density is set, mass is computed automatically from volume (and vice versa).
If neither is set, kDefaultDensity is used.
See also
mass

Definition at line 210 of file mochi_structs.h.

◆ hasGravity

bool superdex::ArticulatedLinkParams::hasGravity = true

If true, the link actor will be affected by gravity.

See also
Scene::SetGravity

Definition at line 209 of file mochi_structs.h.

◆ layer

DynamicString superdex::ArticulatedLinkParams::layer

Contact layer name for filtering contacts between actors.

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

Definition at line 206 of file mochi_structs.h.

◆ mass

std::optional<real> superdex::ArticulatedLinkParams::mass

Total mass [kg] of the actor.

Must be positive if provided.

Note
Specify either mass or density, but not both.
If mass is set, density is computed automatically from volume (and vice versa).
See also
density

Definition at line 211 of file mochi_structs.h.

◆ momentOfInertia

std::optional<Real6> superdex::ArticulatedLinkParams::momentOfInertia

Moment of inertia tensor [kg·m²] at the center of mass in the actor's local frame.

Stored as [ixx, ixy, ixz, iyy, iyz, izz] using negative tensor notation:

[ixx, ixy, ixz] [ +∫(y²+z²)dm, -∫(xy)dm, -∫(xz)dm ]
I = [ixy, iyy, iyz] = [ -∫(xy)dm, +∫(x²+z²)dm, -∫(yz)dm ]
[ixz, iyz, izz] [ -∫(xz)dm, -∫(yz)dm, +∫(x²+y²)dm ]
Note
Uses negative tensor notation consistent with e.g. robotics URDF files.
Many CAD tools (e.g., Solidworks) use positive tensor notation requiring negation of off-diagonal terms. See https://www.mathworks.com/help/sm/ug/specify-custom-inertia.html.
Must be finite. A finite but physically invalid tensor (negative principal moments or one violating the triangle inequality) is accepted with a warning, not rejected.
If not set, computed automatically from geometry and density.
Usually combined with explicit centerOfMass.
See also
centerOfMass

Definition at line 213 of file mochi_structs.h.

◆ name

DynamicString superdex::ArticulatedLinkParams::name

Link local name.

Note
Must be unique among links of the same articulated actor. For soft-skinned actors, it must also not collide with nested soft actor local names.
Must not contain forward slash, backslash, or embedded NUL characters, which are reserved for hierarchy paths or incompatible with actor path formatting.
If left empty, a unique default name (e.g., "link_0", "link_1", ...) is assigned automatically.
In the scene the corresponding actor is named "articulatedActorName/linkLocalName". If the articulated actor name is empty, link actors use "unnamed_articulation/linkLocalName".

Definition at line 202 of file mochi_structs.h.

◆ parentJointFromLink

TransformRT superdex::ArticulatedLinkParams::parentJointFromLink

Rotation and translation of the link with respect to the parent joint.

Warning
The rotation must be identity. Non-identity rotations are not supported yet.

Definition at line 204 of file mochi_structs.h.

◆ parentLink

int superdex::ArticulatedLinkParams::parentLink = -1

Index of the parent link in ArticulatedActorParams::links, or -1 for the root.

Note
Links must be listed in parent-first order: parentLink < i for the i-th link.
The root link (index 0) must have parentLink == -1.

Definition at line 203 of file mochi_structs.h.

◆ shape

ShapeHandle superdex::ArticulatedLinkParams::shape

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

Note
A shape can be shared by multiple actors, even actors in different scenes.
Dynamic links require a shape with a surface mesh when link contact is enabled. An articulated actor enables link contact when no skin shape is provided. A soft-skinned actor enables link contact when SoftSkinnedActorParams::enableCollidingLinks is true.
See also
ShapeHandle, Context::LoadShapeFromFile

Definition at line 205 of file mochi_structs.h.


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