Represents a simulated body (actor) in a scene.
Represents a constraint that restricts the degrees of freedom of one or more actors.
virtual real GetStiffness() const =0
Get the constraint's stiffness parameter.
virtual void SetRefRelativeRotation(Quaternion const &rotationA, Quaternion const &rotationB, Error &error)=0
Set a relative-rotation target from two rotations expressed in a common frame.
virtual Span< int const > GetDofIndicesForActor(int actorIndex) const =0
Get the degrees of freedom (DoF) indices affected by this constraint on a specific actor.
virtual void SetTargetPosition(Real3 const &position, Error &error)=0
Set the constraint's target position in world frame.
virtual ~Constraint()=default
virtual Span< real const > GetLimitMaxValues(Error &error) const =0
Get the constraint's maximum limit values.
virtual real GetSaturation() const =0
Get the constraint's saturation parameter.
virtual void SetTargetDof(real target, Error &error)=0
Set the constraint's target DoF.
virtual DynamicArray< real > GetDeviation() const =0
Compute the constraint's current deviation from its target, limits, or coupling condition.
virtual void SetStiffness(real stiffness, Error &error)=0
Set the constraint's stiffness parameter.
virtual real GetDamping() const =0
Get the constraint's damping parameter.
virtual bool IsQuerySupported(QueryType type) const =0
Check whether a query type is supported for this constraint.
virtual void SetTargetRotation(Quaternion const &rotation, Error &error)=0
Set the constraint's target rotation.
virtual Span< real const > GetForce(Error &error) const =0
Get the force/torque applied by the constraint.
virtual QueryHandle RegisterQuery(QueryType type, Error &error)=0
Register a query to compute data for this constraint.
virtual void SetDamping(real damping, Error &error)=0
Set the constraint's damping parameter.
virtual ConstraintType GetType() const =0
Get the type of the constraint.
virtual void CancelQuery(QueryHandle handle)=0
Cancel a previously registered query.
virtual void SetSaturation(real saturation, Error &error)=0
Set the constraint's saturation parameter.
virtual Actor const * GetActor(int actorIndex) const =0
Get read-only access to one of the actors affected by this constraint.
virtual int GetNumActors() const =0
Get the number of actors affected by the constraint.
virtual ConstraintHandle GetHandle() const =0
Get the handle associated with this constraint.
virtual Span< real const > GetLimitMinValues(Error &error) const =0
Get the constraint's minimum limit values.
virtual void UpdateOldTarget(Error &error)=0
Update the old target to match the current target.
virtual Actor * GetActor(int actorIndex)=0
Get one of the actors affected by this constraint.
A dynamically resizable array with syntax and behavior similar to std::pmr::vector.
ConstraintType
Type of constraint acting on actors' degrees of freedom.
QueryType
Type of query data to compute for an actor or constraint.
Unique identifier for a Constraint within a Scene.
Unique identifier for a query within a Scene.