|
AGXDynamics
2.31.1.0
|
Constraint implementation for constraining a number of physical dimensions of the same type. More...
#include <PowerLineConstraints.h>
Inheritance diagram for agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation:Public Types | |
| enum | Tags { NONE = 0, MANY_BODY = (1<<0), DEFAULT_BINARY_TAG = NONE, DEFAULT_MANY_BODY_TAG = MANY_BODY } |
Public Member Functions | |
| PhysicalDimensionMultiBodyConstraintImplementation () | |
| Constructor. More... | |
| ~PhysicalDimensionMultiBodyConstraintImplementation () | |
| void | add (PhysicalDimension *dimension) |
| Add a physical dimension to the constraint. More... | |
| virtual bool | addElementaryConstraint (const agx::String &name, agx::ElementaryConstraint *elementaryConstraint) |
| Add elementary constraint (like Spherical, Dot1, Dot2 etc) given name. More... | |
| virtual void | addNlCallbacks (agx::SparseRangeReal &sparseRangeReal) const |
| Interface for non-linear callback from solver. More... | |
| virtual void | addNotification () |
| Callback when this constraint is added to Simulation. More... | |
| virtual bool | addSecondaryConstraint (const agx::String &name, agx::ElementaryConstraint *secondaryConstraint) |
| Add secondary constraint (like motor, range and/or lock etc) given name. More... | |
| agx::UInt | calculateNumActiveRows () const |
| Calculates the current number of active rows, including both elementary and secondary constraints. More... | |
| agx::Real | calculateViolationVectorAverageSize () |
| Gets the average size of the elements in getViolation() by calculating the magnitude and dividing by the number of elements. More... | |
| template<typename T > | |
| T * | findSecondaryConstraintGivenType (const agx::UInt count=0) const |
| bool | getActive () const |
| virtual agx::Real | getAngle (agx::UInt=0) const |
| If the constraint supports angle calculations and 'dof' is in range, this method returns the angle of the given degree of freedom. More... | |
| virtual agx::AttachmentPair * | getAttachmentPair () const |
| agx::UInt | getBlockRowIndex () const |
| const BlockStructure & | getBlockStructure () const |
| virtual void | getBounds (agx::RangeReal *bounds, agx::Real dt) const |
| Calculates and pushes the bounds into a sparse range data structure. More... | |
| const char * | getClassName () const override |
| agx::Real | getCompliance () const |
| virtual int | getConstraintVelocity (agx::Real *v, int row) |
| Calculates and pushes the constraint velocities into array given current row. More... | |
| agx::Real | getCurrentForce () const |
| virtual agx::Real | getCurrentSpeed (agx::UInt=0) const |
| If this method is implemented, a call to this method will return the current speed of the angle. More... | |
| ElementaryPhysicalDimensionConstraint * | getElementaryConstraint () const |
| virtual agx::ElementaryConstraint * | getElementaryConstraint (const agx::UInt index) const |
| virtual agx::ElementaryConstraint * | getElementaryConstraint (const agx::String &name) const |
| agx::ElementaryConstraint::RefContainer & | getElementaryConstraints () |
| const agx::ElementaryConstraint::RefContainer & | getElementaryConstraints () const |
| virtual bool | getEnable () const |
| virtual agx::Bool | getEnableComputeForces () const |
| bool | getEnableLinearization () const |
| bool | getEnableSerialization () const |
| bool | getEnableUuidGeneration () |
| virtual void | getEpsilon (agx::Real *epsilon, agx::Real h) |
Writes regularization parameters for all active rows into epsilon. More... | |
| agx::FrictionController * | getFrictionController (agx::UInt number=0) const |
| agx::UInt32 | getIndex () const |
| This index is given at creation of this object. More... | |
| agx::UInt | getJacobianRowUsage () const |
| virtual agx::Bool | getLastForce (agx::UInt bodyIndex, agx::Vec3 &retForce, agx::Vec3 &retTorque, agx::Bool giveForceAtCm=false) const |
If 'compute forces' is enabled, returns the last force and torque applied by this constraint on the body with bodyIndex. More... | |
| virtual agx::Bool | getLastForce (const agx::RigidBody *rb, agx::Vec3 &retForce, agx::Vec3 &retTorque, agx::Bool giveForceAtCm=false) const |
If 'compute forces' is enabled, returns the last force and torque applied by this constraint on the body rb. More... | |
| virtual agx::Bool | getLastLocalForce (agx::UInt bodyIndex, agx::Vec3 &retForce, agx::Vec3 &retTorque, agx::Bool giveForceAtCm=false) const |
If 'compute forces' is enabled, returns the last force and torque applied by this constraint on the body with bodyIndex. More... | |
| virtual agx::Bool | getLastLocalForce (const agx::RigidBody *rb, agx::Vec3 &retForce, agx::Vec3 &retTorque, agx::Bool giveForceAtCm=false) const |
If 'compute forces' is enabled, returns the last force and torque applied by this constraint on the body rb. More... | |
| agx::Lock1D * | getLock1D (agx::UInt number=0) const |
| agx::Motor1D * | getMotor1D (agx::UInt number=0) const |
| virtual void | getParameters (agx::Real *violation, agx::Real *epsilon, agx::Real *damping, bool *holonomic, agx::Real *velocity, agx::RangeReal *bounds, int8_t *indexSetState, agx::Real h, agx::Real minPerturbation=agx::Real(1E-10)) |
| Writes solver parameters such as damping and holonomic. More... | |
| agx::Range1D * | getRange1D (agx::UInt number=0) const |
| virtual agx::ElementaryConstraint * | getSecondaryConstraint (const agx::UInt index) const |
| virtual agx::ElementaryConstraint * | getSecondaryConstraint (const agx::String &name) const |
| agx::ElementaryConstraint::RefContainer & | getSecondaryConstraints () |
| const agx::ElementaryConstraint::RefContainer & | getSecondaryConstraints () const |
| bool | getSolveBoth () const |
| bool | getSolveIterative () const |
| SolverBodyView | getSolverView () const |
| Bodies as viewed from the solver. More... | |
| Constraint::SolveType | getSolveType () const |
| agxStream::StorageAgent * | getStorageAgent () const override |
| ConstraintImplPtrVector & | getSubConstraints () |
| const ConstraintImplPtrVector & | getSubConstraints () const |
| int | getTag () const |
| BodyView | getUserView () const |
| Bodies as viewed from the user. More... | |
| agx::Uuid | getUuid () const |
| virtual int | getViolation (agx::Real *g, int row) |
| Calculates and pushes the constraint values into array given current row. More... | |
| void | incrementConstraintCount (RigidBody *rb) const |
Increment the number of constraints connection to rb. More... | |
| bool | isFinished () const |
| bool | isImpacting () const |
| bool | isValid () const |
| void | onDirectComplianceMatrix (Real *data, unsigned int ld) const |
| Internal callback from the direct solver with perturbation matrix data. More... | |
| virtual void | postSolveCallback (const agx::Jacobian6DOFElement *jacobians, const agx::Real *solution, agx::Real dt) |
| Peak at the solution after the solver is done. More... | |
| void | postSolveIndexSetCallback (const int8_t *state) |
| Callback after the solver is done about the state of each equation in the constraint. More... | |
| virtual void | postSystemCallback (agx::DynamicsSystem *system) override |
| Prepare system after solve. More... | |
| virtual void | prepare () |
| Prepares this constraint. More... | |
| virtual void | prepareDimensions () |
| virtual void | preSystemCallback (agx::DynamicsSystem *system) override |
| Prepare system before solve. More... | |
| virtual bool | rebind () |
| The general version of rebind takes the first attachment frame and moves the other attachment frame so they have the exact same world transform. More... | |
| virtual bool | removeElementaryConstraint (agx::ElementaryConstraint *elementaryConstraint) |
| Remove elementary constraint. More... | |
| virtual bool | removeElementaryConstraint (const agx::String &name) |
| Remove elementary constraint. More... | |
| virtual void | removeNotification () |
| Callback when this constraint is removed from Simulation. More... | |
| virtual bool | removeSecondaryConstraint (agx::ElementaryConstraint *secondaryConstraint) |
| Remove secondary constraint. More... | |
| virtual bool | removeSecondaryConstraint (const agx::String &name) |
| Remove secondary constraint. More... | |
| void | reset () |
| Reset the solution vectors of the primary and secondary elementary constraints in the implementation. More... | |
| virtual void | restore (agxStream::InputArchive &in) override |
| virtual void | restoreLightData (agxStream::StorageStream &str) override |
| void | setBlockRowIndex (agx::UInt blockRowIndex) |
| Sets the global start index for this constraint in the global, non-permuted matrix. More... | |
| void | setCompliance (agx::Real compliance) |
| Set the compliance of the constraint. More... | |
| void | setConnector (agxPowerLine::Connector *connector) |
| virtual void | setEnable (bool enable) |
| Sets the enable flag. More... | |
| virtual void | setEnableComputeForces (agx::Bool enable) |
| Enable (or disable) computation of the forces applied to the dynamic bodies in this constraint. More... | |
| void | setEnableLinearization (bool enable) |
| Control whether or not linearization should be performed on the ElementaryConstraints that require it, such as QuatLock. More... | |
| void | setEnableSerialization (bool flag) |
| Set to false to disable serialization of this object. More... | |
| void | setFinished () |
| Tells this class that it is restored correctly and should not be deleted during destruction of an Archive. More... | |
| void | setSolveType (Constraint::SolveType type) |
| Set solve type, either DIRECT, ITERATIVE or DIRECT_AND_ITERATIVE. More... | |
| void | setUuid (const agx::Uuid &uuid) |
| Explicitly set a Uuid on a serializable object. More... | |
| void | sort () |
| This method will sort this constraint by global indexing of the bodies. More... | |
| virtual void | store (agxStream::OutputArchive &out) const override |
| virtual void | storeLightData (agxStream::StorageStream &str) const override |
| virtual CALLABLE_IGNORE void | updateComplianceMatrix (LSquareComplianceMatrix matrix) const |
| Callback with read/write access to the compliance matrix of this constraint in the direct solver. More... | |
| virtual size_t | updateJacobian (agx::Jacobian6DOFElement *jacobians) override |
| Update the jacobians of the included dimensions. More... | |
| virtual bool | updateValid () override |
| Test if the constraint is still valid. More... | |
| virtual agx::Attachment * | userAPIgetAttachment (const agx::RigidBody *) const |
| virtual agx::Attachment * | userAPIgetAttachment (agx::UInt) const |
| agx::Real | userAPIgetCompliance (agx::UInt dof) const |
| agx::Real | userAPIgetCurrentForce (agx::UInt dof) const |
Consider using getLastForce instead. More... | |
| agx::Real | userAPIgetDamping (agx::UInt dof) const |
| agx::RangeReal | userAPIgetForceRange (agx::UInt dof) const |
Get the force range for DOF dof. More... | |
| agx::RegularizationParameters * | userAPIgetRegularizationParameters (agx::UInt i) |
| Get the regularization parameter i, i.e., the regularization parameter for equation i which is constraint dependent. More... | |
| const agx::RegularizationParameters * | userAPIgetRegularizationParameters (agx::UInt i) const |
| void | userAPIsetCompliance (agx::Real compliance, int dof) |
| Set the compliance for constraint row i of this constraint. More... | |
| void | userAPIsetDamping (agx::Real damping, int dof) |
| Set the damping for constraint row i of this constraint. More... | |
| void | userAPIsetForceRange (agx::RangeReal forceRange, agx::Int dof) |
| Assign force range, of an elementary constraint, for a given DOF. More... | |
Static Public Member Functions | |
| static agxStream::Serializable * | create () |
| static agxStream::Serializable * | create (agxStream::InputArchive &) |
| static const char * | getConstructClassId () |
| static void | setEnableUuidGeneration (bool flag) |
| Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled. More... | |
Public Attributes | |
| void * | customData |
| Custom data for the solvers to store data into. More... | |
Protected Types | |
| using | LocalState = agx::BitState< State, Int32 > |
| enum | State : Int32 { VALID = 1 << 0, IMPACTING = 1 << 1, SUPPORTS_COMPLIANCE_MATRIX = 1 << 2 } |
Protected Member Functions | |
| PhysicalDimensionMultiBodyConstraintImplementation (ElementaryPhysicalDimensionConstraint *elementaryConstraint) | |
| void | generateUuid () |
| void | initialize () |
| void | setSimulation (agxSDK::Simulation *simulation) |
| Set the Simulation this constraint belongs to. More... | |
| void | setSupportsComplianceMatrix (Bool supportsComplianceMatrix) |
| Enable/disable compliance matrix callbacks from the direct solver where read/write access to the compliance matrix will be available in an implementation of updateComplianceMatrix. More... | |
Protected Attributes | |
| UInt | m_blockRowIndex |
| Start block row for this constraint in the global matrix. More... | |
| BlockStructure | m_blockStructure |
| The block structure; number of block, rows, dynamic blocks etc. More... | |
| ConstraintRigidBodyContainer | m_bodies |
| Vector with observer pointers to bodies. More... | |
| RigidBodyPtrIntHashVector | m_bodyToIndexTable |
| ConstrainedBodiesState | m_constrainedBodiesState |
| State of the included bodies, updated in updateValid. More... | |
| PhysicalDimensionPtrIntTable | m_dimensionToIndexTable |
| ElementaryConstraint::RefContainer | m_ec |
| Vector of elementary constraints. More... | |
| ElementaryPhysicalDimensionConstraint * | m_elementaryConstraint |
| bool | m_enable |
| User controlled enable flag, constraint ignored by solver if false. More... | |
| bool | m_enableLinearization |
| When necessary, tweak the values sent to the solver to make violation depend linearly on force or torque. More... | |
| size_t | m_indexCounter |
| LocalState | m_localState |
| Current local state, updated all the time, not serialized. More... | |
| UInt | m_numRows |
| Number of rows used by this constraint. More... | |
| agx::Vector< agx::observer_ptr< agx::RigidBody > > | m_observedBodies |
| ElementaryConstraint::RefContainer | m_sc |
| Vector of secondary constraints. More... | |
| Constraint::SolveType | m_solveType |
| Only for supported solvers. More... | |
| ConstraintImplPtrVector | m_subConstraints |
| Vector with sub-constraints. More... | |
| int | m_tag |
| Tag for this constraint. More... | |
Constraint implementation for constraining a number of physical dimensions of the same type.
Definition at line 150 of file PowerLineConstraints.h.
|
protectedinherited |
Definition at line 985 of file ConstraintImplementation.h.
|
protectedinherited |
| Enumerator | |
|---|---|
| VALID | |
| IMPACTING | |
| SUPPORTS_COMPLIANCE_MATRIX | |
Definition at line 977 of file ConstraintImplementation.h.
|
inherited |
| Enumerator | |
|---|---|
| NONE | |
| MANY_BODY | Default is binary, i.e., ~MANY_BODY. |
| DEFAULT_BINARY_TAG | |
| DEFAULT_MANY_BODY_TAG | |
Definition at line 102 of file ConstraintImplementation.h.
| agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation::PhysicalDimensionMultiBodyConstraintImplementation | ( | ) |
Constructor.
| agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation::~PhysicalDimensionMultiBodyConstraintImplementation | ( | ) |
|
protected |
| void agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation::add | ( | PhysicalDimension * | dimension | ) |
Add a physical dimension to the constraint.
|
virtualinherited |
Add elementary constraint (like Spherical, Dot1, Dot2 etc) given name.
General for elementary constraints is that their input is based on body relative data (far from general).
|
virtualinherited |
Interface for non-linear callback from solver.
Reimplemented in agx::HighLevelConstraintImplementation.
|
inlinevirtualinherited |
Callback when this constraint is added to Simulation.
Definition at line 574 of file ConstraintImplementation.h.
|
virtualinherited |
Add secondary constraint (like motor, range and/or lock etc) given name.
General for secondary constraints is that their input is based on the current constraint angle.
|
inherited |
Calculates the current number of active rows, including both elementary and secondary constraints.
The result can be used to allocate temporary buffers for additional calls to solver related methods, e.g., getViolation.
|
inherited |
Gets the average size of the elements in getViolation() by calculating the magnitude and dividing by the number of elements.
|
inlinestatic |
Definition at line 215 of file PowerLineConstraints.h.
|
inlinestatic |
Definition at line 215 of file PowerLineConstraints.h.
|
inlineinherited |
count occurrences (of that type) Definition at line 1380 of file ConstraintImplementation.h.
References agx::ConstraintImplementation::m_sc, and agx::Container::size().
|
protectedinherited |
|
inlineinherited |
Definition at line 633 of file ConstraintImplementation.h.
|
inlinevirtualinherited |
If the constraint supports angle calculations and 'dof' is in range, this method returns the angle of the given degree of freedom.
Reimplemented in agx::HighLevelConstraintImplementation.
Definition at line 865 of file ConstraintImplementation.h.
|
inlinevirtualinherited |
Reimplemented in agx::HighLevelConstraintImplementation.
Definition at line 765 of file ConstraintImplementation.h.
|
inlineinherited |
Definition at line 522 of file ConstraintImplementation.h.
|
inlineinherited |
Definition at line 511 of file ConstraintImplementation.h.
|
virtualinherited |
Calculates and pushes the bounds into a sparse range data structure.
Every equation in this constraint that has a bound must during this call push its bounds at its current global row (row + localRow). The bounds is not a force, rather an impulse (dimension force*time).
| bounds | - all bounds, use bounds.push_back( IndexedRangeReal( std::make_pair( row + localRow, RangeReal( myLowerBound, myUpperBound ) ) ) ) |
| dt | - time step, often used to scale forces to impulses |
|
inlineoverridevirtual |
Reimplemented from agxStream::Serializable.
Reimplemented in agxPowerLine::TranslationalConstraintImplementation, and agxPowerLine::GearConstraintImplementation.
Definition at line 215 of file PowerLineConstraints.h.
| agx::Real agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation::getCompliance | ( | ) | const |
|
virtualinherited |
Calculates and pushes the constraint velocities into array given current row.
Constraint velocity is mainly used for non-holonomic constraint such as hinge- and prismatic motors.
| v | - array of constraint velocity values, must at least be of size row + numRowsThisConstraintUses |
| row | - row to start push values (v[row] = firstConstraintValue) |
|
inlinestatic |
Definition at line 215 of file PowerLineConstraints.h.
| agx::Real agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation::getCurrentForce | ( | ) | const |
|
inlinevirtualinherited |
If this method is implemented, a call to this method will return the current speed of the angle.
This is only valid for 1DOF and 2DOF constraints (such as hinge, prismatic, distance and cylindrical).
Definition at line 872 of file ConstraintImplementation.h.
References AGX_FORCE_INLINE, DOXYGEN_END_INTERNAL_BLOCK, and DOXYGEN_START_INTERNAL_BLOCK.
| ElementaryPhysicalDimensionConstraint* agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation::getElementaryConstraint | ( | ) | const |
|
virtualinherited |
| index | - index of the elementary constraint |
|
virtualinherited |
| name | - name of the elementary constraint |
|
inlineinherited |
Definition at line 590 of file ConstraintImplementation.h.
|
inlineinherited |
Definition at line 591 of file ConstraintImplementation.h.
|
inlinevirtualinherited |
Definition at line 622 of file ConstraintImplementation.h.
|
virtualinherited |
Reimplemented in agx::HighLevelConstraintImplementation.
|
inherited |
|
inherited |
Definition at line 273 of file Serializable.h.
|
inherited |
|
virtualinherited |
Writes regularization parameters for all active rows into epsilon.
| epsilon | - array to write into (number of active rows allocated) |
| h | - current time step |
|
inherited |
|
inherited |
This index is given at creation of this object.
It is guaranteed to be unique for the lifetime of this library instance. As long as the application is running. This value is not serialized or restored. A new object will always get a new index no matter how it is created.
Definition at line 247 of file Serializable.h.
|
inlineinherited |
Definition at line 506 of file ConstraintImplementation.h.
|
virtualinherited |
If 'compute forces' is enabled, returns the last force and torque applied by this constraint on the body with bodyIndex.
The force is given in world coordinates and is the one applied at the anchor position of this constraint.
The result includes force and torque from this constraint including all enabled controllers (e.g., motors, locks, ranges).
| bodyIndex | - index of body, if number of bodies = 1 and bodyIndex = 1, the force and torque applied to "the world body" is returned |
| retForce | - the force applied by this constraint on body at bodyIndex last solve |
| retTorque | - the torque applied by this constraint on body at bodyIndex last solve |
| giveForceAtCm | - this parameter affects the resulting torque. The default behavior (giveForceAtCm = false) calculates the force applied by this constraint at the anchor position. Letting giveForceAtCm = true, the force will be applied at center of mass, affecting the torque as \(T_{new} = T - r \times F\) where r is the vector from the anchor point to the center of mass of the body. |
retForce and retTorque - otherwise false Reimplemented in agx::HighLevelConstraintImplementation.
|
virtualinherited |
If 'compute forces' is enabled, returns the last force and torque applied by this constraint on the body rb.
The force is given in world coordinates and is the one applied at the anchor position of this constraint.
The result includes force and torque from this constraint including all enabled controllers (e.g., motors, locks, ranges).
| rb | - body in this constraint. If this constraint is attached in world, nullptr can be used. |
| retForce | - the force applied by this constraint on body rb at the last solve |
| retTorque | - the torque applied by this constraint on body rb at the last solve |
| giveForceAtCm | - this parameter affects the resulting torque. The default behavior (giveForceAtCm = false) calculates the force applied by this constraint at the anchor position. Letting giveForceAtCm = true, the force will be applied at center of mass, affecting the torque as \(T_{new} = T - r \times F\) where r is the vector from the anchor point to the center of mass of the body. |
retForce and retTorque - otherwise false Reimplemented in agx::HighLevelConstraintImplementation.
|
virtualinherited |
If 'compute forces' is enabled, returns the last force and torque applied by this constraint on the body with bodyIndex.
The force is given in the frame of the constraint.
The result includes force and torque from this constraint including all enabled controllers (e.g., motors, locks, ranges).
| bodyIndex | - index of body, if number of bodies = 1 and bodyIndex = 1, the force and torque applied to "the world body" is returned |
| retForce | - the force applied by this constraint on body at bodyIndex last solve |
| retTorque | - the torque applied by this constraint on body at bodyIndex last solve |
| giveForceAtCm | - this parameter affects the resulting torque. The default behavior (giveForceAtCm = false) calculates the force applied by this constraint at the anchor position. Letting giveForceAtCm = true, the force will be applied at center of mass, affecting the torque as \(T_{new} = T - r \times F\) where r is the vector from the anchor point to the center of mass of the body. |
retForce and retTorque - otherwise false Reimplemented in agx::HighLevelConstraintImplementation.
|
virtualinherited |
If 'compute forces' is enabled, returns the last force and torque applied by this constraint on the body rb.
The force is given in the frame of the constraint.
The result includes force and torque from this constraint including all enabled controllers (e.g., motors, locks, ranges).
| rb | - body in this constraint. If this constraint is attached in world, nullptr can be used. |
| retForce | - the force applied by this constraint on body rb at the last solve |
| retTorque | - the torque applied by this constraint on body rb at the last solve |
| giveForceAtCm | - this parameter affects the resulting torque. The default behavior (giveForceAtCm = false) calculates the force applied by this constraint at the anchor position. Letting giveForceAtCm = true, the force will be applied at center of mass, affecting the torque as \(T_{new} = T - r \times F\) where r is the vector from the anchor point to the center of mass of the body. |
retForce and retTorque - otherwise false Reimplemented in agx::HighLevelConstraintImplementation.
|
inherited |
|
inherited |
|
virtualinherited |
Writes solver parameters such as damping and holonomic.
This should be deprecated.
|
inherited |
|
virtualinherited |
| index | - index of the secondary constraint |
|
virtualinherited |
| name | - name of the elementary constraint |
|
inlineinherited |
Definition at line 596 of file ConstraintImplementation.h.
|
inlineinherited |
Definition at line 597 of file ConstraintImplementation.h.
|
inlineinherited |
Definition at line 533 of file ConstraintImplementation.h.
References agx::Constraint::DIRECT_AND_ITERATIVE.
|
inlineinherited |
Definition at line 528 of file ConstraintImplementation.h.
References agx::Constraint::ITERATIVE.
|
inherited |
Bodies as viewed from the solver.
It's only valid to use this interface if you're a solver.
|
inlineinherited |
Definition at line 543 of file ConstraintImplementation.h.
|
inlineoverridevirtual |
Implements agxStream::Serializable.
Reimplemented in agxPowerLine::TranslationalConstraintImplementation, and agxPowerLine::GearConstraintImplementation.
Definition at line 215 of file PowerLineConstraints.h.
|
inlineinherited |
Definition at line 602 of file ConstraintImplementation.h.
|
inlineinherited |
Definition at line 603 of file ConstraintImplementation.h.
|
inlineinherited |
Definition at line 559 of file ConstraintImplementation.h.
|
inherited |
Bodies as viewed from the user.
This is the default way to look at the bodies.
|
inherited |
Definition at line 268 of file Serializable.h.
Referenced by agxSDK::UuidHashCollisionFilter::match().
|
virtualinherited |
Calculates and pushes the constraint values into array given current row.
| g | - array of constraint values, must at least be of size row + numRowsThisConstraintUses |
| row | - row to start push values (g[row] = firstConstraintValue) |
|
inlineinherited |
Increment the number of constraints connection to rb.
| rb | - rigid body to increment the constraint count |
Definition at line 554 of file ConstraintImplementation.h.
References agxAssert.
|
protected |
|
inherited |
Definition at line 252 of file Serializable.h.
References AGX_FORCE_INLINE.
|
inlineinherited |
Definition at line 548 of file ConstraintImplementation.h.
|
inlineinherited |
Definition at line 638 of file ConstraintImplementation.h.
|
inherited |
Internal callback from the direct solver with perturbation matrix data.
|
virtualinherited |
Peak at the solution after the solver is done.
| jacobians | - Jacobian rows for this constraint (index 0 is first dynamic body first row) |
| solution | - solution (impulse - divide by dt to get force) |
| dt | - time step size used to get solution |
Reimplemented in agx::HighLevelConstraintImplementation.
|
inherited |
Callback after the solver is done about the state of each equation in the constraint.
The information is if an equation was at a upper or lower bound or free.
|
overridevirtual |
Prepare system after solve.
Reimplemented from agx::ConstraintImplementation.
|
virtualinherited |
Prepares this constraint.
Update attachment transforms given the current transforms of the bodies (in most cases equivalent to calculate the Jacobian), compute the joint angles (if this constraint supports that) and calculates the amount of data needed.
Reimplemented in agx::HighLevelConstraintImplementation, and agxPowerLine::ActuatorConstraintImplementation.
|
virtual |
|
overridevirtual |
Prepare system before solve.
Reimplemented from agx::ConstraintImplementation.
|
inlinevirtualinherited |
The general version of rebind takes the first attachment frame and moves the other attachment frame so they have the exact same world transform.
This means that the first rigid body is the reference (other is another rigid body or world). E.g., Prismatic and Hinge axis will be preserved seen from the reference body.
Reimplemented in agx::HighLevelConstraintImplementation.
Definition at line 616 of file ConstraintImplementation.h.
|
virtualinherited |
Remove elementary constraint.
| elementaryConstraint | - elementary constraint to remove |
|
virtualinherited |
Remove elementary constraint.
| name | - name of the elementary constraint to remove |
|
inlinevirtualinherited |
Callback when this constraint is removed from Simulation.
Definition at line 579 of file ConstraintImplementation.h.
|
virtualinherited |
Remove secondary constraint.
| secondaryConstraint | - secondary constraint to remove |
|
virtualinherited |
Remove secondary constraint.
| name | - name of the secondary constraint to remove |
|
inherited |
Reset the solution vectors of the primary and secondary elementary constraints in the implementation.
|
overridevirtual |
|
overridevirtual |
Sets the global start index for this constraint in the global, non-permuted matrix.
| blockRowIndex | - global start row for this constraint in the global, non-permuted matrix |
Definition at line 517 of file ConstraintImplementation.h.
| void agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation::setCompliance | ( | agx::Real | compliance | ) |
Set the compliance of the constraint.
| void agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation::setConnector | ( | agxPowerLine::Connector * | connector | ) |
|
virtualinherited |
Sets the enable flag.
If this flags sets to false the solver will ignore this constraint.
| enable | - set to true if this constraint should be enabled, false to disable it |
|
virtualinherited |
Enable (or disable) computation of the forces applied to the dynamic bodies in this constraint.
Matrix-vector operation to compute the forces after solve.
| enable | - true to enable, false to disable |
Reimplemented in agx::HighLevelConstraintImplementation.
|
inherited |
Control whether or not linearization should be performed on the ElementaryConstraints that require it, such as QuatLock.
|
inherited |
Set to false to disable serialization of this object.
It will just be ignored during serialization (writing). It is still possible to restore TO this object.
|
staticinherited |
Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled.
|
inherited |
Tells this class that it is restored correctly and should not be deleted during destruction of an Archive.
|
protectedinherited |
Set the Simulation this constraint belongs to.
| simulation | - the Simulation this constraint belongs to |
|
inlineinherited |
Set solve type, either DIRECT, ITERATIVE or DIRECT_AND_ITERATIVE.
Definition at line 538 of file ConstraintImplementation.h.
|
protectedinherited |
Enable/disable compliance matrix callbacks from the direct solver where read/write access to the compliance matrix will be available in an implementation of updateComplianceMatrix.
| supportsComplianceMatrix | - true to enable access, false to disable (Default: Disabled). |
Explicitly set a Uuid on a serializable object.
Use this method with great care, as it can result in non-unique identifiers in the system!
|
inherited |
This method will sort this constraint by global indexing of the bodies.
It creates a permutation vector (i.e., it doesn't reorder the bodies nor the indices) so that one can index m_bodies and m_indices via the permutation.
|
overridevirtual |
|
overridevirtual |
|
virtualinherited |
Callback with read/write access to the compliance matrix of this constraint in the direct solver.
The lower triangle is accessible and will be used, all entries must be less than or equal to zero. The diagonal has already been written with (negative) regularization parameters of each row of this constraint.
| matrix | - compliance matrix |
|
overridevirtual |
Update the jacobians of the included dimensions.
Reimplemented from agx::ConstraintImplementation.
|
overridevirtual |
Test if the constraint is still valid.
Reimplemented from agx::ConstraintImplementation.
Reimplemented in agxPowerLine::ActuatorConstraintImplementation.
|
inlinevirtualinherited |
Reimplemented in agx::HighLevelConstraintImplementation.
Definition at line 755 of file ConstraintImplementation.h.
|
inlinevirtualinherited |
Reimplemented in agx::HighLevelConstraintImplementation.
Definition at line 760 of file ConstraintImplementation.h.
Consider using getLastForce instead.
This method returns the magnitude of the force in a given degree of freedom (DOF). Enabled controllers in the given DOF will NOT be included, agx::ElementaryConstraint::getCurrentForce has to be used for that.
|
inherited |
Get the force range for DOF dof.
| dof | - index of the requested DOF |
|
inherited |
Get the regularization parameter i, i.e., the regularization parameter for equation i which is constraint dependent.
| i | - corresponds to the i'th constraint row of this constraint |
|
inherited |
|
inherited |
Set the compliance for constraint row i of this constraint.
| compliance | - compliance |
| dof | - corresponds to the i'th constraint row of this constraint |
Set the damping for constraint row i of this constraint.
| damping | - damping |
| dof | - corresponds to the i'th constraint row of this constraint |
|
inherited |
Assign force range, of an elementary constraint, for a given DOF.
| forceRange | - value of force range for the given DOF |
| dof | - index of the DOF (-1 indicates all) |
|
inherited |
Custom data for the solvers to store data into.
Definition at line 562 of file ConstraintImplementation.h.
|
protectedinherited |
Start block row for this constraint in the global matrix.
Definition at line 1012 of file ConstraintImplementation.h.
|
protectedinherited |
The block structure; number of block, rows, dynamic blocks etc.
Definition at line 1011 of file ConstraintImplementation.h.
|
protectedinherited |
Vector with observer pointers to bodies.
Definition at line 1007 of file ConstraintImplementation.h.
|
protected |
Definition at line 225 of file PowerLineConstraints.h.
|
protectedinherited |
State of the included bodies, updated in updateValid.
Definition at line 1008 of file ConstraintImplementation.h.
|
protected |
Definition at line 227 of file PowerLineConstraints.h.
|
protectedinherited |
Vector of elementary constraints.
Definition at line 1004 of file ConstraintImplementation.h.
|
protected |
Definition at line 224 of file PowerLineConstraints.h.
|
protectedinherited |
User controlled enable flag, constraint ignored by solver if false.
Definition at line 1022 of file ConstraintImplementation.h.
|
protectedinherited |
When necessary, tweak the values sent to the solver to make violation depend linearly on force or torque.
Definition at line 1023 of file ConstraintImplementation.h.
|
protected |
Definition at line 228 of file PowerLineConstraints.h.
|
protectedinherited |
Current local state, updated all the time, not serialized.
Definition at line 1024 of file ConstraintImplementation.h.
|
protectedinherited |
Number of rows used by this constraint.
Definition at line 1010 of file ConstraintImplementation.h.
|
protected |
Definition at line 226 of file PowerLineConstraints.h.
|
protectedinherited |
Vector of secondary constraints.
Definition at line 1005 of file ConstraintImplementation.h.
Referenced by agx::ConstraintImplementation::findSecondaryConstraintGivenType().
|
protectedinherited |
Only for supported solvers.
Default: DIRECT. agxData::Values: DIRECT, ITERATIVE or DIRECT_AND_ITERATIVE.
Definition at line 1021 of file ConstraintImplementation.h.
|
mutableprotectedinherited |
Vector with sub-constraints.
Definition at line 1009 of file ConstraintImplementation.h.
|
protectedinherited |
Tag for this constraint.
Default tag is either BINARY or MANY_BODY.
Definition at line 1013 of file ConstraintImplementation.h.