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

Prefab parameters for an articulated actor. More...

#include <mochi_prefab.h>

Public Member Functions

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

Public Attributes

std::optional< DynamicString > comment = std::nullopt
 Optional serialized comment.
DynamicArray< ArticulatedCycleJointParams > cycles
 Cycle joints creating closed kinematic loops.
std::optional< DynamicArray< real > > jointPose
 Optional initial joint pose, one value per DoF in joint order.
DynamicArray< ArticulatedJointPrefab > joints
 Joint parameters (one per joint).
std::optional< DynamicArray< real > > jointVelocities
 Optional initial velocity per DoF.
DynamicArray< ArticulatedLinkPrefab > links
 Link parameters (one per link).
DynamicString name
 Optional actor name.
Quaternion rotation
 Actor rotation quaternion [x, y, z, w] relative to the prefab's local frame (i.e., the prefab-from-root rotation).
real scale = 1_r
 Uniform scale baked into all link and skin shapes when the prefab is instantiated.
std::optional< ArticulatedSkinPrefab > skin
 Optional skinned mesh parameters.
Real3 translation = {}
 Actor translation [x, y, z] relative to the prefab's local frame (i.e., the prefab-from-root translation).

Detailed Description

Prefab parameters for an articulated actor.

Definition at line 171 of file mochi_prefab.h.

Member Function Documentation

◆ operator==()

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

Member Data Documentation

◆ comment

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

Optional serialized comment.

Definition at line 172 of file mochi_prefab.h.

◆ cycles

DynamicArray<ArticulatedCycleJointParams> superdex::prefab::ArticulatedActorPrefab::cycles

Cycle joints creating closed kinematic loops.

Empty if no cycles exist.

Definition at line 177 of file mochi_prefab.h.

◆ jointPose

std::optional<DynamicArray<real> > superdex::prefab::ArticulatedActorPrefab::jointPose

Optional initial joint pose, one value per DoF in joint order.

Units depend on joint type: [rad] for revolute, [m] for prismatic, and a rotation vector [rad] for spherical joints and the rotational part of free joints. The translational part of free joints is in [m]. Translational DoFs scale with the articulated effective scale (scale times the effective prefab scale). Rotational DoFs are not scaled. Applied right after the actor is created, see Actor::SetArticulatedPoseFromJoints.

Note
Ignored if unset or empty. Otherwise, must contain Actor::GetNumDofs finite values.

Definition at line 182 of file mochi_prefab.h.

◆ joints

DynamicArray<ArticulatedJointPrefab> superdex::prefab::ArticulatedActorPrefab::joints

Joint parameters (one per joint).

Definition at line 178 of file mochi_prefab.h.

◆ jointVelocities

std::optional<DynamicArray<real> > superdex::prefab::ArticulatedActorPrefab::jointVelocities

Optional initial velocity per DoF.

Note
Units depend on joint type: [rad/s] for revolute and spherical, [m/s] for prismatic.

Definition at line 181 of file mochi_prefab.h.

◆ links

DynamicArray<ArticulatedLinkPrefab> superdex::prefab::ArticulatedActorPrefab::links

Link parameters (one per link).

Definition at line 179 of file mochi_prefab.h.

◆ name

DynamicString superdex::prefab::ArticulatedActorPrefab::name

Optional actor name.

Uniqueness is not enforced.

Note
Nested actor runtime paths use the effective actor name as the parent path, where the effective actor name is this actor name combined with any enclosing PrefabParams::name or PrefabReference::name path. If the effective actor name is empty, runtime nested actor paths use "unnamed_articulation" as the parent path. Prefab actor-reference fields such as contact filters and constraints are authored relative to their containing prefab, and enclosing prefab-reference names are prepended during instantiation. They do not resolve through the "unnamed_articulation" fallback. Use a non-empty actor name or enclosing prefab name when prefab references need to target nested actors.
A name shared by more than one actor cannot be used by name-based prefab references.

Definition at line 173 of file mochi_prefab.h.

◆ rotation

Quaternion superdex::prefab::ArticulatedActorPrefab::rotation

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

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

Note
Must be finite and non-zero.

Definition at line 175 of file mochi_prefab.h.

◆ scale

real superdex::prefab::ArticulatedActorPrefab::scale = 1_r

Uniform scale baked into all link and skin shapes when the prefab is instantiated.

Note
Must be strictly positive and finite. Negative or zero scale is invalid and rejected at AddToScene.
This scale is not applied to rotation and translation. It scales each link's baked shape by multiplying both ArticulatedLinkPrefab::shapeScale and ArticulatedLinkPrefab::shapeTranslation. It also uniformly scales the skin shape.

Definition at line 174 of file mochi_prefab.h.

◆ skin

std::optional<ArticulatedSkinPrefab> superdex::prefab::ArticulatedActorPrefab::skin

Optional skinned mesh parameters.

Definition at line 180 of file mochi_prefab.h.

◆ translation

Real3 superdex::prefab::ArticulatedActorPrefab::translation = {}

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

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

Note
Must be finite.

Definition at line 176 of file mochi_prefab.h.


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