AGX Dynamics  2.37.3.2
ElementaryConstraint.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2024. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 #pragma once
18 
20 #include <agx/Jacobian.h>
22 #include <agx/BitState.h>
23 
24 #include <agxStream/Serializable.h>
25 
26 #ifdef _MSC_VER
27 # pragma warning(push)
28 # pragma warning(disable: 6011) // Disable warningC6011: dereferencing nullptr pointer
29 #endif
30 
31 namespace agxStream
32 {
33  class OutputArchive;
34  class InputArchive;
35 }
36 
37 namespace agx
38 {
39  class RigidBody;
40  class Frame;
41  class ConstraintNlmcpCallback;
42 
44  namespace GWriteState
45  {
46  enum Enum { NORMAL, IGNORE_FIRST, WRITE_SECOND_FIRST };
47  }
49 
50 
54  {
55  public:
59 
60  public:
65  agx::RegularizationParameters* getRegularizationParameters( const agx::UInt row = 0 );
66 
71  const agx::RegularizationParameters* getRegularizationParameters( const agx::UInt row = 0 ) const;
72 
78  void setCompliance( agx::Real compliance, int row );
79  void setCompliance( agx::Real compliance );
80 
86  void setElasticity(agx::Real elasticity, int row);
87  void setElasticity(agx::Real elasticity);
88 
93  agx::Real getCompliance( agx::UInt row = 0 ) const;
94 
99  agx::Real getElasticity(agx::UInt row = 0) const;
100 
107  void setDamping( agx::Real damping, int row );
108  void setDamping( agx::Real damping );
109 
114  agx::Real getDamping( agx::UInt row = 0 ) const;
115 
119  agx::UInt getNumRows() const;
120 
127  void setForceRange( agx::RangeReal forceRange, const agx::UInt row = 0 );
128 
136  void setForceRange( agx::Real lower, agx::Real upper, const agx::UInt row = 0 );
137 
142  agx::RangeReal& getForceRange( const agx::UInt row = 0 );
143 
148  const agx::RangeReal& getForceRange( const agx::UInt row = 0 ) const;
149 
154  void setName( const agx::ElementaryConstraint::NameType& name );
155 
159  const agx::ElementaryConstraint::NameType& getName() const;
160 
164  const agx::Real* getCurrentForces() const;
165 
171  virtual agx::Real getCurrentForce( const agx::UInt row = 0 ) const;
172 
177  virtual void setEnable( agx::Bool enable );
178 
182  virtual agx::Bool getEnable() const;
183 
189  virtual agx::Bool isActive() const;
190 
194  virtual void prepare();
195 
199  void reset();
200 
204  virtual agx::Bool isImpacting() const;
205 
215  virtual agx::UInt getJacobian( agx::Jacobian6DOFElement* G, agx::UInt numBlocks, agx::UInt row, agx::GWriteState::Enum writeState );
216 
224  virtual agx::UInt getViolation( agx::Real* g, agx::UInt row );
225 
234  virtual agx::UInt getVelocity( agx::Real* v, agx::UInt row ) const;
235 
245  virtual agx::UInt getBounds( agx::RangeReal* bounds, agx::UInt row, agx::Real h ) const;
246 
258  virtual void linearizeCompliance(const agx::Real* violations, agx::Real* epsilons, agx::Real minPerturbation) const;
259 
260 #ifndef SWIG
261 
264  virtual agx::ConstraintNlmcpCallback* getNlCallback() const;
265 #endif
266 
274  virtual agx::UInt postSolveCallback( const agx::Real* solution, agx::UInt row, agx::Real h );
275 
280  virtual void setAttachmentPair( const agx::AttachmentPair* ap );
281 
285  virtual void store( agxStream::OutputArchive& out ) const override;
286 
290  virtual void restore( agxStream::InputArchive& in ) override;
291 
293 
297  virtual void storeLightData( agxStream::StorageStream& str ) const override;
298 
302  virtual void restoreLightData( agxStream::StorageStream& str ) override;
303 
310  void copyRowFrom(const ElementaryConstraint* source, agx::UInt sourceRow, agx::UInt destRow);
311 
312  protected:
323  agx::UInt numRows,
324  agx::RegularizationParameters* regParamsBuffer,
325  agx::Real* lastForcesBuffer,
326  agx::RangeReal* userBoundsBuffer );
327 
331  virtual ~ElementaryConstraint();
332 
333  protected:
342  private:
344 
345  friend class InternalData;
346 
350  agx::Referenced* getInternalData() const;
351 
355  void setInternalData( agx::Referenced* data );
356 
358  };
359 
361 
367  template< agx::UInt N >
369  {
370  public:
376  : ElementaryConstraint( enable, N, m_regParams, m_forces, m_bounds ) {}
377 
378  protected:
383  : ElementaryConstraint( false, N, m_regParams, m_forces, m_bounds ) {}
384 
385  protected:
386  agx::RegularizationParameters m_regParams[ N ];
387  agx::Real m_forces[ N ];
388  agx::RangeReal m_bounds[ N ];
389  };
390 
391 #ifdef SWIG
392  %template(ElementaryConstraint1) agx::ElementaryConstraintN< 1 >;
393  %template(ElementaryConstraint3) agx::ElementaryConstraintN< 3 >;
394 #endif
395 
396  template< agx::UInt N, typename DataT >
398  {
399  public:
405  ElementaryConstraintNData( const DataT& data, agx::Bool enable )
406  : ElementaryConstraintN< N >( enable ), m_data( data ) {}
407 
411  const DataT& getData() const { return m_data; }
412 
416  DataT& getData() { return m_data; }
417 
421  virtual void setAttachmentPair( const agx::AttachmentPair* ap ) override { m_data.set( ap ); }
422 
423  protected:
425  : ElementaryConstraintN< N >(), m_data() {}
426 
427  private:
428  ElementaryConstraintNData& operator=(const ElementaryConstraintNData&) {return *this;}
429  protected:
430  DataT m_data;
431  };
432 
433 #ifdef SWIG
435 #endif
436 
441  {
442  public:
447  Dot1( const agx::Dot1Data& data );
448 
450 
451  protected:
455  Dot1();
456 
460  virtual ~Dot1();
461 
462  virtual agx::UInt getJacobian( agx::Jacobian6DOFElement* G, agx::UInt numBlocks, agx::UInt row, agx::GWriteState::Enum writeState ) override;
463  virtual agx::UInt getViolation( agx::Real* g, agx::UInt row ) override;
464  };
465 
467 
472  public:
477  Swing(const agx::SwingData& data);
478 
479 
481 
482  protected:
486  Swing();
487 
491  virtual ~Swing();
492 
493  virtual agx::UInt getJacobian(agx::Jacobian6DOFElement* G, agx::UInt numBlocks, agx::UInt row,
494  agx::GWriteState::Enum writeState) override;
495 
496  virtual agx::UInt getViolation(agx::Real* g, agx::UInt row) override;
497 
501 
502  };
503 
505 
506 
507 #ifdef SWIG
509 #endif
510 
515  {
516  public:
520  Dot2( const agx::Dot2Data& data );
521 
523 
524  protected:
528  Dot2();
529 
533  virtual ~Dot2();
534 
535  virtual agx::UInt getJacobian( agx::Jacobian6DOFElement* G, agx::UInt numBlocks, agx::UInt row, agx::GWriteState::Enum writeState ) override;
536  virtual agx::UInt getViolation( agx::Real* g, agx::UInt row ) override;
537  };
538 
540 
541 #ifdef SWIG
542  %template(ElementaryConstraint3ElementaryConstraintData) agx::ElementaryConstraintNData< 3, agx::ElementaryConstraintData >;
543 #endif
544 
551  {
552  public:
557 
559 
560  protected:
564  Spherical();
565 
569  virtual ~Spherical();
570 
571  virtual agx::UInt getJacobian( agx::Jacobian6DOFElement* G, agx::UInt numBlocks, agx::UInt row, agx::GWriteState::Enum writeState ) override;
572  virtual agx::UInt getViolation( agx::Real* g, agx::UInt row ) override;
573  };
574 
576 
581  {
582  public:
587 
589 
590  protected:
594  SphericalRel();
595 
599  virtual ~SphericalRel();
600 
601  virtual agx::UInt getJacobian( agx::Jacobian6DOFElement* G, agx::UInt numBlocks, agx::UInt row, agx::GWriteState::Enum writeState ) override;
602  virtual agx::UInt getViolation( agx::Real* g, agx::UInt row ) override;
603  };
604 
606 
607 #ifdef SWIG
608  %template(QuatLock3QuatLockData) agx::ElementaryConstraintNData< 3, agx::QuatLockData >;
609 #endif
610 
615  {
616  public:
620  QuatLock( const agx::QuatLockData& data );
621 
623 
624  protected:
628  QuatLock();
629 
633  virtual ~QuatLock();
634 
638  virtual void setAttachmentPair( const agx::AttachmentPair* ap ) override;
639 
640  virtual agx::UInt getJacobian( agx::Jacobian6DOFElement* G, agx::UInt numBlocks, agx::UInt row, agx::GWriteState::Enum writeState ) override;
641  virtual agx::UInt getViolation( agx::Real* g, agx::UInt row ) override;
642 
643  virtual void linearizeCompliance(const agx::Real* violations, agx::Real* epsilons, agx::Real minPerturbation) const override;
644  };
645 
647 
648 #ifdef SWIG
649  %template(BasicControllerConstraint1ConstraintAngleBasedData) agx::ElementaryConstraintNData< 1, agx::ConstraintAngleBasedData >;
650 #endif
651 
656  {
657  public:
664 
666 
667  protected:
672 
676  virtual void store( agxStream::OutputArchive& out ) const override;
677 
681  virtual void restore( agxStream::InputArchive& in ) override;
682 
689  virtual agx::UInt getJacobian( agx::Jacobian6DOFElement* G,
690  agx::UInt numBlocks,
691  agx::UInt row,
692  agx::GWriteState::Enum writeState ) override;
693 
697  virtual agx::UInt writeJacobian( agx::Jacobian6DOFElement* G,
698  agx::UInt numBlocks,
699  agx::UInt row,
700  agx::GWriteState::Enum writeState,
701  const agx::Vec3& dir1,
702  const agx::Vec3& dir2,
703  agx::Angle::Type type ) const;
704  };
705 
711  {
712  public:
718 
723  void setSpeed( agx::Real speed );
724 
728  agx::Real getSpeed() const;
729 
736  void setLocked( agx::Bool locked );
737 
741  agx::Bool getLocked() const;
742 
750  void setLockedAtZeroSpeed( agx::Bool lockedAtZeroSpeed );
751 
755  agx::Bool getLockedAtZeroSpeed() const;
756 
760  static agx::TargetSpeedController* safeCast( const agx::ElementaryConstraint* targetSpeedController );
761 
763 
767  virtual void storeLightData( agxStream::StorageStream& str ) const override;
768 
772  virtual void restoreLightData( agxStream::StorageStream& str ) override;
773 
774  protected:
775  enum InternalState { NONE = 0, LOCKED = (1<<0), LOCKED_AT_ZERO_SPEED = (1<<1) };
776 
777  protected:
782 
786  virtual ~TargetSpeedController();
787 
791  void adjustToCurrentState();
792 
796  agx::Bool isLocked() const;
797 
798  virtual agx::UInt getViolation( agx::Real* g, agx::UInt row ) override;
799  virtual agx::UInt getVelocity( agx::Real* v, agx::UInt row ) const override;
800 
801  protected:
805  };
806 
808 
813  {
814  public:
821 
832  void setFrictionCoefficient( agx::Real frictionCoefficient );
833 
837  agx::Real getFrictionCoefficient() const;
838 
852  void setEnableNonLinearDirectSolveUpdate( agx::Bool enable );
853 
857  agx::Bool getEnableNonLinearDirectSolveUpdate() const;
858 
863  void setMinimumStaticFrictionForceRange( agx::RangeReal bound );
864 
868  agx::RangeReal getMinimumStaticFrictionForceRange() const;
869 
873  virtual agx::Bool isActive() const override;
874 
878  static agx::FrictionController* safeCast( const agx::ElementaryConstraint* frictionController );
879 
881 
887  virtual void storeLightData( agxStream::StorageStream& str ) const override;
888 
894  virtual void restoreLightData( agxStream::StorageStream& str ) override;
895 
896 #ifndef SWIG
897  public:
898  ConstraintNlmcpCallback* getNlCallback() const override;
899  agx::UInt iterativePostSolveCallback( const agx::ConstraintImplementation* constraint,
900  const agx::Real* solution,
901  agx::UInt row,
902  agx::Real h );
903 #endif
904 
905  protected:
907  virtual ~FrictionController();
908 
909  virtual agx::UInt getViolation( agx::Real* g, agx::UInt row ) override;
910  virtual agx::UInt getBounds( agx::RangeReal* bounds, agx::UInt row, agx::Real h ) const override;
911  virtual agx::UInt postSolveCallback( const agx::Real* solution, agx::UInt row, agx::Real h ) override;
912 
913  private:
914  enum Flag : agx::UInt16
915  {
916  NON_LINEAR = 1 << 0
917  };
918  using Flags = agx::BitState<Flag, agx::UInt16>;
919 
920  private:
921  class FrictionControllerNlCallback* getCallback() const;
922 
923  private:
924  Real m_frictionCoefficient;
925  Real m_lastNormalForce;
926  RangeReal m_minimumStaticFrictionBound;
927  ref_ptr<Referenced> m_nlmcpCallback;
928  Flags m_flags;
929  };
930 
933 
934 
935 
940  {
941  public:
946 
952  void setVoltage( agx::Real voltage );
953 
957  agx::Real getVoltage() const;
958 
964  void setArmatureResistance( agx::Real armatureResistance );
965 
969  agx::Real getArmatureResistance() const;
970 
976  void setTorqueConstant( agx::Real torqueConstant );
977 
981  agx::Real getTorqueConstant() const;
982 
986  static agx::ElectricMotorController* safeCast( const agx::ElementaryConstraint* electricMotorController );
987 
989 
993  virtual void storeLightData( agxStream::StorageStream& str ) const override;
994 
998  virtual void restoreLightData( agxStream::StorageStream& str ) override;
999 
1000  protected:
1002  virtual ~ElectricMotorController();
1003 
1009 
1014 
1015  virtual void prepare() override;
1016  virtual agx::UInt getViolation( agx::Real* v, agx::UInt row ) override;
1017  virtual agx::UInt getVelocity( agx::Real* v, agx::UInt row ) const override;
1018 
1019  protected:
1023  };
1024 
1026 
1032  {
1033  public:
1039 
1044  void setRange( agx::RangeReal range );
1045 
1051  void setRange( agx::Real lower, agx::Real upper );
1052 
1056  agx::RangeReal& getRange();
1057 
1061  const agx::RangeReal& getRange() const;
1062 
1066  virtual agx::Bool isActive() const override;
1067 
1071  static agx::RangeController* safeCast( const agx::ElementaryConstraint* rangeController );
1072 
1074 
1078  virtual void storeLightData( agxStream::StorageStream& str ) const override;
1079 
1083  virtual void restoreLightData( agxStream::StorageStream& str ) override;
1084 
1085  protected:
1089  RangeController();
1090 
1094  virtual ~RangeController();
1095 
1096  virtual void prepare() override;
1097  virtual agx::UInt getViolation( agx::Real* g, agx::UInt row ) override;
1098  virtual agx::UInt getBounds( agx::RangeReal* bounds, agx::UInt row, agx::Real h ) const override;
1099 
1100  protected:
1103  };
1104 
1106 
1112  {
1113  public:
1119 
1124  void setPosition( agx::Real position );
1125 
1129  agx::Real getPosition() const;
1130 
1134  static agx::LockController* safeCast( const agx::ElementaryConstraint* lockController );
1135 
1137 
1141  virtual void storeLightData( agxStream::StorageStream& str ) const override;
1142 
1146  virtual void restoreLightData( agxStream::StorageStream& str ) override;
1147 
1148  protected:
1152  LockController();
1153 
1157  virtual ~LockController();
1158 
1159  virtual agx::UInt getViolation( agx::Real* g, agx::UInt row ) override;
1160 
1161  protected:
1163  };
1164 
1166 
1168  {
1169  public:
1176 
1181  void setLead( agx::Real lead );
1182 
1186  agx::Real getLead() const;
1187 
1191  static agx::ScrewController* safeCast( const agx::ElementaryConstraint* screwController );
1192 
1194 
1198  virtual void storeLightData( agxStream::StorageStream& str ) const override;
1199 
1203  virtual void restoreLightData( agxStream::StorageStream& str ) override;
1204 
1205  protected:
1209  ScrewController();
1210 
1214  virtual ~ScrewController();
1215 
1216  virtual agx::UInt getJacobian( agx::Jacobian6DOFElement* G, agx::UInt numBlocks, agx::UInt row, agx::GWriteState::Enum writeState ) override;
1217  virtual agx::UInt getViolation( agx::Real* g, agx::UInt row ) override;
1218 
1219  protected:
1221  };
1222 
1223 
1224 #ifdef SWIG
1225  %template(TwistTwistData) agx::ElementaryConstraintNData< 1, agx::TwistData >;
1226 #endif
1227 
1232  public:
1237  Twist(const agx::TwistData& data);
1238 
1240 
1241  protected:
1242  virtual void setAttachmentPair(const agx::AttachmentPair* ap) override;
1243 
1247  Twist();
1248 
1252  virtual ~Twist();
1253 
1254  virtual agx::UInt getJacobian(agx::Jacobian6DOFElement* G, agx::UInt numBlocks, agx::UInt row,
1255  agx::GWriteState::Enum writeState) override;
1256 
1257  virtual agx::UInt getViolation(agx::Real* g, agx::UInt row) override;
1258  };
1259 
1261 
1262 
1267  public:
1272  TwistRangeController(const TwistData& data);
1273 
1280  void setRange(RangeReal range);
1281 
1288  void setRange(Real min, Real max);
1289 
1294  RangeReal& getRange();
1295 
1300  const RangeReal& getRange() const;
1301 
1306  Real getCurrentAngle();
1307 
1311  virtual Bool isActive() const override;
1312 
1314 
1315  protected:
1316  virtual void setAttachmentPair(const agx::AttachmentPair* ap) override;
1317 
1322 
1326  virtual ~TwistRangeController();
1327 
1328  virtual void prepare() override;
1329  virtual agx::UInt getViolation(agx::Real* g, agx::UInt row) override;
1330  virtual agx::UInt getBounds(agx::RangeReal* bounds, agx::UInt row, agx::Real h) const override;
1331 
1335  };
1336 
1338 
1339 
1340 
1341 #ifdef SWIG
1342  %template(ConeLimit1ConeLimitData) agx::ElementaryConstraintNData< 1, agx::ConeLimitData >;
1343 #endif
1344 
1349  {
1350  public:
1355  ConeLimit(const ConeLimitData& data);
1356 
1362  void setLimitAngles(Vec2 limit);
1363 
1370  void setLimitAngles(Real a1, Real a2);
1371 
1377  void setLimitAngles(Real coneAngle);
1378 
1383  Vec2 getLimitAngles() const;
1384 
1389  Real getCurrentAngle() const;
1390 
1394  virtual Bool isActive() const override;
1395 
1399  static agx::ConeLimit* safeCast(const agx::ElementaryConstraint* coneLimit);
1400 
1402 
1403  protected:
1407  ConeLimit();
1408 
1412  virtual ~ConeLimit();
1413 
1414  virtual void prepare() override;
1415  virtual UInt getJacobian(Jacobian6DOFElement* G, UInt numBlocks, UInt row, GWriteState::Enum writeState) override;
1416  virtual agx::UInt getViolation(agx::Real* g, agx::UInt row) override;
1417  virtual agx::UInt getBounds(agx::RangeReal* bounds, agx::UInt row, agx::Real h) const override;
1418 
1421  };
1422 
1424 
1425 
1426 
1427  AGX_FORCE_INLINE RegularizationParameters* ElementaryConstraint::getRegularizationParameters( const UInt row /* = 0 */ )
1428  {
1429  agxAssert( m_rps != nullptr && row < m_numRows );
1430  return &m_rps[ row ];
1431  }
1432 
1433  AGX_FORCE_INLINE const RegularizationParameters* ElementaryConstraint::getRegularizationParameters( const UInt row /* = 0 */ ) const
1434  {
1435  agxAssert( m_rps != nullptr && row < m_numRows );
1436  return &m_rps[ row ];
1437  }
1438 
1439  AGX_FORCE_INLINE UInt ElementaryConstraint::getNumRows() const
1440  {
1441  return m_numRows;
1442  }
1443 
1444  AGX_FORCE_INLINE const ElementaryConstraint::NameType& ElementaryConstraint::getName() const
1445  {
1446  return m_name;
1447  }
1448 
1449  inline void ElementaryConstraint::linearizeCompliance(
1450  const agx::Real* /*violations*/, agx::Real* /*epsilons*/, agx::Real /*minPerturbation*/) const
1451  {
1452  }
1453 
1455  inline Referenced* ElementaryConstraint::getInternalData() const
1456  {
1457  return m_internalData;
1458  }
1460 }
1461 
1462 #ifdef _MSC_VER
1463 # pragma warning(pop)
1464 #endif
InputRef< T > in(const char *name, T &obj)
Create an object with a name and a reference to the object that should be restored (usually a pointer...
Definition: InputArchive.h:400
virtual void setAttachmentPair(const agx::AttachmentPair *ap) override
Data has to support assignment of attachment pair.
agx::ref_ptr< Dot1 > Dot1Ref
agx::ref_ptr< ConeLimit > ConeLimitRef
Class to hold data for elementary constraints.
Solver callback class for elementary FrictionController.
Data holder class for elementary constraint QuatLock.
AGXFMI_EXPORT InputVariable_Real * setCompliance(agx::Constraint *constraint)
OutputRef< Serializable > out(const char *name, const Serializable *obj)
Return an object that contain the name and the object that should be serialized to an archive...
Vec3T< T > min(const Vec3T< T > &lhs, const Vec3T< T > &rhs)
Definition: Vec3Template.h:861
Elementary constraint base class with interface and global constraint functionality.
Vec3T< T > max(const Vec3T< T > &lhs, const Vec3T< T > &rhs)
Definition: Vec3Template.h:855
int32_t Int32
Definition: Integer.h:45
agx::ref_ptr< Twist > TwistRef
Implementation of a electric motor controller.
bool Bool
Definition: Integer.h:48
Spherical elementary constraint: Two points in world coincide.
agx::ref_ptr< ElectricMotorController > ElectricMotorControllerRef
Elementary secondary constraint to set a conic limit to a BallJoint.
Helper class to hold data that is general for elementary constraints.
#define AGXPHYSICS_EXPORT
agx::ref_ptr< FrictionController > FrictionControllerRef
Basic data holder class for "angle based" (secondary) constraints.
Representation of a name string.
Definition: Name.h:32
#define AGX_FORCE_INLINE
Definition: Object.h:59
Translational or rotational friction controller for Hinge, Prismatic and CylindricalJoint.
agx::ref_ptr< QuatLock > QuatLockRef
ElementaryConstraintN(agx::Bool enable)
Construct given enable flag.
ElementaryConstraintNData(const DataT &data, agx::Bool enable)
Construct given data and enable flag.
Base class providing referencing counted objects.
Definition: Referenced.h:119
agx::ref_ptr< TwistRangeController > TwistRangeControllerRef
agx::RegularizationParameters * m_rps
regularization parameters
Elementary secondary constraint to keep constraint angle at a given target position.
Templated vector class.
Definition: Vector.h:52
Constraint solver callback interface with context and start rows for context.
agx::Vector< agx::ref_ptr< agx::ElementaryConstraint > > RefContainer
uint32_t UInt
Definition: Integer.h:34
Constraint attachment pair class.
Definition: Attachment.h:300
Vector containing &#39;raw&#39; data.
Definition: Vector.h:245
agx::ref_ptr< LockController > LockControllerRef
Base class for constraint angle based elementary constraints (secondary constraints).
Twist range elementary constraint.
Elementary secondary constraint to keep constraint angle within two given values. ...
agx::ref_ptr< Swing > SwingRef
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Swing elementary constraint: Two orthogonal vectors with hookean behaviour.
Data holder class for elementary swing constraint.
Dot1 elementary constraint: Two orthogonal vectors.
agx::ref_ptr< Spherical > SphericalRef
Data holder class for elementary constraint Twist.
Basic data holder class for cone limit constraint data.
Data holder class for elementary constraint Dot2.
agx::Real * m_lfs
last forces
#define agxAssert(expr)
Definition: debug.h:143
agx::ref_ptr< TargetSpeedController > TargetSpeedControllerRef
ElementaryConstraintN()
Used during serialization restore.
Internal data for any object, ObjT, with methods: agx::Referenced* ObjT::getInternalData() const; voi...
Definition: InternalData.h:32
agx::ref_ptr< RangeController > RangeControllerRef
#define CALLABLE
Definition: Object.h:73
Locks the three rotational degrees of freedom (relative coordinates).
Class for reading a binary stream of serialized data.
Definition: InputArchive.h:51
agx::VectorPOD< agx::ElementaryConstraint *> PtrContainer
agx::UInt m_numRows
number of rows
Abstract base class for storing/restoring a line/drums with version control.
Definition: StorageStream.h:48
All ghost variables have compliance and damping attributes.
AGXFMI_EXPORT InputVariable_Real * setDamping(agx::Constraint *constraint)
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
Definition: Serializable.h:207
Elementary secondary constraint to drive something given target speed (translational or rotational)...
agx::ref_ptr< SphericalRel > SphericalRelRef
Class for writing serialized data in binary format to a stream.
Definition: OutputArchive.h:56
#define AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE(T)
Use this in a pure abstract Serializable class to add the required methods Important: Use full namesp...
Definition: Serializable.h:221
Dot2 elementary constraint: Separation vector orthogonal to direction vector.
agx::ElementaryConstraint::NameType m_name
name
Type
Type, i.e., defines Axis as &#39;along&#39; or &#39;about&#39;.
uint16_t UInt16
Definition: Integer.h:39
Twist elementary constraint.
Data holder class for elementary constraint Dot1.
double Real
Definition: Real.h:42
This namespace contain classes for streaming classes into archives, ASCII, binary for storage (serial...
agx::SetVector< ref_ptr< FrictionController > > FrictionControllerRefSetVector
agx::ref_ptr< agx::Referenced > m_internalData
custom, internal data
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: Object.h:98
This class is a combined container which has the find complexity of a HashTable, deterministic iterat...
Definition: SetVector.h:37
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: Object.h:97
agx::ref_ptr< Dot2 > Dot2Ref
agx::RangeReal * m_ubs
user bounds
Spherical elementary constraint: Two points in world coincide.