AGX Dynamics 2.42.3.1
Loading...
Searching...
No Matches
agx::SwingData Class Reference

Data holder class for elementary swing constraint. More...

#include <ElementaryConstraintData.h>

+ Inheritance diagram for agx::SwingData:

Public Member Functions

 SwingData ()
 Default constructor used during restore of this object.
 
 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.
 
virtual ~SwingData ()
 Destructor.
 
const agx::Vec3 & getDir1N () const
 
const agx::Vec3 & getDir1U () const
 
const agx::Vec3 & getDir1V () const
 
const agx::Vec3 & getDir2N () const
 
agx::Real getSwingAngle () const
 
agx::Vec3 getSwingAxis () const
 
virtual void restore (agxStream::InputArchive &in) override
 Restore data from stream.
 
virtual void store (agxStream::OutputArchive &out) const override
 Store data to stream.
 
- Public Member Functions inherited from agx::ElementaryConstraintData
 ElementaryConstraintData ()
 Used during serialization restore.
 
 ElementaryConstraintData (const agx::AttachmentPair *ap)
 Construct given attachment pair.
 
virtual ~ElementaryConstraintData ()
 Destructor.
 
const agx::Attachment * getAttachment (agx::UInt index) const
 
const agx::AttachmentPair * getAttachmentPair () const
 
const agx::Vec3 & getCmToAnchorPosition (agx::UInt index) const
 
const agx::Vec3 & getSeparation () const
 
const agx::Vec3 & getWorldToAnchorPosition (agx::UInt index) const
 
virtual void restore (agxStream::InputArchive &in)
 Restore from stream.
 
virtual void set (const agx::AttachmentPair *ap)
 Assign new attachment pair.
 
virtual void store (agxStream::OutputArchive &out) const
 Store to stream.
 

Protected Attributes

agx::Attachment::Transformed m_dir1N
 
agx::Attachment::Transformed m_dir1U
 
agx::Attachment::Transformed m_dir1V
 
agx::Attachment::Transformed m_dir2N
 
- Protected Attributes inherited from agx::ElementaryConstraintData
const agx::AttachmentPair * m_ap
 

Detailed Description

Data holder class for elementary swing constraint.

Definition at line 481 of file ElementaryConstraintData.h.

Constructor & Destructor Documentation

◆ SwingData() [1/2]

agx::SwingData::SwingData ( )

Default constructor used during restore of this object.

◆ SwingData() [2/2]

Construct given attachment pair and the two directions that should be orthogonal.

Parameters
ap- constraint attachment pair
dir1U- direction reference attachment 1
dir1V- direction reference attachment 1
dir1N- direction reference attachment 1
dir2N- direction reference attachment 2

◆ ~SwingData()

virtual agx::SwingData::~SwingData ( )
virtual

Destructor.

Member Function Documentation

◆ getDir1N()

const agx::Vec3 & agx::SwingData::getDir1N ( ) const
inline
Returns
direction reference attachment N of frame 1.

Definition at line 523 of file ElementaryConstraintData.h.

◆ getDir1U()

const agx::Vec3 & agx::SwingData::getDir1U ( ) const
inline
Returns
direction reference attachment U of frame 1.

Definition at line 507 of file ElementaryConstraintData.h.

◆ getDir1V()

const agx::Vec3 & agx::SwingData::getDir1V ( ) const
inline
Returns
direction reference attachment V of frame 1.

Definition at line 515 of file ElementaryConstraintData.h.

◆ getDir2N()

const agx::Vec3 & agx::SwingData::getDir2N ( ) const
inline
Returns
direction reference attachment N of frame 2.

Definition at line 531 of file ElementaryConstraintData.h.

◆ getSwingAngle()

agx::Real agx::SwingData::getSwingAngle ( ) const
inline
Returns
swing angle theta

Definition at line 547 of file ElementaryConstraintData.h.

References agx::clamp().

◆ getSwingAxis()

agx::Vec3 agx::SwingData::getSwingAxis ( ) const
inline
Returns
swing axis

Definition at line 539 of file ElementaryConstraintData.h.

References agx::Vec3T< T >::getPerpendicularUnitVector().

◆ restore()

virtual void agx::SwingData::restore ( agxStream::InputArchive &  in)
overridevirtual

Restore data from stream.

Reimplemented from agx::ElementaryConstraintData.

◆ store()

virtual void agx::SwingData::store ( agxStream::OutputArchive &  out) const
overridevirtual

Store data to stream.

Reimplemented from agx::ElementaryConstraintData.

Member Data Documentation

◆ m_dir1N

agx::Attachment::Transformed agx::SwingData::m_dir1N
protected

Definition at line 565 of file ElementaryConstraintData.h.

◆ m_dir1U

agx::Attachment::Transformed agx::SwingData::m_dir1U
protected

Definition at line 563 of file ElementaryConstraintData.h.

◆ m_dir1V

agx::Attachment::Transformed agx::SwingData::m_dir1V
protected

Definition at line 564 of file ElementaryConstraintData.h.

◆ m_dir2N

agx::Attachment::Transformed agx::SwingData::m_dir2N
protected

Definition at line 566 of file ElementaryConstraintData.h.


The documentation for this class was generated from the following file: