AGXDynamics  2.31.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
agx::HighLevelConstraintImplementation Class Referenceabstract

#include <ConstraintImplementation.h>

+ Inheritance diagram for agx::HighLevelConstraintImplementation:

Public Types

typedef agx::Bool(* CreateElementaryConstraintsFunction )(HighLevelConstraintImplementation *)
 
enum  Tags { NONE = 0, MANY_BODY = (1<<0), DEFAULT_BINARY_TAG = NONE, DEFAULT_MANY_BODY_TAG = MANY_BODY }
 

Public Member Functions

 HighLevelConstraintImplementation ()
 
virtual ~HighLevelConstraintImplementation ()
 
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 override
 Adds nl-callbacks for active non-linear controllers. 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...
 
 AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE (agx::HighLevelConstraintImplementation)
 
bool bodiesValid () const
 
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...
 
virtual void computeForces (const agx::Jacobian6DOFElement *jacobians)
 Computes the forces, if valid and enabled. More...
 
virtual agx::Bool computeForces (const agx::Jacobian6DOFElement *jacobians, agx::Vec3Vector &result) const
 Computes forces on rb1 and rb2 given this constraint has been solved and all the elementary constraints have their current force updated. More...
 
bool construct (RigidBody *rb1, Frame *rb1AttachmentFrame, RigidBody *rb2, Frame *rb2AttachmentFrame, CreateElementaryConstraintsFunction=nullptr)
 
template<typename T >
T * findSecondaryConstraintGivenType (const agx::UInt count=0) const
 
bool getActive () const
 
virtual agx::Real getAngle (agx::UInt dof=0) const override
 If the constraint supports angle calculations and 'dof' is in range, this method returns the angle of the given degree of freedom. More...
 
template<typename T >
T * getAttachment (agx::UInt index)
 
template<typename T >
const T * getAttachment (agx::UInt index) const
 
virtual agx::AttachmentPair * getAttachmentPair () const override
 
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...
 
virtual const char * getClassName () const
 
virtual int getConstraintVelocity (agx::Real *v, int row)
 Calculates and pushes the constraint velocities into array given current row. More...
 
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...
 
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 override
 
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 override
 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 RigidBody *rb, Vec3 &retForce, Vec3 &retTorque, agx::Bool giveForceAtCm=false) const override
 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 override
 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 override
 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
 
virtual StorageAgent * getStorageAgent () const =0
 
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) override
 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 (DynamicsSystem *system)
 Last in the dynamics system step forward loop, this constraint gets a call with the main system. More...
 
virtual void prepare () override
 Prepares this constraint. More...
 
virtual void preSystemCallback (DynamicsSystem *system)
 Before prepare, and before the system writes to the data buffers, this constraint gets a call with the main system it's in. More...
 
virtual bool rebind () override
 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...
 
virtual void setEnable (bool enable)
 Sets the enable flag. More...
 
virtual void setEnableComputeForces (agx::Bool enable) override
 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...
 
bool setupOneOrTwoBodySystem (RigidBodyAttachment *a1, RigidBodyAttachment *a2)
 
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
 Updates the Jacobian matrices. More...
 
virtual bool updateValid () override
 Updates the valid conditions for this constraint. More...
 
virtual agx::Attachment * userAPIgetAttachment (const agx::RigidBody *rb) const override
 
virtual agx::Attachment * userAPIgetAttachment (agx::UInt index) const override
 
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...
 
bool validateRigidBodiesAndAttachments (RigidBody *rb1, Frame *rb1AttachmentFrame, RigidBody *rb2, Frame *rb2AttachmentFrame)
 

Static Public Member Functions

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

void generateUuid ()
 
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

AttachmentPair m_attachmentPair
 
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...
 
ConstrainedBodiesState m_constrainedBodiesState
 State of the included bodies, updated in updateValid. More...
 
ElementaryConstraint::RefContainer m_ec
 Vector of elementary constraints. More...
 
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...
 
Vec3Vector m_lastForces
 
LocalState m_localState
 Current local state, updated all the time, not serialized. More...
 
UInt m_numRows
 Number of rows used by this constraint. More...
 
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...
 

Detailed Description

Definition at line 1027 of file ConstraintImplementation.h.

Member Typedef Documentation

typedef agx::Bool(* agx::HighLevelConstraintImplementation::CreateElementaryConstraintsFunction)(HighLevelConstraintImplementation *)

Definition at line 1194 of file ConstraintImplementation.h.

using agx::ConstraintImplementation::LocalState = agx::BitState<State, Int32>
protectedinherited

Definition at line 985 of file ConstraintImplementation.h.

Member Enumeration Documentation

enum agx::ConstraintImplementation::State : Int32
protectedinherited
Enumerator
VALID 
IMPACTING 
SUPPORTS_COMPLIANCE_MATRIX 

Definition at line 977 of file ConstraintImplementation.h.

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.

Constructor & Destructor Documentation

agx::HighLevelConstraintImplementation::HighLevelConstraintImplementation ( )
virtual agx::HighLevelConstraintImplementation::~HighLevelConstraintImplementation ( )
virtual

Member Function Documentation

virtual bool agx::ConstraintImplementation::addElementaryConstraint ( const agx::String &  name,
agx::ElementaryConstraint *  elementaryConstraint 
)
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).

Returns
true if this constraint supports the elementary constraint and the elementary constraint will be used - otherwise false
virtual void agx::HighLevelConstraintImplementation::addNlCallbacks ( agx::SparseRangeReal &  sparseRangeReal) const
overridevirtual

Adds nl-callbacks for active non-linear controllers.

Reimplemented from agx::ConstraintImplementation.

virtual void agx::ConstraintImplementation::addNotification ( )
inlinevirtualinherited

Callback when this constraint is added to Simulation.

Definition at line 574 of file ConstraintImplementation.h.

virtual bool agx::ConstraintImplementation::addSecondaryConstraint ( const agx::String &  name,
agx::ElementaryConstraint *  secondaryConstraint 
)
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.

Returns
true if this constraint supports the secondary constraint and the secondary constraint will be used - otherwise false
agx::HighLevelConstraintImplementation::AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE ( agx::HighLevelConstraintImplementation  )
bool agx::HighLevelConstraintImplementation::bodiesValid ( ) const
Returns
true if one or more bodies are deleted

Definition at line 1414 of file ConstraintImplementation.h.

agx::UInt agx::ConstraintImplementation::calculateNumActiveRows ( ) const
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.

Returns
the (current) total number of active rows in this constraint
agx::Real agx::ConstraintImplementation::calculateViolationVectorAverageSize ( )
inherited

Gets the average size of the elements in getViolation() by calculating the magnitude and dividing by the number of elements.

