|
SuperDex Physics C++ API
|
Represents a simulated body (actor) in a scene. More...
#include <mochi_actor.h>
Public Member Functions | |
| virtual void | AddArticulatedDeltaToPose (Span< real const > pose, Span< real const > deltaDofs, Span< real > outPose, Error &error) const =0 |
| Add a pose delta to a pose using joint-aware composition. | |
| virtual void | AddArticulatedPoseController (PoseControllerParams const ¶ms, Error &error)=0 |
| Add a pose controller to an articulated actor. | |
| virtual void | AddBoundaryConditionConstrainedNodesAtRest (Error &error)=0 |
| Fix the "constrained nodes" at their world-space reference positions. | |
| virtual void | AddBoundaryConditionConstrainedNodesAtRestPermanent (Error &error)=0 |
| Permanently fix the "constrained nodes" at their world-space reference positions. | |
| virtual void | AddBoundaryConditionDofsWorld (Span< int const > dofIndices, Span< real const > dofValuesWorld, Error &error)=0 |
| Add boundary conditions to specified DoFs. | |
| virtual void | AddBoundaryConditionDofsWorldPermanent (Span< int const > dofIndices, Span< real const > dofValuesWorld, Error &error)=0 |
| Add permanent boundary conditions to specified DoFs. | |
| virtual void | AddBoundaryConditionNodesWorld (Span< int const > nodeIndices, Span< real const > nodePositionsWorld, Error &error)=0 |
| Add world-space boundary conditions for specified nodes. | |
| virtual void | AddBoundaryConditionNodesWorldPermanent (Span< int const > nodeIndices, Span< real const > nodePositionsWorld, Error &error)=0 |
| Add permanent world-space boundary conditions for specified nodes. | |
| virtual void | CancelQuery (QueryHandle handle)=0 |
| Cancel a previously registered query. | |
| virtual void | ClearBoundaryConditions ()=0 |
| Remove all clearable boundary conditions previously added. | |
| virtual void | ClearExternalForces ()=0 |
| Remove all the external forces previously added. | |
| virtual void | ComputeArticulatedPoseDelta (Span< real const > poseBase, Span< real const > poseTarget, Span< real > outDeltaDofs, Error &error) const =0 |
| Compute the pose delta from a base pose to a target pose. | |
| virtual Aabb | GetAabbLocal (Error &error) const =0 |
| Get an axis-aligned bounding box (AABB) that contains the full volume of the actor, in the actor's local frame. | |
| virtual Aabb | GetAabbWorld (Error &error) const =0 |
| Get an axis-aligned bounding box (AABB) that contains the full volume of the actor, in world frame. | |
| virtual Real3 | GetAngularVelocity (Error &error) const =0 |
| Get the angular velocity of the actor in world frame. | |
| virtual ActorHandle | GetArticulatedActor (Error &error) const =0 |
| Get the owning articulated actor. | |
| virtual Span< real const > | GetArticulatedControllerForce (Error &error) const =0 |
| Get the generalized forces applied by the pose controller on each joint DoF. | |
| virtual void | GetArticulatedDofLimits (Span< Real2 > outDofLimits, Error &error) const =0 |
| Get the limit values on all DoFs of the articulated actor. | |
| virtual Span< real const > | GetArticulatedJacobian (Error &error) const =0 |
| Get the Jacobian with respect to the articulated DoFs in world frame. | |
| virtual Span< ArticulatedJointFrictionParams const > | GetArticulatedJointFrictionParams (Error &error) const =0 |
| Get the per-joint friction parameters of the articulated actor. | |
| virtual Span< real const > | GetArticulatedJointInertiaParams (Error &error) const =0 |
| Get the per-joint inertia coefficients of the articulated actor. | |
| virtual Span< Constraint *const > | GetArticulatedJointLimitConstraints (Error &error) const =0 |
| Get the joint-limit constraints of the articulated actor. | |
| virtual void | GetArticulatedJointVelocities (Span< real > outVelocities, Error &error) const =0 |
| Get time derivatives of the articulated actor DoFs. | |
| virtual void | GetArticulatedLinkTransforms (Span< TransformRT > outWorldFromLinks, Error &error) const =0 |
| Get the pose of an articulated actor expressed as world-from-local link transforms. | |
| virtual void | GetArticulatedPose (Span< real > outPose, Error &error) const =0 |
| Get the pose of an articulated actor expressed as joint DoFs. | |
| virtual Span< PoseConstraintInfo const > | GetArticulatedPoseConstraints (Error &error) const =0 |
| Get the pose controller's constraints. | |
| virtual void | GetArticulatedPoseControllerParams (PoseControllerParams &outParams, Error &error) const =0 |
| Get the pose controller's tracking parameters. | |
| virtual void | GetArticulatedPoseDistance (Span< real const > poseA, Span< real const > poseB, Span< real > outTransDistances, Span< real > outRotDistances, Error &error) const =0 |
| Compute per-joint distances between two poses. | |
| virtual ArticulatedShapeInfo | GetArticulatedShapeInfo (Error &error) const =0 |
| Get articulated shape information about the articulated actor. | |
| virtual void | GetArticulatedTargetLinkTransforms (Span< TransformRT > outWorldFromTargets, Error &error) const =0 |
| Get the last target pose set to the pose controller, expressed as link transforms. | |
| virtual void | GetArticulatedTargetPose (Span< real > outPose, Error &error) const =0 |
| Get the last target pose set to the pose controller. | |
| virtual Span< int const > | GetBoundaryConditionDofIndices () const =0 |
| Get the DoF indices that are constrained by boundary conditions. | |
| virtual Span< real const > | GetBoundaryConditionDofValuesWorld () const =0 |
| Get the target values of DoFs fixed by boundary conditions. | |
| virtual TransformRT | GetCenterOfMassTransform (Error &error) const =0 |
| Get the world-space transform of the actor expressed at the center of mass. | |
| virtual ColliderType | GetColliderType () const =0 |
| Get the collider type of the actor. | |
| virtual Real3 | GetContactForceFromActorWorld (Actor const *other, Error &error) const =0 |
| Get the total contact force on the actor from another specified actor. | |
| virtual Real3 | GetContactForceWorld (Error &error) const =0 |
| Get the total contact force on the actor. | |
| virtual std::string_view | GetContactLayer () const =0 |
| Get the name of the contact layer of the actor. | |
| virtual ContactParams | GetContactParams (Error &error) const =0 |
| Get the contact parameters of the actor. | |
| virtual Span< ContactPoint const > | GetContactPointsWorld (Error &error) const =0 |
| Get all the active contact points of the actor. | |
| virtual Real3 | GetContactTorqueWorld (Error &error) const =0 |
| Get the total contact torque about the center of mass. | |
| virtual Context const * | GetContext () const =0 |
| Get read-only access to the Context that owns this actor. | |
| virtual Context * | GetContext ()=0 |
| Get the Context that owns this actor. | |
| virtual ConvergenceStatus | GetConvergenceStatus () const =0 |
| Get the convergence status of the actor in the most recent simulation step. | |
| virtual real | GetDensity (Error &error) const =0 |
| Get the density of the actor in the undeformed configuration. | |
| virtual Span< real const > | GetDisplacements (Error &error) const =0 |
| Get the node displacements of the actor in the actor's local frame, relative to reference (rest) positions. | |
| virtual void | GetDofValues (Span< int const > dofIndices, Span< real > outDofValues, Error &error) const =0 |
| Get the current value of the actor's degrees of freedom (DoFs) corresponding to the specified indices. | |
| virtual real | GetElasticEnergy (Error &error) const =0 |
| Get the elastic energy of the actor, measured as the difference with respect to the rest state. | |
| virtual Span< real const > | GetElementsDeformationGradient (Error &error) const =0 |
| Get the deformation gradient of each element. | |
| virtual void | GetExternalForces (Span< real > outForces, Error &error)=0 |
| Get the external forces currently set on this actor as a dense array over all DoFs. | |
| virtual ActorHandle | GetHandle () const =0 |
| Get the actor's handle. | |
| virtual Real3 | GetLinearVelocity (Error &error) const =0 |
| Get the linear velocity of the actor in world frame. | |
| virtual real | GetMass (Error &error) const =0 |
| Get the total mass of the actor. | |
| virtual MeshDataView | GetMesh () const =0 |
| Get a view of the actor's reference simulation mesh. | |
| virtual char const * | GetName () const =0 |
| Get the name of the actor. | |
| virtual Span< ActorHandle const > | GetNestedLinkActors (Error &error) const =0 |
| Get the actor handles for the nested rigid link actors. | |
| virtual Span< ActorHandle const > | GetNestedSoftActors (Error &error) const =0 |
| Get the actor handles for the nested soft actors (if any). | |
| virtual Span< NodeContactForce const > | GetNodeContactForcesWorld (Error &error) const =0 |
| Get contact forces on nodes. | |
| virtual Span< real const > | GetNodePositionsLocal (Error &error) const =0 |
| Get the current position (reference + displacements) of each node in the actor's local frame. | |
| virtual int | GetNumDofs () const =0 |
| Get the number of degrees of freedom (DoFs) of the actor. | |
| virtual void | GetPointsDistanceToSurface (Span< Real3 const > pointsWorld, Span< real > outDistances, Error &error) const =0 |
| Query the signed distance to the closest point on the actor's surface. | |
| virtual RecenteringParams | GetRecenteringParams () const =0 |
| Gets the recentering parameters of the actor. | |
| virtual ShapeHandle | GetReferenceShape (Error &error) const =0 |
| Get a new ShapeHandle referencing the same shape data used to create this actor. | |
| virtual Real3 | GetRigidCenterOfMassLocal (Error &error) const =0 |
| Get the position of the center of mass in the actor's local coordinate frame (GetRootTransform). | |
| virtual Real6 | GetRigidMomentOfInertiaLocal (Error &error) const =0 |
| Get the moment of inertia tensor of the actor at the center of mass, aligned with the actor's local reference system (root transform), and using negative tensor notation. | |
| virtual TransformRT | GetRootTransform () const =0 |
| Get the actor's world-from-local transform (root transform). | |
| virtual Scene const * | GetScene () const =0 |
| Get the Scene that this actor belongs to (read only). | |
| virtual Scene * | GetScene ()=0 |
| Get the Scene that this actor belongs to. | |
| virtual SdfDistances | GetSdfDistances (Error &error) const =0 |
| Get SDF distances for contact sample points. | |
| virtual SoftMaterialParams | GetSoftMaterialParams (Error &error) const =0 |
| Get the material parameters of a soft actor. | |
| virtual MeshDataView | GetSurfaceMesh () const =0 |
| Get a view of the actor's reference surface mesh. | |
| virtual Span< real const > | GetSurfaceMeshNodeNormalsLocal (Error &error) const =0 |
| Get the normal direction for each node of the surface mesh in the actor's local frame. | |
| virtual Span< real const > | GetSurfaceMeshNodePositionsLocal (Error &error) const =0 |
| Get the current position of the nodes (reference + displacements) of the surface mesh in the actor's local frame. | |
| virtual ActorType | GetType () const =0 |
| Get the type of the actor. | |
| virtual void * | GetUserData () const =0 |
| Get application-specific user data for this actor. | |
| virtual MeshDataView | GetVisualMesh () const =0 |
| Get a view of the actor's reference visual mesh. | |
| virtual Span< real const > | GetVisualMeshNodeNormalsLocal (Error &error) const =0 |
| Get the normal direction to each node of the visual mesh in the actor's local frame. | |
| virtual Span< real const > | GetVisualMeshNodePositionsLocal (Error &error) const =0 |
| Get the current position (reference + displacements) of the nodes of the visual mesh in the actor's local frame. | |
| virtual bool | HasArticulatedPoseController (Error &error) const =0 |
| Check if the articulated actor has a pose controller. | |
| virtual bool | HasRootTransform () const =0 |
| Check if the actor has a root transform. | |
| virtual bool | IsNestedLinkActor () const =0 |
| Check if the actor is a rigid link within an articulated actor. | |
| virtual bool | IsNestedSoftActor () const =0 |
| Check if the actor is a soft actor nested within a soft skinned articulated actor. | |
| virtual bool | IsQuerySupported (QueryType type) const =0 |
| Check whether a query type is supported for this actor. | |
| virtual bool | IsStatic () const =0 |
| Check whether the actor is static. | |
| virtual void | QueryNodesInVolumeLocal (Aabb const &volume, bool boundaryOnly, std::function< void(int, Real3)> const &callback, Error &error) const =0 |
| Find the actor's nodes that are inside an axis-aligned bounding box (AABB). | |
| virtual void | QueryNodesInVolumeLocal (Obb const &volume, bool boundaryOnly, std::function< void(int, Real3)> const &callback, Error &error) const =0 |
| Find the actor's nodes that are inside an oriented bounding box (OBB). | |
| virtual void | QueryNodesInVolumeLocal (Sphere const &volume, bool boundaryOnly, std::function< void(int, Real3)> const &callback, Error &error) const =0 |
| Find the actor's nodes that are inside a sphere. | |
| virtual QueryHandle | RegisterQuery (QueryType type, Error &error)=0 |
| Register a query to compute data for this actor. | |
| virtual QueryHandle | RegisterQueryAndCompute (QueryType type, Error &error)=0 |
| Register a query for this actor and compute the result immediately. | |
| virtual void | RemoveArticulatedPoseController (Error &error)=0 |
| Remove the pose controller. | |
| virtual void | ResetArticulatedTargetLinkTransforms (Span< TransformRT const > worldFromTargets, Error &error)=0 |
| Reset the target pose of the controller expressed as link transforms. | |
| virtual void | ResetArticulatedTargetPose (Span< real const > pose, Error &error)=0 |
| Reset the target pose of the controller expressed as joint DoFs. | |
| virtual void | SetArticulatedJointFrictionParams (Span< ArticulatedJointFrictionParams const > friction, Error &error)=0 |
| Set the per-joint friction parameters of the articulated actor. | |
| virtual void | SetArticulatedJointInertiaParams (Span< real const > inertia, Error &error)=0 |
| Set the per-joint inertia coefficients of the articulated actor. | |
| virtual void | SetArticulatedJointVelocities (Span< real const > velocities, Error &error)=0 |
| Set time derivatives of the articulated actor DoFs. | |
| virtual void | SetArticulatedPoseControllerParams (PoseControllerParams const ¶ms, Error &error)=0 |
| Set the pose controller's tracking parameters. | |
| virtual void | SetArticulatedPoseFromJoints (Span< real const > pose, Error &error)=0 |
| Set the pose of an articulated actor from joint DoFs. | |
| virtual void | SetArticulatedPoseFromLinks (Span< TransformRT const > worldFromLinks, Error &error)=0 |
| Set the pose of an articulated actor from the world-from-local link transforms. | |
| virtual void | SetArticulatedTargetLinkTransforms (Span< TransformRT const > worldFromTargets, Error &error)=0 |
| Set the target pose for the controller expressed as link transforms. | |
| virtual void | SetArticulatedTargetPose (Span< real const > pose, Error &error)=0 |
| Set the target pose for the controller expressed as joint DoFs. | |
| virtual void | SetArticulatedTargetVelocity (Span< real const > velocity, Error &error)=0 |
| Set the target velocity of the controller expressed as joint velocities for the next simulation step. | |
| virtual void | SetCenterOfMassTransform (TransformRT const &worldFromCom, Error &error)=0 |
| Set the world-space transform of the actor expressed at the center of mass. | |
| virtual void | SetContactLayer (std::string_view const &layer)=0 |
| Set the name of the contact layer of the actor. | |
| virtual void | SetContactParams (ContactParams const ¶ms, Error &error)=0 |
| Set the contact parameters of the actor. | |
| virtual void | SetDensity (real density, Error &error)=0 |
| Set the density of the actor in the undeformed configuration. | |
| virtual void | SetDisplacements (Span< real const > displacements, Error &error)=0 |
| Set the node displacements in the actor's local frame, relative to reference (rest) positions. | |
| virtual void | SetExternalForcesOnDofs (Span< int const > dofIndices, Span< real const > forceValues, Error &error)=0 |
| Set external forces on specified DoFs. | |
| virtual void | SetInertiaProperties (real mass, Real3 const ¢erOfMass, Real6 const &momentOfInertia, Error &error)=0 |
| Set the mass properties of the actor. | |
| virtual void | SetNodePositionsLocal (Span< real const > positionsLocal, Error &error)=0 |
| Set the current position of each node (reference + displacements) in the actor's local frame. | |
| virtual void | SetNodeVelocitiesLocal (Span< real const > velocitiesLocal, Error &error)=0 |
| Set the current velocity of each node in the actor's local frame. | |
| virtual void | SetRecenteringParams (RecenteringParams const ¶ms, Error &error)=0 |
| Set the recentering parameters of the actor. | |
| virtual void | SetRootTransform (TransformRT const &worldFromLocal, Error &error)=0 |
| Set the actor's world-from-local transform (root transform). | |
| virtual void | SetSoftMaterialParams (SoftMaterialParams const ¶ms, Error &error)=0 |
| Set the material parameters of a soft actor. | |
| virtual void | SetUserData (void *userData)=0 |
| Set application-specific user data for this actor. | |
| virtual void | SetVelocity (Real3 const &linearVel, Real3 const &angularVel, Error &error)=0 |
| Set the world-frame linear and angular velocity of the actor at the center of mass. | |
| virtual void | SetZeroDisplacementsAndVelocities (Error &error)=0 |
| Set all local displacement and velocity DoFs to zero. | |
Protected Member Functions | |
| virtual | ~Actor ()=default |
Represents a simulated body (actor) in a scene.
Definition at line 51 of file mochi_actor.h.
|
protectedvirtualdefault |
|
pure virtual |
Add a pose delta to a pose using joint-aware composition.
| [in] | pose | Base pose as joint DoFs. Must be of size GetNumDofs. |
| [in] | deltaDofs | Pose delta to add. Must be of size GetNumDofs. |
| [out] | outPose | Output pose after adding deltaDofs. Must be of size GetNumDofs. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Add a pose controller to an articulated actor.
| [in] | params | Parameters defining the pose controller. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Fix the "constrained nodes" at their world-space reference positions.
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Permanently fix the "constrained nodes" at their world-space reference positions.
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Add boundary conditions to specified DoFs.
| [in] | dofIndices | DoF indices to constrain. |
| [in] | dofValuesWorld | Target values in the actor-specific representations described below. Length must equal dofIndices. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Add permanent boundary conditions to specified DoFs.
| [in] | dofIndices | DoF indices to constrain. |
| [in] | dofValuesWorld | Target values in the actor-specific representations documented by AddBoundaryConditionDofsWorld. Length must equal dofIndices. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Add world-space boundary conditions for specified nodes.
| [in] | nodeIndices | Node indices to constrain. |
| [in] | nodePositionsWorld | Target positions [m] in world frame. Length must be 3 times the size of nodeIndices. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Add permanent world-space boundary conditions for specified nodes.
| [in] | nodeIndices | Node indices to constrain. |
| [in] | nodePositionsWorld | Target positions [m] in world frame. Length must be 3 times the size of nodeIndices. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Cancel a previously registered query.
| [in] | handle | QueryHandle from RegisterQuery or RegisterQueryAndCompute. |
|
pure virtual |
Remove all clearable boundary conditions previously added.
|
pure virtual |
Remove all the external forces previously added.
|
pure virtual |
Compute the pose delta from a base pose to a target pose.
| [in] | poseBase | Base pose as joint DoFs. Must be of size GetNumDofs. |
| [in] | poseTarget | Target pose as joint DoFs. Must be of size GetNumDofs. |
| [out] | outDeltaDofs | Pose delta. Must be of size GetNumDofs. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
Get an axis-aligned bounding box (AABB) that contains the full volume of the actor, in the actor's local frame.
| [in,out] | error | Error status. Check Error::IsOK for success. |
Get an axis-aligned bounding box (AABB) that contains the full volume of the actor, in world frame.
| [in,out] | error | Error status. Check Error::IsOK for success. |
Get the angular velocity of the actor in world frame.
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
nodiscardpure virtual |
Get the owning articulated actor.
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
nodiscardpure virtual |
Get the generalized forces applied by the pose controller on each joint DoF.
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Get the limit values on all DoFs of the articulated actor.
| [out] | outDofLimits | Output span for DoF limits. Must be of size GetNumDofs. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
nodiscardpure virtual |
Get the Jacobian with respect to the articulated DoFs in world frame.
| [in,out] | error | Error status. Check Error::IsOK for success. |
where R is the 3×3 root-from-world rotation matrix (i.e., the transpose of the owning articulated actor's world-from-root rotation).
|
nodiscardpure virtual |
Get the per-joint friction parameters of the articulated actor.
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
nodiscardpure virtual |
Get the per-joint inertia coefficients of the articulated actor.
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
nodiscardpure virtual |
Get the joint-limit constraints of the articulated actor.
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Get time derivatives of the articulated actor DoFs.
| [out] | outVelocities | Output span for DoF velocities: [m/s] for translational DoFs and [rad/s] for rotational DoFs. Must be of size GetNumDofs. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Get the pose of an articulated actor expressed as world-from-local link transforms.
| [out] | outWorldFromLinks | Output span for pose as world-from-local links transforms. Must be of size equal to the number of links. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Get the pose of an articulated actor expressed as joint DoFs.
| [out] | outPose | Output span for pose as joint DoFs: position [m] for translational DoFs and angle [rad] for rotational DoFs. Must be of size GetNumDofs. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
nodiscardpure virtual |
Get the pose controller's constraints.
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Get the pose controller's tracking parameters.
| [in,out] | outParams | Output tracking parameters grouped by constraint type (PoseControllerParams::linkPosTracking, PoseControllerParams::linkRotTracking, PoseControllerParams::jointTracking). All three arrays are link-indexed and must be pre-sized to numLinks; they are not resized. Entries in PoseControllerParams::jointTracking for links without a controllable joint are reported as zero gains. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Compute per-joint distances between two poses.
| [in] | poseA | First pose as joint DoFs. Must be of size GetNumDofs. |
| [in] | poseB | Second pose as joint DoFs. Must be of size GetNumDofs. |
| [out] | outTransDistances | Translation distances [m] for each joint. Must be of size equal to the number of joints. |
| [out] | outRotDistances | Rotation distances [rad] for each joint. Must be of size equal to the number of joints. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
nodiscardpure virtual |
Get articulated shape information about the articulated actor.
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Get the last target pose set to the pose controller, expressed as link transforms.
| [out] | outWorldFromTargets | Output span for the target world-from-link transforms. Must be of size equal to the number of links. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Get the last target pose set to the pose controller.
| [out] | outPose | Output span for the target pose as joint DoFs. Must be of size GetNumDofs. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
nodiscardpure virtual |
Get the DoF indices that are constrained by boundary conditions.
|
nodiscardpure virtual |
Get the target values of DoFs fixed by boundary conditions.
|
nodiscardpure virtual |
Get the world-space transform of the actor expressed at the center of mass.
The rotation is the same as in GetRootTransform, but the translation accounts for the local position of the center of mass with respect to the root transform.
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
nodiscardpure virtual |
Get the collider type of the actor.
|
nodiscardpure virtual |
Get the total contact force on the actor from another specified actor.
| [in] | other | Actor exerting the contact force on this actor. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
Get the total contact force on the actor.
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
nodiscardpure virtual |
Get the name of the contact layer of the actor.
|
nodiscardpure virtual |
Get the contact parameters of the actor.
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
nodiscardpure virtual |
Get all the active contact points of the actor.
| [in,out] | error | Error status. Check Error::IsOK for success. |
Get the total contact torque about the center of mass.
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
nodiscardpure virtual |
|
nodiscardpure virtual |
|
nodiscardpure virtual |
Get the convergence status of the actor in the most recent simulation step.
Get the density of the actor in the undeformed configuration.
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
nodiscardpure virtual |
Get the node displacements of the actor in the actor's local frame, relative to reference (rest) positions.
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Get the current value of the actor's degrees of freedom (DoFs) corresponding to the specified indices.
| [in] | dofIndices | DoF indices to query. Each index must be in the range [0, GetNumDofs). If empty, get the value of all DoFs. |
| [out] | outDofValues | Output buffer for the DoF values. Size must equal GetNumDofs when dofIndices is empty, or the size of dofIndices otherwise. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
Get the elastic energy of the actor, measured as the difference with respect to the rest state.
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
nodiscardpure virtual |
Get the deformation gradient of each element.
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Get the external forces currently set on this actor as a dense array over all DoFs.
| [out] | outForces | Dense output array of force values [N] for translation DoFs and torque values [N·m] for rotation DoFs. One entry per DoF. Size must equal GetNumDofs. DoFs with no external force set are filled with zero. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
nodiscardpure virtual |
Get the actor's handle.
Get the linear velocity of the actor in world frame.
| [in,out] | error | Error status. Check Error::IsOK for success. |
Get the total mass of the actor.
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
nodiscardpure virtual |
Get a view of the actor's reference simulation mesh.
For soft actors, returns the tetrahedral mesh. For shell actors, returns the triangle mesh. For rod actors, returns the polyline mesh. For articulated actors with a skin mesh, returns the skin mesh. For articulated actors without a skin mesh, returns an empty view. For soft-skinned actors, returns the blended skin mesh when one is present and an empty view otherwise. For rigid actors whose shape is a tetrahedral or triangular mesh, returns their surface simulation mesh. For rigid actors with an implicit shape, such as spheres and planes, returns an empty view.
|
nodiscardpure virtual |
Get the name of the actor.
|
nodiscardpure virtual |
Get the actor handles for the nested rigid link actors.
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
nodiscardpure virtual |
Get the actor handles for the nested soft actors (if any).
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
nodiscardpure virtual |
Get contact forces on nodes.
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
nodiscardpure virtual |
Get the current position (reference + displacements) of each node in the actor's local frame.
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
nodiscardpure virtual |
Get the number of degrees of freedom (DoFs) of the actor.
|
pure virtual |
Query the signed distance to the closest point on the actor's surface.
| [in] | pointsWorld | Point cloud in world frame. |
| [out] | outDistances | Output distances [m], in the same order as the input points. Must be the same size as the input points. Negative values indicate points inside the actor. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
nodiscardpure virtual |
Gets the recentering parameters of the actor.
|
nodiscardpure virtual |
Get a new ShapeHandle referencing the same shape data used to create this actor.
The returned handle is a new reference to the same underlying shape data. It will have a different numeric value from the ShapeHandle originally used to create the actor. The new handle represents a new request to keep the shape data in memory — the shape will remain valid as long as any handle, actor, or file cache entry references it.
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
nodiscardpure virtual |
Get the position of the center of mass in the actor's local coordinate frame (GetRootTransform).
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
nodiscardpure virtual |
Get the moment of inertia tensor of the actor at the center of mass, aligned with the actor's local reference system (root transform), and using negative tensor notation.
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
nodiscardpure virtual |
Get the actor's world-from-local transform (root transform).
|
nodiscardpure virtual |
Get the Scene that this actor belongs to (read only).
|
nodiscardpure virtual |
Get the Scene that this actor belongs to.
|
nodiscardpure virtual |
Get SDF distances for contact sample points.
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
nodiscardpure virtual |
Get the material parameters of a soft actor.
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
nodiscardpure virtual |
Get a view of the actor's reference surface mesh.
Returns a compact triangle mesh for the actor's surface. For volumetric simulation meshes, the surface is the boundary triangles. For triangular simulation meshes, the surface has the same triangle elements as the simulation mesh, but nodes not referenced by any surface triangle are omitted and remaining nodes may be reindexed. Returns an empty view if the actor does not have a surface mesh.
|
nodiscardpure virtual |
Get the normal direction for each node of the surface mesh in the actor's local frame.
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
nodiscardpure virtual |
Get the current position of the nodes (reference + displacements) of the surface mesh in the actor's local frame.
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
nodiscardpure virtual |
Get the type of the actor.
|
pure virtual |
Get application-specific user data for this actor.
|
nodiscardpure virtual |
Get a view of the actor's reference visual mesh.
Returns a triangle mesh intended for visual rendering. The mesh may include linear visual-mesh skinning data when available. Returns an empty view if the actor does not have a visual mesh.
|
nodiscardpure virtual |
Get the normal direction to each node of the visual mesh in the actor's local frame.
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
nodiscardpure virtual |
Get the current position (reference + displacements) of the nodes of the visual mesh in the actor's local frame.
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
nodiscardpure virtual |
Check if the articulated actor has a pose controller.
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
nodiscardpure virtual |
Check if the actor has a root transform.
|
nodiscardpure virtual |
Check if the actor is a rigid link within an articulated actor.
|
nodiscardpure virtual |
Check if the actor is a soft actor nested within a soft skinned articulated actor.
|
nodiscardpure virtual |
Check whether a query type is supported for this actor.
| [in] | type | Type of query to check. |
|
nodiscardpure virtual |
Check whether the actor is static.
|
pure virtual |
Find the actor's nodes that are inside an axis-aligned bounding box (AABB).
| [in] | volume | Axis-aligned bounding box in the actor's local frame. |
| [in] | boundaryOnly | If true, only boundary nodes are considered. |
| [in] | callback | Callback called for each node found. The position is the current node position [m] in the actor's local frame. The node index uses GetMesh ordering, including when boundaryOnly is true. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
boundaryOnly is false, this function supports only soft and shell actors. When true, it also supports articulated actors with a skin mesh, soft-skinned actors with a blended skin mesh, and rigid actors (dynamic or static) with tetrahedral or triangular mesh shapes. Rod actors and actors without a simulation mesh are not supported. boundaryOnly is false, or QueryType::SurfaceNodePositions when boundaryOnly is true. Results are available after the simulation step completes.
|
pure virtual |
Find the actor's nodes that are inside an oriented bounding box (OBB).
| [in] | volume | Oriented bounding box in the actor's local frame. |
| [in] | boundaryOnly | If true, only boundary nodes are considered. |
| [in] | callback | Callback called for each node found. The position is the current node position [m] in the actor's local frame. The node index uses GetMesh ordering, including when boundaryOnly is true. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
boundaryOnly is false, this function supports only soft and shell actors. When true, it also supports articulated actors with a skin mesh, soft-skinned actors with a blended skin mesh, and rigid actors (dynamic or static) with tetrahedral or triangular mesh shapes. Rod actors and actors without a simulation mesh are not supported. boundaryOnly is false, or QueryType::SurfaceNodePositions when boundaryOnly is true. Results are available after the simulation step completes.
|
pure virtual |
Find the actor's nodes that are inside a sphere.
| [in] | volume | Sphere in the actor's local frame. |
| [in] | boundaryOnly | If true, only boundary nodes are considered. |
| [in] | callback | Callback called for each node found. The position is the current node position [m] in the actor's local frame. The node index uses GetMesh ordering, including when boundaryOnly is true. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
boundaryOnly is false, this function supports only soft and shell actors. When true, it also supports articulated actors with a skin mesh, soft-skinned actors with a blended skin mesh, and rigid actors (dynamic or static) with tetrahedral or triangular mesh shapes. Rod actors and actors without a simulation mesh are not supported. boundaryOnly is false, or QueryType::SurfaceNodePositions when boundaryOnly is true. Results are available after the simulation step completes.
|
pure virtual |
Register a query to compute data for this actor.
| [in] | type | Type of query to register. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Register a query for this actor and compute the result immediately.
| [in] | type | Type of query to register. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Remove the pose controller.
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Reset the target pose of the controller expressed as link transforms.
| [in] | worldFromTargets | Target world-from-link transforms to reset to. Must be finite and of size equal to the number of links. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Reset the target pose of the controller expressed as joint DoFs.
| [in] | pose | Target pose as joint DoFs to reset to. Must be finite and of size GetNumDofs. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Set the per-joint friction parameters of the articulated actor.
| [in] | friction | Friction parameters, one per joint. Must be of size equal to the number of joints (matching GetArticulatedJointFrictionParams); all values must be finite and non-negative. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Set the per-joint inertia coefficients of the articulated actor.
| [in] | inertia | Inertia coefficients, one per joint. Must be of size equal to the number of joints (matching GetArticulatedJointInertiaParams); all values must be finite and non-negative. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Set time derivatives of the articulated actor DoFs.
| [in] | velocities | Joint DoF velocities to set. Must be of size GetNumDofs. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Set the pose controller's tracking parameters.
| [in] | params | Tracking parameters grouped by constraint type. Each array must be empty, size 1 (broadcast to all links), or size numLinks (per-link). An empty array will broadcast using a default-constructed PoseTrackingParams (zero gains) to all links. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Set the pose of an articulated actor from joint DoFs.
| [in] | pose | Joint DoF values to set. Must be of size GetNumDofs. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Set the pose of an articulated actor from the world-from-local link transforms.
| [in] | worldFromLinks | World-from-local link transforms. Must be of size equal to the number of links. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Set the target pose for the controller expressed as link transforms.
| [in] | worldFromTargets | Target world-from-link transforms to set. Must be of size equal to the number of links. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Set the target pose for the controller expressed as joint DoFs.
| [in] | pose | Target pose as joint DoFs to set. Must be of size GetNumDofs. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Set the target velocity of the controller expressed as joint velocities for the next simulation step.
| [in] | velocity | Target DoF velocities to set. [m/s] for translational DoFs and [rad/s] for rotational DoFs. Must be finite and of size GetNumDofs. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Set the world-space transform of the actor expressed at the center of mass.
| [in] | worldFromCom | World-space transform at the center of mass to set. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Set the name of the contact layer of the actor.
| [in] | layer | Contact layer name to set. |
|
pure virtual |
Set the contact parameters of the actor.
| [in] | params | Contact parameters to set. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
Set the density of the actor in the undeformed configuration.
| [in] | density | Density [kg/m³] to set. Must be positive. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Set the node displacements in the actor's local frame, relative to reference (rest) positions.
| [in] | displacements | Node displacements [m] to set in the actor's local frame. Length must be 3 × the number of nodes. The number of nodes is available from GetMesh. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Set external forces on specified DoFs.
| [in] | dofIndices | DoF indices to apply forces to. Must be unique. |
| [in] | forceValues | Force values [N] for translation DoFs, torque values [N·m] for rotation DoFs. Length must equal the number of DoF indices. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
dofIndices. Passing empty dofIndices and forceValues is equivalent to calling ClearExternalForces.
|
pure virtual |
Set the mass properties of the actor.
Directly sets mass, center of mass position in local coordinates, and moment of inertia tensor at the center of mass. This bypasses density-based computation and allows specifying exact inertia from CAD data or external measurements.
| [in] | mass | Mass [kg] to set. Must be positive and finite. |
| [in] | centerOfMass | Position of center of mass [m] in actor's local coordinate frame (GetRootTransform). |
| [in] | momentOfInertia | Moment of inertia tensor at center of mass [kg·m²], upper-right triangle [ixx, ixy, ixz, iyy, iyz, izz] using negative tensor notation consistent with GetRigidMomentOfInertiaLocal. Must be finite. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Set the current position of each node (reference + displacements) in the actor's local frame.
| [in] | positionsLocal | Node positions [m] to set (3 values per node: x, y, z) in the actor's local frame. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Set the current velocity of each node in the actor's local frame.
| [in] | velocitiesLocal | Node velocities to set in the actor's local frame. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Set the recentering parameters of the actor.
When enabled for a soft actor, the root transform automatically moves as the actor's "rigid pivot" (typically near the center of mass) moves.
| [in] | params | Recentering parameters to set. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Set the actor's world-from-local transform (root transform).
| [in] | worldFromLocal | World-space transform to set. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Set the material parameters of a soft actor.
| [in] | params | Material parameters to set. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Set application-specific user data for this actor.
| [in] | userData | Pointer to user data, or nullptr to clear. |
|
pure virtual |
Set the world-frame linear and angular velocity of the actor at the center of mass.
| [in] | linearVel | Linear velocity [m/s] of the center of mass in world frame. |
| [in] | angularVel | Angular velocity [rad/s] at the center of mass in world frame. |
| [in,out] | error | Error status. Check Error::IsOK for success. |
|
pure virtual |
Set all local displacement and velocity DoFs to zero.
| [in,out] | error | Error status. Check Error::IsOK for success. |