 |
AGX Dynamics
2.38.0.2
|
Go to the documentation of this file.
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();
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;
1430 return &
m_rps[ row ];
1436 return &
m_rps[ row ];
1457 return m_internalData;
1463 # pragma warning(pop)
Basic data holder class for "angle based" (secondary) constraints.
All ghost variables have compliance and damping attributes.
Elementary constraint base class with interface and global constraint functionality.
agx::ref_ptr< TargetSpeedController > TargetSpeedControllerRef
Data holder class for elementary swing constraint.
Translational or rotational friction controller for Hinge, Prismatic and CylindricalJoint.
Dot2 elementary constraint: Separation vector orthogonal to direction vector.
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.
agx::SetVector< ref_ptr< FrictionController > > FrictionControllerRefSetVector
Flags
Flags for specifying what is enabled in the debug rendering system.
Class to hold data for elementary constraints.
#define DOXYGEN_END_INTERNAL_BLOCK()
agx::ref_ptr< SphericalRel > SphericalRelRef
agx::Real m_armatureResistance
Spherical elementary constraint: Two points in world coincide.
agx::ref_ptr< ElectricMotorController > ElectricMotorControllerRef
#define DOXYGEN_START_INTERNAL_BLOCK()
Elementary secondary constraint to drive something given target speed (translational or rotational).
ElementaryConstraintN()
Used during serialization restore.
AGXFMI_EXPORT InputVariable_Real * setCompliance(agx::Constraint *constraint)
Abstract base class for storing/restoring a line/drums with version control.
agx::UInt m_numRows
number of rows
Elementary secondary constraint to keep constraint angle at a given target position.
#define AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE(T)
Use this in a pure abstract Serializable class to add the required methods Important: Use full namesp...
agx::ref_ptr< Dot1 > Dot1Ref
Base class for constraint angle based elementary constraints (secondary constraints).
agx::RegularizationParameters * m_rps
regularization parameters
Type
Type, i.e., defines Axis as 'along' or 'about'.
ElementaryConstraintNData(const DataT &data, agx::Bool enable)
Construct given data and enable flag.
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
Constraint attachment pair class.
Vector containing 'raw' data.
Data holder class for elementary constraint QuatLock.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
#define AGXPHYSICS_EXPORT
Swing elementary constraint: Two orthogonal vectors with hookean behaviour.
agx::ref_ptr< Twist > TwistRef
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...
Internal data for any object, ObjT, with methods: agx::Referenced* ObjT::getInternalData() const; voi...
agx::ref_ptr< QuatLock > QuatLockRef
ElementaryConstraintNData()
This class is a combined container which has the find complexity of a HashTable, deterministic iterat...
agx::VectorPOD< agx::ElementaryConstraint * > PtrContainer
const DataT & getData() const
agx::ref_ptr< ConeLimit > ConeLimitRef
Elementary secondary constraint to keep constraint angle within two given values.
Constraint solver callback interface with context and start rows for context.
Vec3T< T > min(const Vec3T< T > &lhs, const Vec3T< T > &rhs)
agx::ref_ptr< LockController > LockControllerRef
agx::Vector< agx::ref_ptr< agx::ElementaryConstraint > > RefContainer
Twist range elementary constraint.
Locks the three rotational degrees of freedom (relative coordinates).
agx::Bool m_enable
enabled
agx::Real * m_lfs
last forces
agx::Real m_torqueConstant
agx::RegularizationParameters * getRegularizationParameters(const agx::UInt row=0)
const agx::ElementaryConstraint::NameType & getName() const
Representation of a name string.
Class for writing serialized data in binary format to a stream.
agx::ref_ptr< TwistRangeController > TwistRangeControllerRef
Elementary secondary constraint to set a conic limit to a BallJoint.
agx::ref_ptr< Spherical > SphericalRef
Helper class to hold data that is general for elementary constraints.
Spherical elementary constraint: Two points in world coincide.
Data holder class for elementary constraint Dot2.
Implementation of a electric motor controller.
agx::ref_ptr< FrictionController > FrictionControllerRef
Base class providing referencing counted objects.
void setDamping(agx::Real damping, int row)
Assign damping for a given row, or all rows if row = -1 (default).
Solver callback class for elementary FrictionController.
void setCompliance(agx::Real compliance, int row)
Assign compliance for a given row, or all rows if row = -1 (default).
Data holder class for elementary constraint Twist.
This namespace contain classes for streaming classes into archives, ASCII, binary for storage (serial...
AGXFMI_EXPORT InputVariable_Real * setDamping(agx::Constraint *constraint)
virtual void setAttachmentPair(const agx::AttachmentPair *ap) override
Data has to support assignment of attachment pair.
agx::RangeReal * m_ubs
user bounds
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...
Basic data holder class for cone limit constraint data.
Vec3T< T > max(const Vec3T< T > &lhs, const Vec3T< T > &rhs)
agx::ElementaryConstraint::NameType m_name
name
Dot1 elementary constraint: Two orthogonal vectors.
Data holder class for elementary constraint Dot1.
agx::ref_ptr< RangeController > RangeControllerRef
agx::ref_ptr< Swing > SwingRef
agx::ref_ptr< Dot2 > Dot2Ref
ElementaryConstraintN(agx::Bool enable)
Construct given enable flag.
agx::Int32 m_internalState
Twist elementary constraint.
agx::UInt getNumRows() const
agx::ref_ptr< agx::Referenced > m_internalData
custom, internal data