Returns
the average size of the elements in getViolation()
virtual void agx::HighLevelConstraintImplementation::computeForces ( const agx::Jacobian6DOFElement *  jacobians)
virtual

Computes the forces, if valid and enabled.

Parameters
jacobians- jacobians for this constraint
virtual agx::Bool agx::HighLevelConstraintImplementation::computeForces ( const agx::Jacobian6DOFElement *  jacobians,
agx::Vec3Vector &  result 
) const
virtual

Computes forces on rb1 and rb2 given this constraint has been solved and all the elementary constraints have their current force updated.

The vector result will be of size 3 * numBodies, where the entries are: [forceOnRb1 torqueOnRb1 addedTorqueDueToAnchorPosRb1 forceOnRb2 torqueOnRb2 addedTorqueDueToAnchorPosRb2] Note that the size is 3 if rb2 == nullptr.

Parameters
jacobians- jacobians for this constraint
result- resulting vector with forces
Returns
true if data was written to result - otherwise false
bool agx::HighLevelConstraintImplementation::construct ( RigidBody *  rb1,
Frame *  rb1AttachmentFrame,
RigidBody *  rb2,
Frame *  rb2AttachmentFrame,
CreateElementaryConstraintsFunction  = nullptr 
)
template<typename T >
T * agx::ConstraintImplementation::findSecondaryConstraintGivenType ( const agx::UInt  count = 0) const
inlineinherited
Returns
the secondary constraint of specified type after count occurrences (of that type)

Definition at line 1380 of file ConstraintImplementation.h.

References agx::ConstraintImplementation::m_sc, and agx::Container::size().

void agxStream::Serializable::generateUuid ( )
protectedinherited
bool agx::ConstraintImplementation::getActive ( ) const
inlineinherited
Returns
true if this constraint is enabled and valid, otherwise false

Definition at line 633 of file ConstraintImplementation.h.

virtual agx::Real agx::HighLevelConstraintImplementation::getAngle ( agx::UInt  dof = 0) const
overridevirtual

If the constraint supports angle calculations and 'dof' is in range, this method returns the angle of the given degree of freedom.

Returns
the angle given degree of freedom - if 'dof' is out of range or if this constraint doesn't support angles this method returns 0

Reimplemented from agx::ConstraintImplementation.

template<typename T >
T * agx::HighLevelConstraintImplementation::getAttachment ( agx::UInt  index)
Returns
the constraint attachment of given type (should always be valid to call after init of a constraint)

Definition at line 1403 of file ConstraintImplementation.h.

template<typename T >
const T * agx::HighLevelConstraintImplementation::getAttachment ( agx::UInt  index) const
Returns
the constraint attachment of given type (should always be valid to call after init of a constraint)

Definition at line 1409 of file ConstraintImplementation.h.

AttachmentPair * agx::HighLevelConstraintImplementation::getAttachmentPair ( ) const
inlineoverridevirtual
Returns
the constraint attachment pair

Reimplemented from agx::ConstraintImplementation.

Definition at line 1397 of file ConstraintImplementation.h.

agx::UInt agx::ConstraintImplementation::getBlockRowIndex ( ) const
inlineinherited
Returns
the global start row for this constraint in the global, non-permuted matrix

Definition at line 522 of file ConstraintImplementation.h.

const BlockStructure& agx::ConstraintImplementation::getBlockStructure ( ) const
inlineinherited
Returns
the block structure for this constraint (number of rows, number of Jacobian blocks etc.)

Definition at line 511 of file ConstraintImplementation.h.

virtual void agx::ConstraintImplementation::getBounds ( agx::RangeReal *  bounds,
agx::Real  dt 
) const
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).

Parameters
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
virtual const char* agxStream::Serializable::getClassName ( ) const
virtualinherited
Returns
the class name of this class.

