17#ifndef AGX_ELEMENTARYCONSTRAINTDATA_H
18#define AGX_ELEMENTARYCONSTRAINTDATA_H
24# pragma warning(disable: 6011)
509 return getAttachment( 0 )->get( m_dir1U );
517 return getAttachment( 0 )->get( m_dir1V );
525 return getAttachment( 0 )->get( m_dir1N );
533 return getAttachment( 1 )->get( m_dir2N );
626 return getAttachment( 0 )->get( m_dir1 );
634 return getAttachment( 1 )->get( m_dir2 );
#define AGXPHYSICS_EXPORT
Class for writing serialized data in binary format to a stream.
virtual const agx::Vec3 & getDir(const agx::AttachmentPair &ap, agx::UInt index) const
Custom data for separation pair.
Constraint attachment pair class.
Constraint attachment base class for any type of frame.
Transformed
Data access enum.
Implementation of angle for the cone limit.
Basic data holder class for cone limit constraint data.
void setConeLimitValue(Vec2 limit)
Set the limit angles of the cone limit.
agx::ref_ptr< agx::ConeLimitAngle > ConeLimitAngleRef
ConeLimitData(const agx::AttachmentPair *ap, agx::ConeLimitAngle *angle)
Construct given constraint attachment pair and the input angle for the elementary constraint to work ...
ConeLimitData()
Default constructor used during restore of this object.
virtual void restore(agxStream::InputArchive &in) override
Restore data from stream.
virtual void store(agxStream::OutputArchive &out) const override
Store data to stream.
virtual ~ConeLimitData()
Destructor.
Vec2 getConeLimitValue() const
Get the limit angles of the cone limit.
Basic data holder class for "angle based" (secondary) constraints.
const agx::Vec3 & getDir1() const
virtual void store(agxStream::OutputArchive &out) const override
Store data to stream.
ConstraintAngleBasedData(const agx::AttachmentPair *ap, agx::Angle *angle)
Construct given constraint attachment pair and the input angle for the elementary constraint to work ...
virtual ~ConstraintAngleBasedData()
Destructor.
const agx::Angle * getAngle() const
virtual void restore(agxStream::InputArchive &in) override
Restore data from stream.
const agx::Vec3 & getDir2() const
ConstraintAngleBasedData()
Default constructor used during restore of this object.
Data holder class for elementary constraint Dot1.
const agx::Vec3 & getDir2() const
virtual void store(agxStream::OutputArchive &out) const override
Store data to stream.
const agx::Vec3 & getDir1() const
agx::Attachment::Transformed m_dir2
virtual ~Dot1Data()
Destructor.
agx::Attachment::Transformed m_dir1
virtual void restore(agxStream::InputArchive &in) override
Restore data from stream.
Dot1Data(const agx::AttachmentPair *ap, agx::Attachment::Transformed dir1, agx::Attachment::Transformed dir2)
Construct given attachment pair and the two directions that should be orthogonal.
Dot1Data()
Default constructor used during restore of this object.
Extended Dot1Data with additional slack parameter.
void setSlack(agx::Real slack)
Set amount of slack in constraint.
virtual void restore(agxStream::InputArchive &in) override
Restore data from stream.
virtual void store(agxStream::OutputArchive &out) const override
Store data to stream.
Dot1SlackData(const agx::AttachmentPair *ap, agx::Attachment::Transformed dir1, agx::Attachment::Transformed dir2)
agx::Real getSlack() const
Dot1SlackData()
Default constructor.
Data holder class for elementary constraint Dot2.
Dot2Data()
Default constructor used during restore of this object.
virtual ~Dot2Data()
Destructor.
virtual void store(agxStream::OutputArchive &out) const override
Store data to stream.
virtual agx::Int getReferenceBody() const
Dot2Data(const agx::AttachmentPair *ap, agx::Attachment::Transformed dir, agx::Int body=0)
Construct given constraint attachment pair and direction to be orthogonal to the separation vector.
virtual void restore(agxStream::InputArchive &in) override
Restore data from stream.
const agx::Vec3 & getDir() const
agx::Attachment::Transformed m_dir
Data holder class for elementary constraint Dot2Slack.
void setSlack(agx::Real slack)
virtual void store(agxStream::OutputArchive &out) const override
Store data to stream.
virtual void restore(agxStream::InputArchive &in) override
Restore data from stream.
Dot2SlackData()
Default constructor used during restore of this object.
agx::Real getSlack() const
Dot2SlackData(const agx::AttachmentPair *ap, agx::Attachment::Transformed dir)
Construct given constraint attachment pair and direction to be orthogonal to the separation vector.
virtual ~Dot2SlackData()
Destructor.
Class to hold data for elementary constraints.
ElementaryConstraintData()
Used during serialization restore.
virtual ~ElementaryConstraintData()
Destructor.
virtual void restore(agxStream::InputArchive &in)
Restore from stream.
const agx::AttachmentPair * m_ap
ElementaryConstraintData(const agx::AttachmentPair *ap)
Construct given attachment pair.
const agx::Vec3 & getSeparation() const
const agx::AttachmentPair * getAttachmentPair() const
const agx::Vec3 & getCmToAnchorPosition(agx::UInt index) const
const agx::Attachment * getAttachment(agx::UInt index) const
virtual void store(agxStream::OutputArchive &out) const
Store to stream.
const agx::Vec3 & getWorldToAnchorPosition(agx::UInt index) const
virtual void set(const agx::AttachmentPair *ap)
Assign new attachment pair.
Data holder class for elementary constraint QuatLock.
virtual ~QuatLockData()
Destructor.
virtual void restore(agxStream::InputArchive &in) override
Restore data from stream.
void set(const agx::AttachmentPair *ap) override
Associate attachment pair to this object, for this object to register QuatTransformer as attachment p...
virtual void store(agxStream::OutputArchive &out) const override
Store data to stream.
QuatTransformerRef m_qTransformer
agx::ref_ptr< QuatTransformer > QuatTransformerRef
QuatLockData()
Default constructor used during restore of this object.
QuatLockData(const agx::AttachmentPair *ap)
Construct given attachment pair.
Generic class for holding constraint data including 3 slack parameters.
void setSlack(agx::Vec3 slack)
const agx::Vec3 getSlack() const
virtual ~Slack3ConstraintData()
virtual void restore(agxStream::InputArchive &in) override
Restore from stream.
Slack3ConstraintData(const agx::AttachmentPair *ap)
virtual void store(agxStream::OutputArchive &out) const override
Store to stream.
Data holder class for elementary swing constraint.
agx::Vec3 getSwingAxis() const
virtual ~SwingData()
Destructor.
const agx::Vec3 & getDir2N() const
virtual void store(agxStream::OutputArchive &out) const override
Store data to stream.
agx::Attachment::Transformed m_dir1U
virtual void restore(agxStream::InputArchive &in) override
Restore data from stream.
SwingData(const agx::AttachmentPair *ap, agx::Attachment::Transformed dir1U, agx::Attachment::Transformed dir1V, agx::Attachment::Transformed dir1N, agx::Attachment::Transformed dir2N)
Construct given attachment pair and the two directions that should be orthogonal.
SwingData()
Default constructor used during restore of this object.
agx::Real getSwingAngle() const
const agx::Vec3 & getDir1V() const
agx::Attachment::Transformed m_dir2N
const agx::Vec3 & getDir1N() const
agx::Attachment::Transformed m_dir1N
const agx::Vec3 & getDir1U() const
agx::Attachment::Transformed m_dir1V
Data holder class for elementary constraint Twist.
TwistData()
Default constructor used during restore of this object.
virtual void restore(agxStream::InputArchive &in) override
Restore data from stream.
virtual void store(agxStream::OutputArchive &out) const override
Store data to stream.
const agx::Vec3 & getDir1() const
agx::Attachment::Transformed m_dir2
agx::Attachment::Transformed m_dir1
const agx::Vec3 & getDir2() const
TwistData(const agx::AttachmentPair *ap, agx::Attachment::Transformed dir1, agx::Attachment::Transformed dir2)
Construct given attachment pair.
virtual ~TwistData()
Destructor.
Vec3T getPerpendicularUnitVector() const
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Real getAngle(const Vec3 &a, const Vec3 &b, const Vec3 &c)
a and b should be orthogonal
T1 clamp(T1 v, T2 minimum, T3 maximum)