27 # pragma warning(push) 28 # pragma warning(disable: 6011) // Disable warningC6011: dereferencing nullptr pointer 41 class ConstraintNlmcpCallback;
46 enum Enum {
NORMAL, IGNORE_FIRST, WRITE_SECOND_FIRST };
86 void setElasticity(
agx::Real elasticity,
int row);
164 const agx::Real* getCurrentForces()
const;
177 virtual void setEnable(
agx::Bool enable );
194 virtual void prepare();
350 agx::Referenced* getInternalData() const;
355 void setInternalData(
agx::Referenced* data );
376 : ElementaryConstraint( enable, N, m_regParams, m_forces, m_bounds ) {}
383 : ElementaryConstraint( false, N, m_regParams, m_forces, m_bounds ) {}
396 template< agx::UInt N,
typename DataT >
411 const DataT&
getData()
const {
return m_data; }
494 agx::GWriteState::Enum writeState)
override;
692 agx::GWriteState::Enum writeState )
override;
700 agx::GWriteState::Enum writeState,
750 void setLockedAtZeroSpeed(
agx::Bool lockedAtZeroSpeed );
775 enum InternalState { NONE = 0, LOCKED = (1<<0), LOCKED_AT_ZERO_SPEED = (1<<1) };
791 void adjustToCurrentState();
832 void setFrictionCoefficient(
agx::Real frictionCoefficient );
837 agx::Real getFrictionCoefficient()
const;
852 void setEnableNonLinearDirectSolveUpdate(
agx::Bool enable );
857 agx::Bool getEnableNonLinearDirectSolveUpdate()
const;
873 virtual agx::Bool isActive()
const override;
918 using Flags = agx::BitState<Flag, agx::UInt16>;
924 Real m_frictionCoefficient;
925 Real m_lastNormalForce;
964 void setArmatureResistance(
agx::Real armatureResistance );
976 void setTorqueConstant(
agx::Real torqueConstant );
1015 virtual void prepare()
override;
1066 virtual agx::Bool isActive()
const override;
1096 virtual void prepare()
override;
1255 agx::GWriteState::Enum writeState)
override;
1306 Real getCurrentAngle();
1311 virtual Bool isActive()
const override;
1328 virtual void prepare()
override;
1362 void setLimitAngles(
Vec2 limit);
1370 void setLimitAngles(
Real a1,
Real a2);
1377 void setLimitAngles(
Real coneAngle);
1383 Vec2 getLimitAngles()
const;
1389 Real getCurrentAngle()
const;
1394 virtual Bool isActive()
const override;
1414 virtual void prepare()
override;
1429 agxAssert( m_rps !=
nullptr && row < m_numRows );
1430 return &m_rps[ row ];
1435 agxAssert( m_rps !=
nullptr && row < m_numRows );
1436 return &m_rps[ row ];
1449 inline void ElementaryConstraint::linearizeCompliance(
1455 inline Referenced* ElementaryConstraint::getInternalData()
const 1457 return m_internalData;
1463 # pragma warning(pop)
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...
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)
Elementary constraint base class with interface and global constraint functionality.
Vec3T< T > max(const Vec3T< T > &lhs, const Vec3T< T > &rhs)
agx::ref_ptr< Twist > TwistRef
Implementation of a electric motor controller.
agx::Real m_armatureResistance
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
const DataT & getData() const
agx::ref_ptr< FrictionController > FrictionControllerRef
agx::Bool m_enable
enabled
Basic data holder class for "angle based" (secondary) constraints.
Representation of a name string.
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.
agx::ref_ptr< TwistRangeController > TwistRangeControllerRef
agx::RegularizationParameters * m_rps
regularization parameters
Elementary secondary constraint to keep constraint angle at a given target position.
Constraint solver callback interface with context and start rows for context.
agx::Vector< agx::ref_ptr< agx::ElementaryConstraint > > RefContainer
Constraint attachment pair class.
ElementaryConstraintNData()
Vector containing 'raw' data.
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
agx::Real m_torqueConstant
agx::ref_ptr< TargetSpeedController > TargetSpeedControllerRef
ElementaryConstraintN()
Used during serialization restore.
Internal data for any object, ObjT, with methods: agx::Referenced* ObjT::getInternalData() const; voi...
agx::ref_ptr< RangeController > RangeControllerRef
Locks the three rotational degrees of freedom (relative coordinates).
agx::VectorPOD< agx::ElementaryConstraint *> PtrContainer
agx::UInt m_numRows
number of rows
Abstract base class for storing/restoring a line/drums with version control.
agx::Int32 m_internalState
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...
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.
#define AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE(T)
Use this in a pure abstract Serializable class to add the required methods Important: Use full namesp...
Dot2 elementary constraint: Separation vector orthogonal to direction vector.
agx::ElementaryConstraint::NameType m_name
name
Type
Type, i.e., defines Axis as 'along' or 'about'.
Twist elementary constraint.
Data holder class for elementary constraint Dot1.
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()
This class is a combined container which has the find complexity of a HashTable, deterministic iterat...
#define DOXYGEN_START_INTERNAL_BLOCK()
agx::ref_ptr< Dot2 > Dot2Ref
agx::RangeReal * m_ubs
user bounds
Spherical elementary constraint: Two points in world coincide.