Reimplemented in agxWire::StopNode, agxWire::ConnectingNode, agxWire::EyeNode, agxWire::BodyFixedNode, agx::RigidBody, agx::Twist, agxWire::FreeNode, agx::ScrewController, agx::LockController, agxModel::WaterWrapper, agx::MergedBody, agx::MergedBody, agxModel::ConstantWindGenerator, agx::RangeController, agxModel::ConstantWaterFlowGenerator, agx::MergedBody, agx::ElectricMotorController, agx::MergedBody, agx::FrictionController, agx::MergedBody, agx::TargetSpeedController, agxModel::WindAndWaterController, agxSDK::Assembly, agx::QuatLock, agx::SphericalRel, agx::Spherical, agxWire::WireSimpleDrumController, agx::Dot2, agxModel::FractureAlgorithmBreakOnStress, agx::Swing, agxModel::FractureAlgorithmBreakOnContactForce, agx::Dot1, agxModel::FractureAlgorithmBreakOnContact, agx::Frame, agxPowerLine::detail::DimensionState3Dof< DimensionType >, agxUtil::ConstraintHolder, agxDriveTrain::PidControlledEngine, agxCable::CableDamage, agxControl::TeleportToSensorOperation, agxCollide::Geometry, agxDriveTrain::deprecated::Clutch, agxModel::Terrain, agxModel::TerrainDataInterface, agx::ObserverFrame, agxControl::StoreParticlesOperation, agxModel::SlidingNodeAttachment, agxDriveTrain::deprecated::GearBox, agxControl::EventSensor, agxPowerLine::Connection, agxModel::FractureGenerator, agxControl::LoadParticleAGXFileOperation, agxPowerLine::TranslationalConstraintImplementation, agxModel::RotatingNodeAttachment, agxModel::TwoBodyTire, agxPowerLine::detail::DimensionState1Dof< DimensionType >, agxModel::Deformable1DNodeRoute, agxPowerLine::ElementaryTranslationalConstraint, agxControl::SetVelocityOperation, agx::AddedMassInteraction, agxPowerLine::TranslationalActuator, agxDriveTrain::RpmController, agx::RigidBodyAttachment, agxVehicle::Track, agxModel::RigidNodeAttachment, agxControl::WriteParticleDataToAGXOperation, agxModel::TerrainIterativeProjectedConeFrictionModel, agxModel::Deformable1DSphereGeometryFactory, agxModel::DeformableParticleCreator, agxPowerLine::GearConstraintImplementation, agxControl::MakeParticleKinematicOperation, agxModel::ConvexSoil, agx::IterativeProjectedConeFriction, agxSDK::SimulationStatisticsListener, agxSDK::LinkedStructure, agx::ConstantNormalForceOrientedBoxFrictionModel, agxDriveTrain::deprecated::FixedGear, agxVehicle::TrackProperties, agxHydraulics::HydraulicPumpActuator, agxPowerLine::ElementaryGearConstraint, agxModel::Deformable1DPointRoute, agxModel::PointNodeAttachment, agx::PropertyContainer, agxModel::SoilParticle, agxSDK::MaterialManager::MaterialManagerSerializer, agxModel::Deformable1DCylinderGeometryFactory, agxDriveTrain::deprecated::HighLevelDifferential, agxPowerLine::TorqueGenerator, agxPowerLine::PowerLine, agx::ScaleBoxFrictionModel, agxHydraulics::PistonActuator, agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation, agx::SeparationAngle, agxWire::ConvexAreaDefinition, agxCollide::Trimesh, agxControl::LoadParticleJournalOperation, agxControl::ReplaceParticleMaterialOperation, agxWire::ShapeContactNode, agxModel::Deformable1DCapsuleGeometryFactory, agx::CubicSplineLookupTable, agxHydraulics::HydraulicMotorActuator, agxSDK::GeometryContactMergeSplitThresholds, agxDriveTrain::deprecated::TorqueConverterTable, agxDriveTrain::HolonomicGear, agxModel::Deformable1DNode, agx::BoxFrictionModel, agxPowerLine::RotationalConnector, agxWire::CircularAreaDefinition, agxPowerLine::ActuatorBodyUnit, agxPowerLine::RotationalActuator, agxModel::Deformable1DBulkProperties, agx::Attachment, agxModel::Deformable1D, agx::GranularImpactDataWriter, agxPowerLine::PowerTimeIntegralLookupTable, agx::WheelJoint, agx::OrientedIterativeProjectedConeFrictionModel, agxControl::ParticleContactDumper, agxDriveTrain::deprecated::TorqueConverter, agxCable::Route, agx::Hinge, agx::RotationalAngle, agx::CubicFunction2D, agxControl::RecordParticleShapshotJournalOperation, agxDriveTrain::deprecated::HighLevelGearBox, agxTerrain::TerrainRasterizer, agxVehicle::Wheel, agxControl::SensorOperation, agxHydraulics::FlowDimension, agxModel::HeightFieldDeformerJournalRecorder, agxModel::ParticleAttributes, agxDriveTrain::Engine, agxWire::EyeNodeArea, agxModel::SurfaceVelocityConveyorBelt, agxCable::PathRoute, agx::WorldFrameBallJoint, agx::OrientedScaleBoxFrictionModel, agxPowerLine::LinearLookupTable, agxCollide::Line, agxDriveTrain::Differential, agxVehicle::TrackRoute, agxCollide::RenderMaterial, agxControl::MeasurementSensor, agxModel::DeformableMineFace, agx::AutoSleepThreshold, agxCollide::CollisionGroupManager, agxControl::ColorParticles, agxHydraulics::NeedleValve, agxModel::DeformableParticleMesh, agxDriveTrain::ElectricMotor, agxDriveTrain::SlipGear, agxModel::OneBodyTire, agxPowerLine::ActuatorRotationalDimension, agxCable::SegmentingRoute, agx::LinearLookupTable, agx::MergeSplit, agxCollide::RenderData, agxControl::RecordParticleJournalOperation, agxPowerLine::RotationalTranslationalHolonomicConnector, agxUtil::RawMesh, agxPowerLine::RotationalDimension, agxModel::WindAndWaterController::WindGenerator, agx::Physics::GranularBodySystem, agx::Prismatic, agx::VirtualConstraintInertia, agx::OrientedBoxFrictionModel, agxModel::ThreeBodyTire, agxSDK::ConstraintMergeSplitThresholds, agx::RegularizationParameters, agxSDK::LinkedSegment, agxCollide::CollisionMeshData, agx::SphericalRelSlack, agx::SlackHingeJoint, agx::SlackLockJoint, agxDriveTrain::deprecated::HighLevelTorqueConverter, agxDriveTrain::GearBox, agxCollide::Plane, agxHydraulics::detail::GraphJoiningConnector, agxModel::Deformable1DBoxGeometryFactory, agx::CylindricalJoint, agxCable::CableDamageState, agxHydraulics::CheckValve, agxPowerLine::RotationalUnit, agx::BallJoint, agx::SlackPrismaticJoint, agx::Interaction, agx::DistanceJoint, agxPowerLine::SlotMapper, agxSDK::EventListener, agx::JournalCustomDataRecorder, agxControl::SensorEvent, agxSDK::StepEventListener, agxControl::TagOperation, agx::PrismaticUniversalJoint, agx::UniversalJoint, agxCollide::Convex, agx::SlackCylindricalJoint, agxCable::IdentityRoute, agxHydraulics::deprecated::PumpUnit, agxDriveTrain::Clutch, agxHydraulics::deprecated::MotorUnit, agxModel::HeightController, agxSDK::WireMergeSplitThresholds, agxModel::WindAndWaterController::WaterFlowGenerator, agxVehicle::TrackNode, agx::ContactTangent, agxDriveTrain::ElectricMotorConstraint, agx::LockJoint, agx::SwingTwistLock, agxCollide::WireShape, agxHydraulics::detail::SpoolValveConnector, agx::SleepThreshold, agxSDK::ConstraintMergeSplitAlgorithm, agxSDK::GeometryContactMergeSplitAlgorithm, agx::Dot2Slack, agxDriveTrain::Gear, agxPowerLine::RotationalTranslationalConnector, agxPowerLine::WireWinchActuator, agxSDK::WireMergeSplitAlgorithm, agxHydraulics::Accumulator, agxHydraulics::detail::GraphJoiningConstraintImplementation, agxModel::HeightFieldDeformer, agxDriveTrain::EnginePowerGenerator, agx::AngularLockJoint, agx::PointGravityField, agx::SplineJoint, agxControl::BaseRecordParticleJournalOperation, agx::Dot1Joint, agxPowerLine::detail::RigidBodyRotationalAttachmentSentry, agxControl::RemoveParticles, agxSDK::LinkedStructureComponent, agxDriveTrain::DifferentialLockConnector, agxDriveTrain::Shaft, agx::UniformGravityField, agxLua::LuaScriptOperation, agx::ParticleContactSensor, agxCollide::MeshData, agxDriveTrain::deprecated::TorqueConverterSpeedRatioLookup, agxSDK::Collection, agx::ContactNormal, agxHydraulics::detail::ElementaryGraphJoiningConstraint, agxPowerLine::detail::WireWinchConnectorConstraintImplementation, agx::MergeSplitBodyStorage, agx::StrongInteractionConstraint, agxSDK::EnergyManager, agx::PlaneJoint, agx::ParticleSink, agx::Dot1Slack, agxDriveTrain::ElectricMotorConstraintImplementation, agxSDK::GranularContactMergeSplitAlgorithm, agxControl::SplitSensorOperation, agxDriveTrain::EngineDampingUpdater, agxControl::RemoveRigidBody, agxPowerLine::detail::WireWinchConnector, agxPowerLine::detail::ElementaryWireWinchConnectorConstraint, agxPowerLine::detail::RigidBodyTranslationalAttachmentSentry, agxSDK::MergedBodyMergeSplitAlgorithm, agxCable::RoutingNode, agxCable::CablePlasticity, agxHydraulics::detail::SpoolValveStaticFlowUnit, agxModel::PlasticityComponent, and agxCable::GeometryFactory.

