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 );
367 template< agx::
UInt N >
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;
959 void setArmatureResistance(
agx::Real armatureResistance );
971 void setTorqueConstant(
agx::Real torqueConstant );
1010 virtual void prepare()
override;
1061 virtual agx::Bool isActive()
const override;
1091 virtual void prepare()
override;
1250 agx::GWriteState::Enum writeState)
override;
1259 agxAssert( m_rps !=
nullptr && row < m_numRows );
1260 return &m_rps[ row ];
1265 agxAssert( m_rps !=
nullptr && row < m_numRows );
1266 return &m_rps[ row ];
1287 return m_internalData;
1293 # 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...
agx::RegularizationParameters * getRegularizationParameters(const agx::UInt row=0)
virtual void setAttachmentPair(const agx::AttachmentPair *ap) override
Data has to support assignment of attachment pair.
agx::ref_ptr< Dot1 > Dot1Ref
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)
virtual void linearizeCompliance(const agx::Real *violations, agx::Real *epsilons, agx::Real minPerturbation) const
Modify epsilon so that this ElementaryConstraint appear to be linear in the "normal" deformantion spa...
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...
Elementary constraint base class with interface and global constraint functionality.
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
Helper class to hold data that is general for elementary constraints.
#define AGXPHYSICS_EXPORT
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::RegularizationParameters * m_rps
regularization parameters
agx::UInt getNumRows() const
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
const DataT & getData() const
Constraint attachment pair class.
ElementaryConstraintNData()
Vector containing 'raw' data.
agx::ref_ptr< LockController > LockControllerRef
Base class for constraint angle based elementary constraints (secondary constraints).
Elementary secondary constraint to keep constraint angle within two given values. ...
agx::ref_ptr< Swing > SwingRef
Swing elementary constraint: Two orthogonal vectors with hookean behaviour.
Data holder class for elementary swing constraint.
void setDamping(agx::Real damping, int row)
Assign damping for a given row, or all rows if row = -1 (default).
Dot1 elementary constraint: Two orthogonal vectors.
agx::ref_ptr< Spherical > SphericalRef
Data holder class for elementary constraint Twist.
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.
void setCompliance(agx::Real compliance, int row)
Assign compliance for a given row, or all rows if row = -1 (default).
#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.
agx::ref_ptr< agx::Referenced > m_internalData
custom, internal data
#define DOXYGEN_END_INTERNAL_BLOCK()
const agx::ElementaryConstraint::NameType & getName() const
#define DOXYGEN_START_INTERNAL_BLOCK()
agx::ref_ptr< Dot2 > Dot2Ref
agx::RangeReal * m_ubs
user bounds
Flags
Flags for specifying what is enabled in the debug rendering system.
Spherical elementary constraint: Two points in world coincide.