61 [[nodiscard]]
virtual char const*
GetName()
const = 0;
67 [[nodiscard]]
virtual bool IsStatic()
const = 0;
103 Real3 const& centerOfMass,
104 Real6 const& momentOfInertia,
145 std::function<
void(
int,
Real3)>
const& callback,
146 Error& error)
const = 0;
151 std::function<
void(
int,
Real3)>
const& callback,
152 Error& error)
const = 0;
157 std::function<
void(
int,
Real3)>
const& callback,
158 Error& error)
const = 0;
163 Error& error)
const = 0;
225 Error& error)
const = 0;
255 Error& error)
const = 0;
289 Error& error)
const = 0;
295 Error& error)
const = 0;
302 Error& error)
const = 0;
325 Error& error)
const = 0;
338 Error& error)
const = 0;
Represents a simulated body (actor) in a scene.
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 Span< real const > GetArticulatedJointInertiaParams(Error &error) const =0
Get the per-joint inertia coefficients of the articulated actor.
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 SetNodeVelocitiesLocal(Span< real const > velocitiesLocal, Error &error)=0
Set the current velocity of each node in the actor's local frame.
virtual ActorHandle GetArticulatedActor(Error &error) const =0
Get the owning articulated actor.
virtual Scene const * GetScene() const =0
Get the Scene that this actor belongs to (read only).
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 void AddBoundaryConditionNodesWorldPermanent(Span< int const > nodeIndices, Span< real const > nodePositionsWorld, Error &error)=0
Add permanent world-space boundary conditions for specified nodes.
virtual void ResetArticulatedTargetLinkTransforms(Span< TransformRT const > worldFromTargets, Error &error)=0
Reset the target pose of the controller expressed as link transforms.
virtual Real3 GetContactTorqueWorld(Error &error) const =0
Get the total contact torque about the center of mass.
virtual void AddArticulatedPoseController(PoseControllerParams const ¶ms, Error &error)=0
Add a pose controller to an articulated actor.
virtual QueryHandle RegisterQueryAndCompute(QueryType type, Error &error)=0
Register a query for this actor and compute the result immediately.
virtual char const * GetName() const =0
Get the name of the actor.
virtual ActorType GetType() const =0
Get the type of the actor.
virtual Aabb GetAabbWorld(Error &error) const =0
Get an axis-aligned bounding box (AABB) that contains the full volume of the actor,...
virtual SoftMaterialParams GetSoftMaterialParams(Error &error) const =0
Get the material parameters of a soft actor.
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 > GetBoundaryConditionDofValuesWorld() const =0
Get the target values of DoFs fixed by boundary conditions.
virtual Real3 GetContactForceWorld(Error &error) const =0
Get the total contact force on the actor.
virtual TransformRT GetRootTransform() const =0
Get the actor's world-from-local transform (root transform).
virtual bool IsNestedLinkActor() const =0
Check if the actor is a rigid link within an articulated actor.
virtual bool HasArticulatedPoseController(Error &error) const =0
Check if the articulated actor has a pose controller.
virtual void ClearBoundaryConditions()=0
Remove all clearable boundary conditions previously added.
virtual Context const * GetContext() const =0
Get read-only access to the Context that owns this actor.
virtual RecenteringParams GetRecenteringParams() const =0
Gets the recentering parameters of the actor.
virtual Span< Constraint *const > GetArticulatedJointLimitConstraints(Error &error) const =0
Get the joint-limit constraints of the articulated actor.
virtual void SetInertiaProperties(real mass, Real3 const ¢erOfMass, Real6 const &momentOfInertia, Error &error)=0
Set the mass properties of the actor.
virtual MeshDataView GetVisualMesh() const =0
Get a view of the actor's reference visual 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 void SetArticulatedPoseFromJoints(Span< real const > pose, Error &error)=0
Set the pose of an articulated actor from joint DoFs.
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 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 void SetArticulatedPoseFromLinks(Span< TransformRT const > worldFromLinks, Error &error)=0
Set the pose of an articulated actor from the world-from-local link transforms.
virtual Span< NodeContactForce const > GetNodeContactForcesWorld(Error &error) const =0
Get contact forces on nodes.
virtual void AddBoundaryConditionNodesWorld(Span< int const > nodeIndices, Span< real const > nodePositionsWorld, Error &error)=0
Add world-space boundary conditions for specified nodes.
virtual Aabb GetAabbLocal(Error &error) const =0
Get an axis-aligned bounding box (AABB) that contains the full volume of the 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 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) posi...
virtual void GetArticulatedTargetPose(Span< real > outPose, Error &error) const =0
Get the last target pose set to the pose controller.
virtual void AddBoundaryConditionDofsWorld(Span< int const > dofIndices, Span< real const > dofValuesWorld, Error &error)=0
Add boundary conditions to specified DoFs.
virtual Span< real const > GetElementsDeformationGradient(Error &error) const =0
Get the deformation gradient of each element.
virtual void SetArticulatedJointInertiaParams(Span< real const > inertia, Error &error)=0
Set the per-joint inertia coefficients of the articulated actor.
virtual void * GetUserData() const =0
Get application-specific user data for this actor.
virtual void GetArticulatedDofLimits(Span< Real2 > outDofLimits, Error &error) const =0
Get the limit values on all DoFs of the articulated actor.
virtual void SetRecenteringParams(RecenteringParams const ¶ms, Error &error)=0
Set the recentering parameters of the actor.
virtual void CancelQuery(QueryHandle handle)=0
Cancel a previously registered query.
virtual void SetArticulatedPoseControllerParams(PoseControllerParams const ¶ms, Error &error)=0
Set the pose controller's tracking parameters.
virtual bool HasRootTransform() const =0
Check if the actor has a root transform.
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 l...
virtual bool IsQuerySupported(QueryType type) const =0
Check whether a query type is supported for this actor.
virtual void SetDensity(real density, Error &error)=0
Set the density of the actor in the undeformed configuration.
virtual ContactParams GetContactParams(Error &error) const =0
Get the contact parameters of the actor.
virtual void ClearExternalForces()=0
Remove all the external forces previously added.
virtual void SetZeroDisplacementsAndVelocities(Error &error)=0
Set all local displacement and velocity DoFs to zero.
virtual MeshDataView GetMesh() const =0
Get a view of the actor's reference simulation mesh.
virtual Span< ActorHandle const > GetNestedSoftActors(Error &error) const =0
Get the actor handles for the nested soft actors (if any).
virtual Span< real const > GetArticulatedControllerForce(Error &error) const =0
Get the generalized forces applied by the pose controller on each joint DoF.
virtual bool IsNestedSoftActor() const =0
Check if the actor is a soft actor nested within a soft skinned articulated actor.
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 Span< PoseConstraintInfo const > GetArticulatedPoseConstraints(Error &error) const =0
Get the pose controller's constraints.
virtual Real3 GetLinearVelocity(Error &error) const =0
Get the linear velocity of the actor in world frame.
virtual void SetArticulatedTargetPose(Span< real const > pose, Error &error)=0
Set the target pose for the controller expressed as joint DoFs.
virtual void SetExternalForcesOnDofs(Span< int const > dofIndices, Span< real const > forceValues, Error &error)=0
Set external forces on specified DoFs.
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 GetArticulatedPoseControllerParams(PoseControllerParams &outParams, Error &error) const =0
Get the pose controller's tracking parameters.
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 Span< ArticulatedJointFrictionParams const > GetArticulatedJointFrictionParams(Error &error) const =0
Get the per-joint friction parameters of the articulated actor.
virtual void AddBoundaryConditionDofsWorldPermanent(Span< int const > dofIndices, Span< real const > dofValuesWorld, Error &error)=0
Add permanent boundary conditions to specified DoFs.
virtual void SetArticulatedJointVelocities(Span< real const > velocities, Error &error)=0
Set time derivatives of the articulated actor DoFs.
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 GetArticulatedJointVelocities(Span< real > outVelocities, Error &error) const =0
Get time derivatives of the articulated actor DoFs.
virtual MeshDataView GetSurfaceMesh() const =0
Get a view of the actor's reference surface mesh.
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 SetCenterOfMassTransform(TransformRT const &worldFromCom, Error &error)=0
Set the world-space transform of the actor expressed at the center of mass.
virtual void SetContactParams(ContactParams const ¶ms, Error &error)=0
Set the contact parameters of the actor.
virtual real GetMass(Error &error) const =0
Get the total mass of the actor.
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 void AddBoundaryConditionConstrainedNodesAtRest(Error &error)=0
Fix the "constrained nodes" at their world-space reference positions.
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 SetContactLayer(std::string_view const &layer)=0
Set the name of the contact layer of the actor.
virtual SdfDistances GetSdfDistances(Error &error) const =0
Get SDF distances for contact sample points.
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 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 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 r...
virtual void GetArticulatedPose(Span< real > outPose, Error &error) const =0
Get the pose of an articulated actor expressed as joint DoFs.
virtual int GetNumDofs() const =0
Get the number of degrees of freedom (DoFs) of the actor.
virtual Real3 GetAngularVelocity(Error &error) const =0
Get the angular velocity of the actor in world frame.
virtual Context * GetContext()=0
Get the Context that owns this actor.
virtual ShapeHandle GetReferenceShape(Error &error) const =0
Get a new ShapeHandle referencing the same shape data used to create this actor.
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 Real3 GetContactForceFromActorWorld(Actor const *other, Error &error) const =0
Get the total contact force on the actor from another specified actor.
virtual void SetRootTransform(TransformRT const &worldFromLocal, Error &error)=0
Set the actor's world-from-local transform (root transform).
virtual Span< ActorHandle const > GetNestedLinkActors(Error &error) const =0
Get the actor handles for the nested rigid link actors.
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 Span< int const > GetBoundaryConditionDofIndices() const =0
Get the DoF indices that are constrained by boundary conditions.
virtual void RemoveArticulatedPoseController(Error &error)=0
Remove the pose controller.
virtual ActorHandle GetHandle() const =0
Get the actor's handle.
virtual TransformRT GetCenterOfMassTransform(Error &error) const =0
Get the world-space transform of the actor expressed at the center of mass.
virtual real GetDensity(Error &error) const =0
Get the density of the actor in the undeformed configuration.
virtual ColliderType GetColliderType() const =0
Get the collider type of the actor.
virtual ArticulatedShapeInfo GetArticulatedShapeInfo(Error &error) const =0
Get articulated shape information about the articulated actor.
virtual QueryHandle RegisterQuery(QueryType type, Error &error)=0
Register a query to compute data for this actor.
virtual void SetArticulatedTargetLinkTransforms(Span< TransformRT const > worldFromTargets, Error &error)=0
Set the target pose for the controller expressed as link transforms.
virtual void SetArticulatedJointFrictionParams(Span< ArticulatedJointFrictionParams const > friction, Error &error)=0
Set the per-joint friction parameters of the articulated actor.
virtual void ResetArticulatedTargetPose(Span< real const > pose, Error &error)=0
Reset the target pose of the controller expressed as joint DoFs.
virtual std::string_view GetContactLayer() const =0
Get the name of the contact layer of the actor.
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 Span< real const > GetArticulatedJacobian(Error &error) const =0
Get the Jacobian with respect to the articulated DoFs in world frame.
virtual void SetSoftMaterialParams(SoftMaterialParams const ¶ms, Error &error)=0
Set the material parameters of a soft actor.
virtual ConvergenceStatus GetConvergenceStatus() const =0
Get the convergence status of the actor in the most recent simulation step.
virtual Scene * GetScene()=0
Get the Scene that this actor belongs to.
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 ...
virtual Span< ContactPoint const > GetContactPointsWorld(Error &error) const =0
Get all the active contact points of the actor.
virtual void AddBoundaryConditionConstrainedNodesAtRestPermanent(Error &error)=0
Permanently fix the "constrained nodes" at their world-space reference positions.
virtual void SetUserData(void *userData)=0
Set application-specific user data for this actor.
Represents a constraint that restricts the degrees of freedom of one or more actors.
Main entry point for SuperDex Physics simulation.
Represents a simulation scene.
ConvergenceStatus
Convergence status of the non-linear solver.
ColliderType
Collision detection geometry for an Actor.
QueryType
Type of query data to compute for an actor or constraint.
Unique identifier for an Actor within a Scene.
Information describing an articulated shape's kinematic structure.
A non-owning view of the mesh data for a Mochi actor or model file.
Parameters to create a pose controller for an articulated actor.
Unique identifier for a query within a Scene.
Parameters controlling recentering behavior for soft actors (not soft-skinned).
SDF distance information for active contact sample points.
Handle to a shape (mesh, sphere, plane, etc.) within a Context.
Material parameters for soft body simulation.