Referenced by agxStream::InputArchive::readRef().

virtual int agx::ConstraintImplementation::getConstraintVelocity ( agx::Real *  v,
int  row 
)
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.

Parameters
v- array of constraint velocity values, must at least be of size row + numRowsThisConstraintUses
row- row to start push values (v[row] = firstConstraintValue)
Returns
the number of rows this constraint uses (could differ from time step to time step)
virtual agx::Real agx::ConstraintImplementation::getCurrentSpeed ( agx::UInt  = 0) 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).

Returns
the current angle speed, returns 0 for constraints that are non-compatible to this call

Definition at line 872 of file ConstraintImplementation.h.

virtual agx::ElementaryConstraint* agx::ConstraintImplementation::getElementaryConstraint ( const agx::UInt  index) const
virtualinherited
Parameters
index- index of the elementary constraint
Returns
elementary constraint given index
virtual agx::ElementaryConstraint* agx::ConstraintImplementation::getElementaryConstraint ( const agx::String &  name) const
virtualinherited
Parameters
name- name of the elementary constraint
Returns
elementary constraint given name
agx::ElementaryConstraint::RefContainer& agx::ConstraintImplementation::getElementaryConstraints ( )
inlineinherited
Returns
a vector of the elementary constraints

Definition at line 590 of file ConstraintImplementation.h.

const agx::ElementaryConstraint::RefContainer& agx::ConstraintImplementation::getElementaryConstraints ( ) const
inlineinherited

Definition at line 591 of file ConstraintImplementation.h.

virtual bool agx::ConstraintImplementation::getEnable ( ) const
inlinevirtualinherited
Returns
true if this constraint is enabled, otherwise false
Note
The constraint can't disable itself, i.e., enable == false only if the user has disabled it

Definition at line 622 of file ConstraintImplementation.h.

virtual agx::Bool agx::HighLevelConstraintImplementation::getEnableComputeForces ( ) const
overridevirtual
Returns
true if this constraint has been enabled to compute the forces applied to its bodies - otherwise false

Reimplemented from agx::ConstraintImplementation.

bool agx::ConstraintImplementation::getEnableLinearization ( ) const
inherited
Returns
true if linearization is enabled for this constraint.
bool agxStream::Serializable::getEnableSerialization ( ) const
inherited
Returns
true if serialization is enabled for this object

Definition at line 273 of file Serializable.h.

bool agxStream::Serializable::getEnableUuidGeneration ( )
inherited
Returns
true if Uuid:s should be generated for each new Serializable object
virtual void agx::ConstraintImplementation::getEpsilon ( agx::Real *  epsilon,
agx::Real  h 
)
virtualinherited

Writes regularization parameters for all active rows into epsilon.

Parameters
epsilon- array to write into (number of active rows allocated)
h- current time step
agx::FrictionController* agx::ConstraintImplementation::getFrictionController ( agx::UInt  number = 0) const
inherited
Returns
a friction controller if present for this constraint, otherwise nullptr
agx::UInt32 agxStream::Serializable::getIndex ( ) const
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.

Returns
an instance index of this object. This is unique for the lifetime of this library instance.

Definition at line 247 of file Serializable.h.

agx::UInt agx::ConstraintImplementation::getJacobianRowUsage ( ) const
inlineinherited
Returns
the number of rows this constraint uses (equivalent to m_jacobian[0].getNumRows())

Definition at line 506 of file ConstraintImplementation.h.

virtual agx::Bool agx::HighLevelConstraintImplementation::getLastForce ( agx::UInt  bodyIndex,
agx::Vec3 &  retForce,
agx::Vec3 &  retTorque,
agx::Bool  giveForceAtCm = false 
) const
overridevirtual

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).

See Also
setEnableComputeForces
Parameters
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.
Returns
true if resulting force and torque was written to retForce and retTorque - otherwise false

Reimplemented from agx::ConstraintImplementation.

virtual agx::Bool agx::HighLevelConstraintImplementation::getLastForce ( const RigidBody *  rb,
Vec3 &  retForce,
Vec3 &  retTorque,
agx::Bool  giveForceAtCm = false 
) const
overridevirtual

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).

See Also
setEnableComputeForces
Parameters
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.
Returns
true if resulting force and torque was written to retForce and retTorque - otherwise false

Reimplemented from agx::ConstraintImplementation.

virtual agx::Bool agx::HighLevelConstraintImplementation::getLastLocalForce ( agx::UInt  bodyIndex,
agx::Vec3 &  retForce,
agx::Vec3 &  retTorque,
agx::Bool  giveForceAtCm = false 
) const
overridevirtual

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).

See Also
setEnableComputeForces
Parameters
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.
Returns
true if resulting force and torque was written to retForce and retTorque - otherwise false

Reimplemented from agx::ConstraintImplementation.

virtual agx::Bool agx::HighLevelConstraintImplementation::getLastLocalForce ( const agx::RigidBody *  rb,
agx::Vec3 &  retForce,
agx::Vec3 &  retTorque,
agx::Bool  giveForceAtCm = false 
) const
overridevirtual

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).

See Also
setEnableComputeForces
Parameters
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.
Returns
true if resulting force and torque was written to retForce and retTorque - otherwise false

Reimplemented from agx::ConstraintImplementation.

agx::Lock1D* agx::ConstraintImplementation::getLock1D ( agx::UInt  number = 0) const
inherited
Returns
a lock if a lock is present for this constraint, otherwise nullptr
agx::Motor1D* agx::ConstraintImplementation::getMotor1D ( agx::UInt  number = 0) const
inherited
Returns
a motor if a motor is present for this constraint, otherwise nullptr
virtual void agx::ConstraintImplementation::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) 
)
virtualinherited

Writes solver parameters such as damping and holonomic.

This should be deprecated.

agx::Range1D* agx::ConstraintImplementation::getRange1D ( agx::UInt  number = 0) const
inherited
Returns
a range if a range is present for this constraint, otherwise nullptr
virtual agx::ElementaryConstraint* agx::ConstraintImplementation::getSecondaryConstraint ( const agx::UInt  index) const
virtualinherited
Parameters
index- index of the secondary constraint
Returns
secondary constraint given index
virtual agx::ElementaryConstraint* agx::ConstraintImplementation::getSecondaryConstraint ( const agx::String &  name) const
virtualinherited
Parameters
name- name of the elementary constraint
Returns
elementary constraint given name
agx::ElementaryConstraint::RefContainer& agx::ConstraintImplementation::getSecondaryConstraints ( )
inlineinherited
Returns
a vector of secondary constraints

