SuperDex Physics C++ API
Loading...
Searching...
No Matches
mochi_structs.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#pragma once
18
19#include "mochi_enums.h"
20#include "mochi_handle.h"
21
22/********************************************************************************
23 IMPORTANT: PLEASE KEEP HEADER INCLUDES TO A MINIMUM.
24 If you must include a mochi_core header, then please make sure that it only
25 declares the data types (not containing other implementation details).
26*********************************************************************************/
46
47#include <functional>
48#include <optional>
49
50namespace superdex {
51
52class Scene;
53
67
75
85
111
112struct StepInfo {
113 Scene* scene = nullptr;
114
115 double timeStepSec = 0.0;
116};
117
120
122
124
126
128
129 bool isStatic = false;
130
132
134
135 bool hasGravity = true;
136
137 std::optional<real> density;
138
139 std::optional<real> mass;
140
141 std::optional<Real3> centerOfMass;
142
143 std::optional<Real6> momentOfInertia;
144
146
147 std::optional<BoundarySubsamplingParams> boundarySubsampling;
148
149 std::optional<Real3> linearVelocity;
150
151 std::optional<Real3> angularVelocity;
152
153#if MOCHI_LANGUAGE_CPP20
154 bool operator==(RigidActorParams const&) const = default;
155#endif
156};
157
183
200
203 int parentLink = -1;
209 bool hasGravity = true;
210 std::optional<real> density;
211 std::optional<real> mass;
212 std::optional<Real3> centerOfMass;
213 std::optional<Real6> momentOfInertia;
215 std::optional<BoundarySubsamplingParams> boundarySubsampling;
216
217#if MOCHI_LANGUAGE_CPP20
218 bool operator==(ArticulatedLinkParams const&) const = default;
219#endif
220};
221
233
235 int parentLink = -1;
236 int childLink = -1;
238 real stiffness = 50000_r;
239
240#if MOCHI_LANGUAGE_CPP20
241 bool operator==(ArticulatedCycleJointParams const&) const = default;
242#endif
243};
244
258
268
271
273
275
276#if MOCHI_LANGUAGE_CPP20
277 bool operator==(ConstraintParams const&) const = default;
278#endif
279};
280
290
293
295
297
298 std::optional<real> max{};
299
300 std::optional<real> min{};
301};
302
314
324
338
354
362
370
378
380 int nodeIndex = -1;
381
383
385
386#if MOCHI_LANGUAGE_CPP20
388#endif
389};
390
398
408
416
428
438
441
443
445
447
449
451
453
455
457
458 int sampleIndex = 0;
459
461
462 int elementIndex = -1;
463
465};
466
468 int index = 0;
469
471};
472
484
486 bool useFixedTimeStep = false;
487
488 double fixedTimeStepSeconds = 0.01;
489
491
493
494 std::function<double()> timeStepCallback;
495};
496
499
501
503
505
507
508#if MOCHI_LANGUAGE_CPP20
509 bool operator==(PerformanceStats const&) const = default;
510#endif
511};
512
515
516 double residualNorm = 0.0;
517
519
521
522#if MOCHI_LANGUAGE_CPP20
523 bool operator==(SolverStats const&) const = default;
524#endif
525};
526
528 // ------------------------------------------------------------------------------
529 // Per-Actor Information
530 // ------------------------------------------------------------------------------
531
532 bool recordActorMeshes = true;
533
535
537
538 // ------------------------------------------------------------------------------
539 // Per-Step Information
540 // ------------------------------------------------------------------------------
541
542 bool recordTargetState = true;
543
545
547
549
551
552 bool recordSdfDistances = false;
553
554 // ------------------------------------------------------------------------------
555 // Utils
556 // ------------------------------------------------------------------------------
557
558 static RecordingParams All(bool enabled = true) {
559 RecordingParams params;
560 params.recordActorMeshes = enabled;
561 params.recordActorLocalToGlobalMap = enabled;
562 params.recordActorMassMatrix = enabled;
563 params.recordTargetState = enabled;
564 params.recordDynamicActorState = enabled;
565 params.recordStaticActorState = enabled;
566 params.recordContactPoints = enabled;
567 params.recordNodeContactForces = enabled;
568 params.recordSdfDistances = enabled;
569 return params;
570 }
571};
572
575
577
579
580#if MOCHI_LANGUAGE_CPP20
581 bool operator==(PoseTrackingParams const&) const = default;
582#endif
583};
584
587
588 // Construct with all three tracking arrays pre-sized to numLinks default-constructed
589 // PoseTrackingParams (zero gains). Convenient for Get/SetArticulatedPoseControllerParams, which
590 // operate on link-indexed arrays of size numLinks.
591 explicit PoseControllerParams(int numLinks)
592 : linkPosTracking(numLinks), linkRotTracking(numLinks), jointTracking(numLinks) {}
593
595
597
599};
600
610
613
615
617
618#if MOCHI_LANGUAGE_CPP20
619 bool operator==(DebugDrawSpheres const&) const = default;
620#endif
621};
622
625
627
628#if MOCHI_LANGUAGE_CPP20
629 bool operator==(DebugDrawLineVertices const&) const = default;
630#endif
631};
632
635
637
638#if MOCHI_LANGUAGE_CPP20
639 bool operator==(DebugDrawData const&) const = default;
640#endif
641};
642
643} // namespace superdex
A dynamically resizable array with syntax and behavior similar to std::pmr::vector.
Represents a simulation scene.
Definition mochi_scene.h:45
ConvergenceStatus
Convergence status of the non-linear solver.
@ None
Convergence status has not been set.
ArticulatedJointType
Types of joints in an articulated body.
PoseConstraintType
Type of constraint in an articulated pose controller.
@ Invalid
Invalid constraint type.
ActorBoundaryElementType
Two-dimensional discretization element types for actor boundary integrals.
Definition mochi_enums.h:49
@ Default
Default actor boundary element type.
Definition mochi_enums.h:64
NdArray< real, 3 > Real3
Definition nd_array.h:106
constexpr Real2 kMinus2PiPlus2Pi
Definition constants.h:34
IntegrationMethod
Time integration methods.
@ Default
Default time integration method.
ColliderType
Collision detection geometry for an Actor.
@ Auto
Automatic collider type selection based on the actor's shape.
std::basic_string< char, std::char_traits< char >, StlAllocator< char > > DynamicString
Alias for std::string using a polymorphic superdex::Allocator pointer.
NdArray< real, 2 > Real2
Definition nd_array.h:105
BoundarySubsamplingStrategy
Strategy for selecting the active boundary faces when subsampling boundary integrals.
Definition mochi_enums.h:41
@ UniformProbability
Select boundary faces with uniform probability.
Definition mochi_enums.h:42
Unique identifier for an Actor within a Scene.
Parameters for creating a range constraint on a 3D-rotation articulated joint.
int jointIndex
Index of the joint in the articulated actor.
ActorHandle actor
Actor handle identifying the articulated actor.
Real3 minValues
Minimum allowed value [rad] for each component of the joint-local rotation vector.
Real3 maxValues
Maximum allowed value [rad] for each component of the joint-local rotation vector.
Parameters for creating a target constraint on 3D rotation DoFs of an articulated actor.
ActorHandle actor
Actor handle identifying the articulated actor.
Quaternion target
Target rotation relative to the joint's rest orientation, expressed in the joint's local frame as a q...
int jointIndex
Index of the joint in the articulated actor.
Parameters to create an articulated actor.
DynamicArray< ArticulatedLinkParams > links
Link actor parameters (one per link).
DynamicString name
Name of the articulated actor.
std::optional< ArticulatedSkinParams > skin
Optional skinned mesh parameters.
std::optional< DynamicArray< real > > jointVelocities
Optional initial joint velocity per DoF [m/s or rad/s].
TransformRT worldFromRoot
Initial rotation and translation of the articulated actor's local frame with respect to world frame.
bool operator==(ArticulatedActorParams const &) const =default
DynamicArray< ArticulatedJointParams > joints
Joint parameters (one per joint).
DynamicArray< ArticulatedCycleJointParams > cycles
Optional cycle joints creating closed kinematic loops.
Parameters for a cycle-closing joint within an articulated actor.
TransformRT jointFromChildLink
Position and rotation of the cycle joint constraint in the child link's local frame.
bool operator==(ArticulatedCycleJointParams const &) const =default
real stiffness
Stiffness [N/m] for the cycle joint constraint.
Per-joint friction parameters for articulated bodies.
Parameters describing a single joint within an articulated actor.
ArticulatedJointFrictionParams friction
Joint friction parameters.
std::optional< Real3 > minLimit
Minimum joint limits for each DoF.
real limitDamping
Damping coefficient [N·s/m or N·m·s/rad] for the joint limit constraints.
std::optional< Real3 > maxLimit
Maximum joint limits for each DoF.
DynamicString name
Joint name.
Real3 axis
Local axis of motion for the joint, in the joint's local frame.
bool operator==(ArticulatedJointParams const &) const =default
ArticulatedJointType type
Joint type.
std::optional< real > inertia
Joint inertia coefficient.
real limitStiffness
Stiffness coefficient [N/m or N·m/rad] for the joint limit constraints.
TransformRT parentLinkFromJoint
Rotation and translation of the joint with respect to the parent link.
Parameters describing a single rigid link within an articulated actor.
std::optional< real > density
Uniform density [kg/m³] of the actor.
TransformRT parentJointFromLink
Rotation and translation of the link with respect to the parent joint.
ColliderType colliderType
Collision detection geometry.
ShapeHandle shape
Shape handle defining the actor's geometry and other metadata.
DynamicString name
Link local name.
int parentLink
Index of the parent link in ArticulatedActorParams::links, or -1 for the root.
ActorBoundaryElementType boundaryElementType
Finite element type for boundary discretization.
bool hasGravity
If true, the link actor will be affected by gravity.
std::optional< Real3 > centerOfMass
Position [m] of the center of mass in the link actor's local frame.
bool operator==(ArticulatedLinkParams const &) const =default
std::optional< real > mass
Total mass [kg] of the actor.
ContactParams contact
Contact mechanics parameters.
std::optional< BoundarySubsamplingParams > boundarySubsampling
Optional subsampling for boundary integrals such as contact.
std::optional< Real6 > momentOfInertia
Moment of inertia tensor [kg·m²] at the center of mass in the actor's local frame.
DynamicString layer
Contact layer name for filtering contacts between actors.
Information describing an articulated shape's kinematic structure.
Span< TransformRT const > parentLinkFromJoint
Joint frame of each joint expressed in its parent link's local frame (rotation + translation).
Span< DynamicString const > linkNames
Name of each link.
Span< Real3 const > jointMinLimits
Minimum joint limits for each joint DoF.
Span< Real3 const > jointMaxLimits
Maximum joint limits for each joint DoF.
Span< ArticulatedJointType const > jointTypes
Type of each joint.
Span< ArticulatedDofInfo const > dofInfo
DoF information of each joint (offset within the full pose, number of translation DoFs,...
Span< Real3 const > jointAxes
Axis of each joint in the joint's local frame.
Span< TransformRT const > jointFromChildLink
Transform from each joint's child link to the joint frame (rotation + translation).
Span< ArticulatedCycleJoint const > cycles
Cycle joints creating closed kinematic loops in the articulated body.
Span< TransformRT const > rootFromLinksAtRest
Rotation and translation of each link in rest configuration relative to the local reference system of...
Span< int const > parents
Parent link indices defining a tree-like joint structure with no cycles.
Span< DynamicString const > jointNames
Name of each joint.
Parameters for creating a range constraint on a single articulated DoF.
int dofIndex
DoF index within the joint (0-based).
ActorHandle actor
Actor handle identifying the articulated actor.
int jointIndex
Index of the joint in the articulated actor.
Parameters for creating a target constraint on a single articulated DoF.
ActorHandle actor
Actor handle identifying the articulated actor.
real targetValue
Target value for the joint DoF.
int dofIndex
DoF index within the joint (0-based).
int jointIndex
Index of the joint in the articulated actor.
Optional skinned mesh attached to an articulated actor for collision and rendering.
bool operator==(ArticulatedSkinParams const &) const =default
ActorBoundaryElementType boundaryElementType
Finite element type for boundary discretization.
ShapeHandle shape
Shape handle defining the skinned triangle mesh.
std::optional< BoundarySubsamplingParams > boundarySubsampling
Optional subsampling for boundary integrals such as contact.
ContactParams contact
Contact mechanics parameters.
DynamicString layer
Contact layer name for filtering contacts between actors.
Parameters controlling the stepping behavior of an AsyncScene.
std::function< double()> timeStepCallback
Optional callback to provide custom time step size [s].
double dynamicTimeStepMaxSeconds
Maximum time step size [s] in dynamic mode.
double dynamicTimeStepMinSeconds
Minimum time step size [s] in dynamic mode.
double fixedTimeStepSeconds
Fixed time step size [s].
bool useFixedTimeStep
Use fixed time step if true, dynamic (real-time) time step if false.
Parameters for subsampling boundary integrals such as contact.
real subsamplingDensity
Subsampling density in the range [0, 1].
BoundarySubsamplingStrategy strategy
Strategy for determining which sample points to use.
bool operator==(BoundarySubsamplingParams const &) const =default
Unique identifier for a Constraint within a Scene.
Base constraint parameters.
real saturation
Saturation distance [m] or angle [rad].
real stiffness
Constraint stiffness coefficient.
bool operator==(ConstraintParams const &) const =default
real damping
Constraint damping coefficient.
Parameters for contact mechanics simulation.
Information about a contact point between two actors.
Real3 posA
Contact position [m] on actorA in world frame.
int sampleIndex
Sample point index of actorA.
Real3 posB
Approximate contact position [m] on actorB in world frame.
Real3 parametricCoords
Parametric coordinates within the surface element of actorA.
real intWeight
Quadrature integration weight of the sample point on the colliding manifold of actorA.
Real3 pointVelocityB
Velocity [m/s] of the contact point on actorB in world frame.
int elementIndex
Element index on the surface mesh of actorA.
Real3 normal
Contact normal in world frame pointing away from actorB.
ActorHandle actorB
Handle of the collider actor.
real distance
Signed separation distance [m] between posA (on actorA) and the closest point on the surface of actor...
Real3 force
Contact force [N] applied to actorA from actorB in world frame.
Real3 pointVelocityA
Velocity [m/s] of the contact point on actorA in world frame.
ActorHandle actorA
Handle of the colliding actor.
Collection of debug draw primitives.
bool operator==(DebugDrawData const &) const =default
DebugDrawSpheres spheres
Sphere primitives.
DebugDrawLineVertices lineVertices
Line primitives.
Line primitives for debug visualization.
Span< Color const > colors
Line vertex colors.
bool operator==(DebugDrawLineVertices const &) const =default
Span< Real3 const > positions
Line vertex positions [m] in world frame.
Sphere primitives for debug visualization.
bool operator==(DebugDrawSpheres const &) const =default
Span< real const > radii
Sphere radii [m].
Span< Color const > colors
Sphere colors.
Span< Real3 const > positions
Sphere center positions [m] in world frame.
Parameters for creating a position constraint on a deformable actor node.
ActorHandle actor
Actor handle identifying the deformable actor.
Real3 position
Target position for the node in world frame [m].
int nodeIndex
Node index in the deformable actor's reference simulation mesh, as returned by Actor::GetMesh.
bool operator==(DeformableNodePositionConstraintParams const &) const =default
Parameters for creating a constraint coupling a node in a deformable actor to a node in another defor...
int nodeIndexB
Node index in deformable actor B's reference simulation mesh, as returned by Actor::GetMesh.
ActorHandle actorB
Actor handle identifying deformable actor B.
ActorHandle actorA
Actor handle identifying deformable actor A.
int nodeIndexA
Node index in deformable actor A's reference simulation mesh, as returned by Actor::GetMesh.
bool findClosest
Whether to automatically select a boundary node on each actor.
Parameters for creating a constraint coupling a deformable node to a rigid actor.
ActorHandle rigidActor
Actor handle identifying the rigid actor.
bool fixToDeformablePos
When true, the coupling position on the rigid actor is auto-computed to match the deformable node's i...
bool findClosest
Whether to automatically select a boundary node of the deformable actor.
int deformableNodeIndex
Node index in the deformable actor's reference simulation mesh, as returned by Actor::GetMesh.
ActorHandle deformableActor
Actor handle identifying the deformable actor.
Real3 rigidLocalPos
Coupling position [m] in rigid actor's local frame.
[Experimental] Evaluation settings common to the full scene.
Definition eval_params.h:73
Parameters controlling the resolution of grid-based Signed Distance Fields (SDF).
Parameters for creating a joint rotation range constraint between two rigid actors.
Real2 angleRangeY
Allowed range [min, max] [rad] for the Y component of the relative rotation vector (axis-angle),...
Real2 angleRangeZ
Allowed range [min, max] [rad] for the Z component of the relative rotation vector (axis-angle),...
ActorHandle actorB
Actor handle identifying rigid actor B.
Real2 angleRangeX
Allowed range [min, max] [rad] for the X component of the relative rotation vector (axis-angle),...
ActorHandle actorA
Actor handle identifying rigid actor A.
Real3 refFrameRotVec
Joint reference frame specified as a rotation vector [rad] with respect to world frame.
bool rangeAroundRest
When true, angle limits are relative to the actors' relative rotation at constraint creation time.
Parameters for creating a joint rotation tracking constraint between two rigid actors.
ActorHandle actorA
Actor handle identifying rigid actor A.
ActorHandle actorB
Actor handle identifying rigid actor B.
Real3 refFrameRotVec
Joint reference-frame orientation in world coordinates at constraint creation, expressed as a rotatio...
Parameters for the linear solve performed in each iteration of the non-linear solver.
Contact force applied to a specific node.
int index
Node index in the volumetric mesh (for actors with a volumetric mesh) or surface mesh (for actors wit...
Real3 force
Contact force [N] applied to the node.
Parameters for the non-linear solver.
Timing and profiling metrics from the last simulation step.
double postStepCallbacksDurationSec
Wall-clock time [s] spent executing user-defined post-step callbacks in the last call to Scene::Step.
double recordingStepDurationSec
Wall-clock time [s] spent on recording in the last call to Scene::Step.
bool operator==(PerformanceStats const &) const =default
double totalStepDurationSec
Total wall-clock time [s] spent in the last call to Scene::Step.
double preStepCallbacksDurationSec
Wall-clock time [s] spent executing user-defined pre-step callbacks in the last call to Scene::Step.
double solveStepDurationSec
Wall-clock time [s] spent solving physics in the last call to Scene::Step.
Information about a single pose constraint in a pose controller.
int parent
Index of the parent link, or -1 if none.
ConstraintHandle handle
Handle to the underlying constraint.
PoseConstraintType type
Type of constraint.
int link
Index of the target link in the articulated body.
PoseControllerParams(int numLinks)
Construct with all tracking arrays pre-sized to numLinks default-constructed PoseTrackingParams (zero...
DynamicArray< PoseTrackingParams > linkRotTracking
Tracking parameters for link rotation constraints.
DynamicArray< PoseTrackingParams > linkPosTracking
Tracking parameters for link position constraints.
DynamicArray< PoseTrackingParams > jointTracking
Tracking parameters for joint constraints.
Parameters for pose controller tracking constraints.
real saturation
Saturation distance [m] or angle [rad].
real stiffness
Constraint stiffness.
bool operator==(PoseTrackingParams const &) const =default
real damping
Constraint damping.
Parameters controlling recentering behavior for soft actors (not soft-skinned).
real translationEpsilon
Minimum translation threshold [m] to apply recentering.
bool useRecentering
Whether recentering is enabled.
real rotationEpsilonDeg
Minimum rotation threshold [degrees] to apply recentering.
Parameters controlling what data gets included in a scene recording.
bool recordNodeContactForces
Record results for QueryType::NodeContactForces for each soft actor every step.
bool recordActorMassMatrix
Include the mass matrix (if any) when recording actor creation events.
bool recordActorLocalToGlobalMap
Include the local-to-global map (if any) when recording actor creation events.
static RecordingParams All(bool enabled=true)
Return RecordingParams with all boolean options set to the given value.
bool recordStaticActorState
Record the state of static actors every step.
bool recordSdfDistances
Record SDF distances for QueryType::SdfDistances for each dynamic actor every step.
bool recordContactPoints
Record results from QueryType::ContactPoints for each dynamic actor every step.
bool recordActorMeshes
Include the meshes (if any) when recording actor creation events.
bool recordTargetState
Record articulated pose controller targets and tracking parameters every step.
bool recordDynamicActorState
Record the state of dynamic actors every step.
Parameters to create a rigid body actor.
bool hasGravity
If true, actor is affected by gravity.
DynamicString layer
Contact layer name for filtering contacts between actors.
ContactParams contact
Contact mechanics parameters.
ColliderType colliderType
Collision detection geometry.
ShapeHandle shape
Shape handle defining the actor's geometry and other metadata.
bool operator==(RigidActorParams const &) const =default
std::optional< real > mass
Total mass [kg] of the actor.
ActorBoundaryElementType boundaryElementType
Finite element type for boundary discretization.
std::optional< Real3 > linearVelocity
Optional initial linear velocity of the center of mass in world frame [m/s], zero otherwise.
std::optional< BoundarySubsamplingParams > boundarySubsampling
Optional subsampling for boundary integrals such as contact.
GridSdfParams sdf
Parameters used to construct a grid-based Signed Distance Field (SDF) if the shape doesn't already ha...
std::optional< Real6 > momentOfInertia
Moment of inertia tensor [kg·m²] at the center of mass in the actor's local frame.
TransformRT worldFromLocal
Initial rotation and translation of the actor's local frame with respect to world frame.
bool isStatic
If true, actor will be static (fixed in space).
std::optional< real > density
Uniform density [kg/m³] of the actor.
std::optional< Real3 > angularVelocity
Optional initial angular velocity in world frame [rad/s], zero otherwise.
std::optional< Real3 > centerOfMass
Position [m] of the center of mass in the actor's local frame.
DynamicString name
Optional actor name.
Parameters for creating a position constraint on a rigid actor's pivot point.
ActorHandle actor
Actor handle identifying the rigid actor.
Real3 localPosition
Pivot point in rigid actor's local frame [m].
Real3 targetPosition
Target position in world frame [m].
Parameters for creating a rotation constraint on a rigid actor's pivot frame.
ActorHandle actor
Actor handle identifying the rigid actor.
Real3 localRotation
Pivot frame in rigid actor's local coordinates, as a rotation vector [rad].
Real3 targetRotation
Target rotation in world coordinates, as a rotation vector [rad].
Parameters for creating a constraint on a rigid actor's pivot point.
ActorHandle actor
Actor handle identifying the rigid actor.
TransformRT targetTransform
Target center-of-mass transform.
Real3 localPosition
Pivot point in rigid actor's local frame [m].
Parameters for creating a prismatic joint between two rigid actors.
Real3 freeAxis
Axis of free translation, specified in the world frame at constraint creation time.
std::optional< real > min
Minimum translation [m] relative to rest position.
std::optional< real > max
Maximum translation [m] relative to rest position.
ActorHandle actorA
Actor handle identifying rigid actor A.
ActorHandle actorB
Actor handle identifying rigid actor B.
Parameters for creating a spherical joint between two rigid actors.
Real3 localPosA
Joint position [m] for rigid actor A in actor A's local frame.
Real3 localPosB
Joint position [m] for rigid actor B in actor B's local frame.
ActorHandle actorB
Actor handle identifying rigid actor B.
ActorHandle actorA
Actor handle identifying rigid actor A.
Parameters for creating a tracking constraint on the relative rotation between a rigid actor and a ro...
ActorHandle rigidActor
Actor handle identifying rigid actor.
ActorHandle rodActor
Actor handle identifying rod actor.
Real3 refFrameRotVec
Joint reference-frame orientation in world coordinates at constraint creation, expressed as a rotatio...
int elementIndex
Index of the element in the rod actor.
SDF distance information for active contact sample points.
Span< real const > distances
Signed distances [m] to the closest surface.
Span< int const > sampleIndices
Indices into the actor's contact sample points array.
real maxSdfFarDistanceEvaluation
Maximum distance [m] at which SDF evaluation was performed.
Span< Real3 const > distanceGrads
SDF gradients at sample positions, in world frame.
Span< Real3 const > worldPositions
Sample positions [m] in world frame.
Handle to a shape (mesh, sphere, plane, etc.) within a Context.
Parameters to create a soft deformable actor.
SoftMaterialParams material
Uniform material properties.
ShapeHandle shape
Shape handle defining the actor's geometry and other metadata.
bool hasStress
If true, actor is affected by internal stress/strain forces.
bool hasInertia
If true, actor is affected by inertial forces.
DynamicString name
Optional actor name.
DynamicString layer
Contact layer name for filtering contacts between actors.
ContactParams contact
Contact mechanics parameters.
ActorBoundaryElementType boundaryElementType
Finite element type for boundary discretization.
TransformRT worldFromLocal
Initial rotation and translation of the actor's local frame with respect to world frame.
bool hasGravity
If true, actor is affected by gravity.
bool operator==(SoftActorParams const &) const =default
Material parameters for soft body simulation.
Parameters to create soft-skinned actors with a shared articulated skeleton.
bool hasGravity
Enable gravity evaluation of soft actors on posed/skinned positions.
bool hasInertia
Enable inertia evaluation of soft actors on posed/skinned positions.
bool enableCollidingLinks
Enable internal skeleton links as colliding actors.
ArticulatedActorParams skeletonParams
Parameters for the articulated skeleton.
DynamicArray< DynamicString > softAttachLinks
Optional local names of the rigid links where soft actors are attached.
bool hasStress
Enable elasticity evaluation of soft actors on posed/skinned positions.
DynamicArray< SoftActorParams > softParams
Parameters for the soft deformable actors.
Simulation solver configuration parameters.
LinearSolverParams linearSolver
Linear solver settings.
NonLinearSolverParams nonLinearSolver
Nonlinear solver settings.
bool operator==(SolverParams const &) const =default
ExperimentalEvalParams experimentalEval
[Experimental] Evaluation settings common to the full scene.
IntegrationMethod integrationMethod
Time integration method.
Solver convergence metrics from the last simulation step.
ConvergenceStatus convergenceStatus
Aggregate convergence status of the scene in the last call to Scene::Step.
int maxLineSearchIters
Maximum number of line-search iterations per Newton solve across all islands and integration stages i...
int maxNonLinearIters
Maximum number of non-linear solver iterations across all islands and integration stages in the last ...
bool operator==(SolverStats const &) const =default
double residualNorm
Aggregate residual norm across all islands and integration stages in the last call to Scene::Step.
Information passed to per-step callbacks.
Scene * scene
Pointer to the Scene being stepped.
double timeStepSec
Time step size [s] for this simulation step.