#define AGXPHYSICS_EXPORT
Constraint attachment pair class.
Constraint solver callback interface with context and start rows for context.
Elementary constraint base class with interface and global constraint functionality.
Constraint body data used with GenericElementaryConstraint containing the per body Jacobian data.
Constraint data used with GenericElementaryConstraint containing data such as; constraint violation,...
Generic elementary constraint with minimal amount of user callbacks to reduce development/prototype t...
agx::UInt getJacobian(agx::Jacobian6DOFElement *G, agx::UInt numBlocks, agx::UInt row, agx::GWriteState::Enum writeState) override
Returns the Jacobian of this elementary constraint.
void fetchData()
Performing callbacks and collecting data in serial.
virtual ~GenericElementaryConstraint()
GenericElementaryConstraint(agx::UInt numRows)
Construct given the number of rows in this elementary constraint.
void setEnableMultiTangentNlCallback(agx::Bool enable, agx::Real primaryFrictionCoefficient, agx::Real secondaryFrictionCoefficient, const agx::Vec3 &contactPointPosition)
agx::Bool isActive() const override
An elementary constraint is defined to be active if enabled.
agx::ConstraintNlmcpCallback * getNlCallback() const override
agx::UInt getVelocity(agx::Real *v, agx::UInt row) const override
Returns the velocity of this elementary constraint (extra, driving term on the right hand side).
virtual agx::Bool onPrepare()
Callback when the elementary constraints in the constraint receives the prepare call.
agx::Bool getEnableMultiTangentNlCallback() const
virtual void onWriteData(agx::GenericConstraintBodyData *rb1Data, agx::GenericConstraintBodyData *rb2Data, agx::GenericConstraintData *constraintData)
Callback when to write Jacobian and constraint data if this elementary constraint is active.
void prepare() override
Prepare call.
const agx::AttachmentPair * getAttachmentPair() const
agx::Bool isImpacting() const override
GenericElementaryConstraint(agx::UInt numRows, agx::Bool enable)
Construct given the number of rows in this elementary constraint and default enable flag.
void setAttachmentPair(const agx::AttachmentPair *ap) override
Call for elementary constraints dependent on attachment pairs.
agx::UInt getViolation(agx::Real *g, agx::UInt row) override
Returns the violation of this elementary constraint.
agx::UInt getBounds(agx::RangeReal *bounds, agx::UInt row, agx::Real h) const override
Returns the bounds of the Lagrange Multipliers (default (-inf, +inf)).
Smart pointer for handling referenced counted objects.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.