Definition at line 596 of file ConstraintImplementation.h.

const agx::ElementaryConstraint::RefContainer& agx::ConstraintImplementation::getSecondaryConstraints ( ) const
inlineinherited

Definition at line 597 of file ConstraintImplementation.h.

bool agx::ConstraintImplementation::getSolveBoth ( ) const
inlineinherited
Returns
true if this constraint is solved both with the direct solve and with the iterative solver

Definition at line 533 of file ConstraintImplementation.h.

References agx::Constraint::DIRECT_AND_ITERATIVE.

bool agx::ConstraintImplementation::getSolveIterative ( ) const
inlineinherited
Returns
true if this constraint will be solved iteratively by a hybrid solver - otherwise false
Note
Should be removed, still here for old hybrid solvers.

Definition at line 528 of file ConstraintImplementation.h.

References agx::Constraint::ITERATIVE.

SolverBodyView agx::ConstraintImplementation::getSolverView ( ) const
inherited

Bodies as viewed from the solver.

It's only valid to use this interface if you're a solver.

Constraint::SolveType agx::ConstraintImplementation::getSolveType ( ) const
inlineinherited
Returns
the solve type for this constraint

Definition at line 543 of file ConstraintImplementation.h.

virtual StorageAgent* agxStream::Serializable::getStorageAgent ( ) const
pure virtualinherited
Returns
the storage agent

Implemented in agxWire::StopNode, agxWire::ConnectingNode, agxWire::EyeNode, agxWire::BodyFixedNode, agx::RigidBody, agx::Twist, agxWire::FreeNode, agx::ScrewController, agx::LockController, agxModel::WaterWrapper, agx::MergedBody, agx::MergedBody, agxModel::ConstantWindGenerator, agx::RangeController, agxModel::ConstantWaterFlowGenerator, agx::MergedBody, agx::ElectricMotorController, agx::MergedBody, agx::FrictionController, agx::MergedBody, agx::TargetSpeedController, agxModel::WindAndWaterController, agxSDK::Assembly, agx::QuatLock, agx::SphericalRel, agx::Spherical, agxWire::WireSimpleDrumController, agx::Dot2, agxModel::FractureAlgorithmBreakOnStress, agx::Swing, agxModel::FractureAlgorithmBreakOnContactForce, agx::Dot1, agxModel::FractureAlgorithmBreakOnContact, agx::Frame, agxPowerLine::detail::DimensionState3Dof< DimensionType >, agxUtil::ConstraintHolder, agxDriveTrain::PidControlledEngine, agxCable::CableDamage, agxControl::TeleportToSensorOperation, agxCollide::Geometry, agxDriveTrain::deprecated::Clutch, agxModel::Terrain, agxModel::TerrainDataInterface, agx::ObserverFrame, agxControl::StoreParticlesOperation, agxModel::SlidingNodeAttachment, agxDriveTrain::deprecated::GearBox, agxControl::EventSensor, agxPowerLine::Connection, agxModel::FractureGenerator, agxControl::LoadParticleAGXFileOperation, agxPowerLine::TranslationalConstraintImplementation, agxModel::RotatingNodeAttachment, agxModel::TwoBodyTire, agxModel::Deformable1DNodeRoute, agxPowerLine::detail::DimensionState1Dof< DimensionType >, agxPowerLine::ElementaryTranslationalConstraint, agxControl::SetVelocityOperation, agx::AddedMassInteraction, agxPowerLine::TranslationalActuator, agxDriveTrain::RpmController, agx::RigidBodyAttachment, agxVehicle::Track, agxModel::RigidNodeAttachment, agxControl::WriteParticleDataToAGXOperation, agxModel::TerrainIterativeProjectedConeFrictionModel, agxModel::Deformable1DSphereGeometryFactory, agxModel::DeformableParticleCreator, agxPowerLine::GearConstraintImplementation, agxControl::MakeParticleKinematicOperation, agxModel::ConvexSoil, agx::IterativeProjectedConeFriction, agxSDK::SimulationStatisticsListener, agxSDK::LinkedStructure, agx::ConstantNormalForceOrientedBoxFrictionModel, agxDriveTrain::deprecated::FixedGear, agxVehicle::TrackProperties, agxHydraulics::HydraulicPumpActuator, agxPowerLine::ElementaryGearConstraint, agxModel::Deformable1DPointRoute, agxModel::PointNodeAttachment, agx::PropertyContainer, agxModel::SoilParticle, agxSDK::MaterialManager::MaterialManagerSerializer, agxModel::Deformable1DCylinderGeometryFactory, agxDriveTrain::deprecated::HighLevelDifferential, agxPowerLine::TorqueGenerator, agxPowerLine::PowerLine, agx::ScaleBoxFrictionModel, agxHydraulics::PistonActuator, agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation, agx::SeparationAngle, agxWire::ConvexAreaDefinition, agxCollide::Trimesh, agxControl::LoadParticleJournalOperation, agxControl::ReplaceParticleMaterialOperation, agxWire::ShapeContactNode, agxModel::Deformable1DCapsuleGeometryFactory, agx::CubicSplineLookupTable, agxHydraulics::HydraulicMotorActuator, agxSDK::GeometryContactMergeSplitThresholds, agxDriveTrain::deprecated::TorqueConverterTable, agxDriveTrain::HolonomicGear, agxModel::Deformable1DNode, agx::BoxFrictionModel, agxPowerLine::RotationalConnector, agxWire::CircularAreaDefinition, agxPowerLine::ActuatorBodyUnit, agxPowerLine::RotationalActuator, agxModel::Deformable1DBulkProperties, agx::Attachment, agxModel::Deformable1D, agx::GranularImpactDataWriter, agxPowerLine::PowerTimeIntegralLookupTable, agx::WheelJoint, agx::OrientedIterativeProjectedConeFrictionModel, agxControl::ParticleContactDumper, agxDriveTrain::deprecated::TorqueConverter, agxCable::Route, agx::Hinge, agx::RotationalAngle, agx::CubicFunction2D, agxControl::RecordParticleShapshotJournalOperation, agxDriveTrain::deprecated::HighLevelGearBox, agxTerrain::TerrainRasterizer, agxVehicle::Wheel, agxControl::SensorOperation, agxHydraulics::FlowDimension, agxModel::HeightFieldDeformerJournalRecorder, agxModel::ParticleAttributes, agxDriveTrain::Engine, agxWire::EyeNodeArea, agxModel::SurfaceVelocityConveyorBelt, agxCable::PathRoute, agx::WorldFrameBallJoint, agx::OrientedScaleBoxFrictionModel, agxPowerLine::LinearLookupTable, agxCollide::Line, agxDriveTrain::Differential, agxVehicle::TrackRoute, agxCollide::RenderMaterial, agxControl::MeasurementSensor, agxModel::DeformableMineFace, agx::AutoSleepThreshold, agxCollide::CollisionGroupManager, agxControl::ColorParticles, agxHydraulics::NeedleValve, agxModel::DeformableParticleMesh, agxDriveTrain::ElectricMotor, agxDriveTrain::SlipGear, agxModel::OneBodyTire, agxPowerLine::ActuatorRotationalDimension, agxCable::SegmentingRoute, agx::LinearLookupTable, agx::MergeSplit, agxCollide::RenderData, agxControl::RecordParticleJournalOperation, agxPowerLine::RotationalTranslationalHolonomicConnector, agxUtil::RawMesh, agxPowerLine::RotationalDimension, agxModel::WindAndWaterController::WindGenerator, agx::Physics::GranularBodySystem, agx::Prismatic, agx::VirtualConstraintInertia, agx::OrientedBoxFrictionModel, agxModel::ThreeBodyTire, agxSDK::ConstraintMergeSplitThresholds, agx::RegularizationParameters, agxSDK::LinkedSegment, agxCollide::CollisionMeshData, agx::SphericalRelSlack, agx::SlackHingeJoint, agx::SlackLockJoint, agxDriveTrain::deprecated::HighLevelTorqueConverter, agxDriveTrain::GearBox, agxCollide::Plane, agxHydraulics::detail::GraphJoiningConnector, agxModel::Deformable1DBoxGeometryFactory, agx::CylindricalJoint, agxCable::CableDamageState, agxHydraulics::CheckValve, agxPowerLine::RotationalUnit, agx::BallJoint, agx::SlackPrismaticJoint, agx::Interaction, agx::DistanceJoint, agxPowerLine::SlotMapper, agxSDK::EventListener, agx::JournalCustomDataRecorder, agxControl::SensorEvent, agxSDK::StepEventListener, agxControl::TagOperation, agx::PrismaticUniversalJoint, agx::UniversalJoint, agxCollide::Convex, agx::SlackCylindricalJoint, agxCable::IdentityRoute, agxHydraulics::deprecated::PumpUnit, agxDriveTrain::Clutch, agxHydraulics::deprecated::MotorUnit, agxModel::HeightController, agxSDK::WireMergeSplitThresholds, agxModel::WindAndWaterController::WaterFlowGenerator, agxVehicle::TrackNode, agx::ContactTangent, agxDriveTrain::ElectricMotorConstraint, agx::LockJoint, agx::SwingTwistLock, agxCollide::WireShape, agxHydraulics::detail::SpoolValveConnector, agx::SleepThreshold, agxSDK::ConstraintMergeSplitAlgorithm, agxSDK::GeometryContactMergeSplitAlgorithm, agx::Dot2Slack, agxDriveTrain::Gear, agxPowerLine::RotationalTranslationalConnector, agxPowerLine::WireWinchActuator, agxSDK::WireMergeSplitAlgorithm, agxHydraulics::Accumulator, agxHydraulics::detail::GraphJoiningConstraintImplementation, agxModel::HeightFieldDeformer, agxDriveTrain::EnginePowerGenerator, agx::AngularLockJoint, agx::PointGravityField, agx::SplineJoint, agxControl::BaseRecordParticleJournalOperation, agx::Dot1Joint, agxControl::RemoveParticles, agxSDK::LinkedStructureComponent, agxDriveTrain::DifferentialLockConnector, agxDriveTrain::Shaft, agxPowerLine::detail::RigidBodyRotationalAttachmentSentry, agx::UniformGravityField, agxLua::LuaScriptOperation, agx::ParticleContactSensor, agxCollide::MeshData, agxDriveTrain::deprecated::TorqueConverterSpeedRatioLookup, agxSDK::Collection, agx::ContactNormal, agxHydraulics::detail::ElementaryGraphJoiningConstraint, agxPowerLine::detail::WireWinchConnectorConstraintImplementation, agx::MergeSplitBodyStorage, agx::StrongInteractionConstraint, agxSDK::EnergyManager, agx::PlaneJoint, agx::ParticleSink, agx::Dot1Slack, agxDriveTrain::ElectricMotorConstraintImplementation, agxSDK::GranularContactMergeSplitAlgorithm, agxControl::SplitSensorOperation, agxDriveTrain::EngineDampingUpdater, agxControl::RemoveRigidBody, agxPowerLine::detail::WireWinchConnector, agxPowerLine::detail::ElementaryWireWinchConnectorConstraint, agxSDK::MergedBodyMergeSplitAlgorithm, agxCable::RoutingNode, agxCable::CablePlasticity, agxHydraulics::detail::SpoolValveStaticFlowUnit, agxPowerLine::detail::RigidBodyTranslationalAttachmentSentry, agxModel::PlasticityComponent, and agxCable::GeometryFactory.

ConstraintImplPtrVector& agx::ConstraintImplementation::getSubConstraints ( )
inlineinherited
Returns
a vector of the sub-constraints

Definition at line 602 of file ConstraintImplementation.h.

const ConstraintImplPtrVector& agx::ConstraintImplementation::getSubConstraints ( ) const
inlineinherited

Definition at line 603 of file ConstraintImplementation.h.

int agx::ConstraintImplementation::getTag ( ) const
inlineinherited
Returns
the current tag of this constraint

Definition at line 559 of file ConstraintImplementation.h.

BodyView agx::ConstraintImplementation::getUserView ( ) const
inherited

Bodies as viewed from the user.

This is the default way to look at the bodies.

agx::Uuid agxStream::Serializable::getUuid ( ) const
inherited
Returns
a unique id for this instance.

Definition at line 268 of file Serializable.h.

virtual int agx::ConstraintImplementation::getViolation ( agx::Real *  g,
int  row 
)
virtualinherited

Calculates and pushes the constraint values into array given current row.

Parameters
g- array of constraint values, must at least be of size row + numRowsThisConstraintUses
row- row to start push values (g[row] = firstConstraintValue)
Returns
the number of rows this constraint uses (could differ from time step to time step)
void agx::ConstraintImplementation::incrementConstraintCount ( RigidBody *  rb) const
inlineinherited

Increment the number of constraints connection to rb.

Parameters
rb- rigid body to increment the constraint count

Definition at line 554 of file ConstraintImplementation.h.

References agxAssert.

bool agxStream::Serializable::isFinished ( ) const
inherited
Returns
true if this class is restored correctly and should not be deleted during destruction of an Archive.

Definition at line 252 of file Serializable.h.

bool agx::ConstraintImplementation::isImpacting ( ) const
inlineinherited
Returns
true if one or more equations in this constraint is impacting

Definition at line 548 of file ConstraintImplementation.h.

bool agx::ConstraintImplementation::isValid ( ) const
inlineinherited
Returns
true if this constraint is valid (no disabled bodies, removed bodies, has dynamic bodies etc.), otherwise false

Definition at line 638 of file ConstraintImplementation.h.

void agx::ConstraintImplementation::onDirectComplianceMatrix ( Real *  data,
unsigned int  ld 
) const
inherited

Internal callback from the direct solver with perturbation matrix data.

virtual void agx::HighLevelConstraintImplementation::postSolveCallback ( const agx::Jacobian6DOFElement *  jacobians,
const agx::Real *  solution,
agx::Real  dt 
)
overridevirtual

Peak at the solution after the solver is done.

Parameters
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 from agx::ConstraintImplementation.

void agx::ConstraintImplementation::postSolveIndexSetCallback ( const int8_t *  state)
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.

void agx::ConstraintImplementation::postSystemCallback ( DynamicsSystem *  system)
inlinevirtualinherited

Last in the dynamics system step forward loop, this constraint gets a call with the main system.

This call is made after the data buffers have been written back to the bodies.

Parameters
system- the main dynamics system

Reimplemented in agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation.

Definition at line 1395 of file ConstraintImplementation.h.

virtual void agx::HighLevelConstraintImplementation::prepare ( )
overridevirtual

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 from agx::ConstraintImplementation.

void agx::ConstraintImplementation::preSystemCallback ( DynamicsSystem *  system)
inlinevirtualinherited

Before prepare, and before the system writes to the data buffers, this constraint gets a call with the main system it's in.

During this call it's possible to add or remove bodies from the system, bodies this constraint are responsible of.

Parameters
system- the main dynamics system

Reimplemented in agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation.

Definition at line 1393 of file ConstraintImplementation.h.

virtual bool agx::HighLevelConstraintImplementation::rebind ( )
overridevirtual

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.

Returns
true if successful - otherwise false

Reimplemented from agx::ConstraintImplementation.

virtual bool agx::ConstraintImplementation::removeElementaryConstraint ( agx::ElementaryConstraint *  elementaryConstraint)
virtualinherited

Remove elementary constraint.

Parameters
elementaryConstraint- elementary constraint to remove
Returns
true if removed
virtual bool agx::ConstraintImplementation::removeElementaryConstraint ( const agx::String &  name)
virtualinherited

Remove elementary constraint.

Parameters
name- name of the elementary constraint to remove
Returns
true if removed
virtual void agx::ConstraintImplementation::removeNotification ( )
inlinevirtualinherited

Callback when this constraint is removed from Simulation.

Definition at line 579 of file ConstraintImplementation.h.

virtual bool agx::ConstraintImplementation::removeSecondaryConstraint ( agx::ElementaryConstraint *  secondaryConstraint)
virtualinherited

Remove secondary constraint.

Parameters
secondaryConstraint- secondary constraint to remove
Returns
true if removed
virtual bool agx::ConstraintImplementation::removeSecondaryConstraint ( const agx::String &  name)
virtualinherited

Remove secondary constraint.

Parameters
name- name of the secondary constraint to remove
Returns
true if removed
void agx::ConstraintImplementation::reset ( )
inherited

Reset the solution vectors of the primary and secondary elementary constraints in the implementation.

virtual void agx::HighLevelConstraintImplementation::restore ( agxStream::InputArchive &  in)
overridevirtual
virtual void agx::HighLevelConstraintImplementation::restoreLightData ( agxStream::StorageStream &  str)
overridevirtual
void agx::ConstraintImplementation::setBlockRowIndex ( agx::UInt  blockRowIndex)
inlineinherited

Sets the global start index for this constraint in the global, non-permuted matrix.

Parameters
blockRowIndex- global start row for this constraint in the global, non-permuted matrix

Definition at line 517 of file ConstraintImplementation.h.

virtual void agx::ConstraintImplementation::setEnable ( bool  enable)
virtualinherited

Sets the enable flag.

If this flags sets to false the solver will ignore this constraint.

Parameters
enable- set to true if this constraint should be enabled, false to disable it
virtual void agx::HighLevelConstraintImplementation::setEnableComputeForces ( agx::Bool  enable)
overridevirtual

Enable (or disable) computation of the forces applied to the dynamic bodies in this constraint.

Matrix-vector operation to compute the forces after solve.

See Also
getLastForce
Parameters
enable- true to enable, false to disable

Reimplemented from agx::ConstraintImplementation.

void agx::ConstraintImplementation::setEnableLinearization ( bool  enable)
inherited

Control whether or not linearization should be performed on the ElementaryConstraints that require it, such as QuatLock.

See Also
agx::Constraint::setEnableLinearization
void agxStream::Serializable::setEnableSerialization ( bool  flag)
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.

static void agxStream::Serializable::setEnableUuidGeneration ( bool  flag)
staticinherited

Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled.

void agxStream::Serializable::setFinished ( )
inherited

Tells this class that it is restored correctly and should not be deleted during destruction of an Archive.

void agx::ConstraintImplementation::setSimulation ( agxSDK::Simulation *  simulation)
protectedinherited

Set the Simulation this constraint belongs to.

Parameters
simulation- the Simulation this constraint belongs to
void agx::ConstraintImplementation::setSolveType ( Constraint::SolveType  type)
inlineinherited

Set solve type, either DIRECT, ITERATIVE or DIRECT_AND_ITERATIVE.

Definition at line 538 of file ConstraintImplementation.h.

void agx::ConstraintImplementation::setSupportsComplianceMatrix ( Bool  supportsComplianceMatrix)
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.

Parameters
supportsComplianceMatrix- true to enable access, false to disable (Default: Disabled).
bool agx::HighLevelConstraintImplementation::setupOneOrTwoBodySystem ( RigidBodyAttachment *  a1,
RigidBodyAttachment *  a2 
)
void agxStream::Serializable::setUuid ( const agx::Uuid &  uuid)
inherited

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!

void agx::ConstraintImplementation::sort ( )
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.

virtual void agx::HighLevelConstraintImplementation::store ( agxStream::OutputArchive &  out) const
overridevirtual
virtual void agx::HighLevelConstraintImplementation::storeLightData ( agxStream::StorageStream &  str) const
overridevirtual
virtual CALLABLE_IGNORE void agx::ConstraintImplementation::updateComplianceMatrix ( LSquareComplianceMatrix  matrix) const
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.

Parameters
matrix- compliance matrix
virtual size_t agx::HighLevelConstraintImplementation::updateJacobian ( agx::Jacobian6DOFElement *  jacobians)
overridevirtual

Updates the Jacobian matrices.

The elementary constraints pushes data into this constraints Jacobian matrices. For some solvers this is equivalent to push the data into the global matrix.

Returns
the number of rows this constraint uses (could differ from time step to time step)

Reimplemented from agx::ConstraintImplementation.

virtual bool agx::HighLevelConstraintImplementation::updateValid ( )
overridevirtual

Updates the valid conditions for this constraint.

This constraint is not valid if for example; one or more bodies are removed (either from simulation or deallocated), one or more bodies are disabled or the number of dynamic bodies in this constraint is zero.

Returns
m_valid, true if valid, otherwise false

Reimplemented from agx::ConstraintImplementation.

virtual agx::Attachment* agx::HighLevelConstraintImplementation::userAPIgetAttachment ( const agx::RigidBody *  rb) const
overridevirtual
Returns
the rigid body attachment given a rigid body (returns 0 if invalid)

Reimplemented from agx::ConstraintImplementation.

virtual agx::Attachment* agx::HighLevelConstraintImplementation::userAPIgetAttachment ( agx::UInt  index) const
overridevirtual
Returns
the constraint attachment at index

Reimplemented from agx::ConstraintImplementation.

agx::Real agx::ConstraintImplementation::userAPIgetCompliance ( agx::UInt  dof) const
inherited
Returns
the compliance of the i'th constraint row of this constraint
agx::Real agx::ConstraintImplementation::userAPIgetCurrentForce ( agx::UInt  dof) const
inherited

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.

Returns
the current force magnitude (i.e., the force magnitude last time step) in given DOF >= 0 && <= NUM_DOFS
See Also
setEnableComputeForces and getLastForce
agx::Real agx::ConstraintImplementation::userAPIgetDamping ( agx::UInt  dof) const
inherited
Returns
the damping of the i'th constraint row of this constraint
agx::RangeReal agx::ConstraintImplementation::userAPIgetForceRange ( agx::UInt  dof) const
inherited

Get the force range for DOF dof.

Note
Indices > number of DOF for this constraint is not defined, an infinite force range will be returned.
For controllers (secondary constraints), use their specific method, e.g., constraint->getMotor1D()->getForceRange().
Parameters
dof- index of the requested DOF
agx::RegularizationParameters* agx::ConstraintImplementation::userAPIgetRegularizationParameters ( agx::UInt  i)
inherited

Get the regularization parameter i, i.e., the regularization parameter for equation i which is constraint dependent.

Parameters
i- corresponds to the i'th constraint row of this constraint
Returns
regularization parameter for equation i
const agx::RegularizationParameters* agx::ConstraintImplementation::userAPIgetRegularizationParameters ( agx::UInt  i) const
inherited
void agx::ConstraintImplementation::userAPIsetCompliance ( agx::Real  compliance,
int  dof 
)
inherited

Set the compliance for constraint row i of this constraint.

Parameters
compliance- compliance
dof- corresponds to the i'th constraint row of this constraint
void agx::ConstraintImplementation::userAPIsetDamping ( agx::Real  damping,
int  dof 
)
inherited

Set the damping for constraint row i of this constraint.

Parameters
damping- damping
dof- corresponds to the i'th constraint row of this constraint
void agx::ConstraintImplementation::userAPIsetForceRange ( agx::RangeReal  forceRange,
agx::Int  dof 
)
inherited

Assign force range, of an elementary constraint, for a given DOF.

Note
For controllers (secondary constraints), use their specific methods, e.g., constraint->getMotor1D()->setForceRange( fRange ).
Parameters
forceRange- value of force range for the given DOF
dof- index of the DOF (-1 indicates all)
bool agx::HighLevelConstraintImplementation::validateRigidBodiesAndAttachments ( RigidBody *  rb1,
Frame *  rb1AttachmentFrame,
RigidBody *  rb2,
Frame *  rb2AttachmentFrame 
)

Member Data Documentation

void* agx::ConstraintImplementation::customData
inherited

Custom data for the solvers to store data into.

Definition at line 562 of file ConstraintImplementation.h.

AttachmentPair agx::HighLevelConstraintImplementation::m_attachmentPair
protected

Definition at line 1247 of file ConstraintImplementation.h.

UInt agx::ConstraintImplementation::m_blockRowIndex
protectedinherited

Start block row for this constraint in the global matrix.

Definition at line 1012 of file ConstraintImplementation.h.

BlockStructure agx::ConstraintImplementation::m_blockStructure
protectedinherited

The block structure; number of block, rows, dynamic blocks etc.

Definition at line 1011 of file ConstraintImplementation.h.

ConstraintRigidBodyContainer agx::ConstraintImplementation::m_bodies
protectedinherited
ConstrainedBodiesState agx::ConstraintImplementation::m_constrainedBodiesState
protectedinherited

State of the included bodies, updated in updateValid.

Definition at line 1008 of file ConstraintImplementation.h.

ElementaryConstraint::RefContainer agx::ConstraintImplementation::m_ec
protectedinherited

Vector of elementary constraints.

Definition at line 1004 of file ConstraintImplementation.h.

bool agx::ConstraintImplementation::m_enable
protectedinherited

User controlled enable flag, constraint ignored by solver if false.

Definition at line 1022 of file ConstraintImplementation.h.

bool agx::ConstraintImplementation::m_enableLinearization
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.

Vec3Vector agx::HighLevelConstraintImplementation::m_lastForces
protected

Definition at line 1248 of file ConstraintImplementation.h.

LocalState agx::ConstraintImplementation::m_localState
protectedinherited

Current local state, updated all the time, not serialized.

Definition at line 1024 of file ConstraintImplementation.h.

UInt agx::ConstraintImplementation::m_numRows
protectedinherited

Number of rows used by this constraint.

Definition at line 1010 of file ConstraintImplementation.h.

ElementaryConstraint::RefContainer agx::ConstraintImplementation::m_sc
protectedinherited

Vector of secondary constraints.

Definition at line 1005 of file ConstraintImplementation.h.

Referenced by agx::ConstraintImplementation::findSecondaryConstraintGivenType().

Constraint::SolveType agx::ConstraintImplementation::m_solveType
protectedinherited

Only for supported solvers.

Default: DIRECT. agxData::Values: DIRECT, ITERATIVE or DIRECT_AND_ITERATIVE.

Definition at line 1021 of file ConstraintImplementation.h.

ConstraintImplPtrVector agx::ConstraintImplementation::m_subConstraints
mutableprotectedinherited

Vector with sub-constraints.

Definition at line 1009 of file ConstraintImplementation.h.

int agx::ConstraintImplementation::m_tag
protectedinherited

Tag for this constraint.

Default tag is either BINARY or MANY_BODY.

Definition at line 1013 of file ConstraintImplementation.h.


The documentation for this class was generated from the following file: