AGXDynamics  2.31.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
agx::TwistData Class Reference

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

#include <ElementaryConstraintData.h>

+ Inheritance diagram for agx::TwistData:

Public Types

typedef agx::ref_ptr
< QuatTransformer > 
QuatTransformerRef
 

Public Member Functions

 TwistData ()
 Default constructor used during restore of this object. More...
 
 TwistData (const agx::AttachmentPair *ap, agx::Attachment::Transformed dir1, agx::Attachment::Transformed dir2)
 Construct given attachment pair. More...
 
virtual ~TwistData ()
 Destructor. More...
 
const agx::Attachment * getAttachment (agx::UInt index) const
 
const agx::AttachmentPair * getAttachmentPair () const
 
const agx::Vec3 & getCmToAnchorPosition (agx::UInt index) const
 
const agx::Vec3 & getDir1 () const
 
const agx::Vec3 & getDir2 () const
 
const agx::Vec3 & getSeparation () const
 
const agx::Vec3 & getWorldToAnchorPosition (agx::UInt index) const
 
const agx::Quat & operator[] (agx::UInt i) const
 
agx::Quat & operator[] (agx::UInt i)
 
virtual void restore (agxStream::InputArchive &in) override
 Restore data from stream. More...
 
void set (const agx::AttachmentPair *ap) override
 Associate attachment pair to this object, for this object to register QuatTransformer as attachment pair custom data. More...
 
virtual void store (agxStream::OutputArchive &out) const override
 Store data to stream. More...
 

Protected Attributes

const agx::AttachmentPair * m_ap
 
agx::Attachment::Transformed m_dir1
 
agx::Attachment::Transformed m_dir2
 
QuatTransformerRef m_qTransformer
 

Detailed Description

Data holder class for elementary constraint Twist.

Definition at line 594 of file ElementaryConstraintData.h.

Member Typedef Documentation

Constructor & Destructor Documentation

agx::TwistData::TwistData ( )

Default constructor used during restore of this object.

agx::TwistData::TwistData ( const agx::AttachmentPair *  ap,
agx::Attachment::Transformed  dir1,
agx::Attachment::Transformed  dir2 
)

Construct given attachment pair.

Parameters
ap- constraint attachment pair
virtual agx::TwistData::~TwistData ( )
virtual

Destructor.

Member Function Documentation

const agx::Attachment* agx::ElementaryConstraintData::getAttachment ( agx::UInt  index) const
inlineinherited
Parameters
index- index of the attachment (0 or 1)
Returns
the constraint attachment for attachment with index index

Definition at line 67 of file ElementaryConstraintData.h.

References agxAssert.

const agx::AttachmentPair* agx::ElementaryConstraintData::getAttachmentPair ( ) const
inlineinherited
Returns
the attachment pair

Definition at line 61 of file ElementaryConstraintData.h.

References agxAssert.

const agx::Vec3& agx::ElementaryConstraintData::getCmToAnchorPosition ( agx::UInt  index) const
inlineinherited
Returns
the vector going from center of mass to the constraint anchor point given index (0 or 1)

Definition at line 77 of file ElementaryConstraintData.h.

References agxAssert, and agx::Attachment::CM_TO_ANCHOR_POS.

const agx::Vec3& agx::TwistData::getDir1 ( ) const
inline
Returns
direction reference attachment 1

Definition at line 627 of file ElementaryConstraintData.h.

const agx::Vec3& agx::TwistData::getDir2 ( ) const
inline
Returns
direction reference attachment 2

Definition at line 635 of file ElementaryConstraintData.h.

const agx::Vec3& agx::ElementaryConstraintData::getSeparation ( ) const
inlineinherited
Returns
the separation vector between the two attachments (att1->pos - att2->pos)

Definition at line 72 of file ElementaryConstraintData.h.

References agxAssert, and agx::AttachmentPair::SEPARATION.

const agx::Vec3& agx::ElementaryConstraintData::getWorldToAnchorPosition ( agx::UInt  index) const
inlineinherited
Returns
the constraint anchor point in world coordinates given index (0 or 1)

Definition at line 82 of file ElementaryConstraintData.h.

References agxAssert, and agx::Attachment::ANCHOR_POS.

const agx::Quat& agx::QuatLockData::operator[] ( agx::UInt  i) const
inlineinherited
Returns
the quaternion with index i < 3

Definition at line 404 of file ElementaryConstraintData.h.

References agxAssert.

agx::Quat& agx::QuatLockData::operator[] ( agx::UInt  i)
inlineinherited
Returns
the quaternion with index i < 3

Definition at line 409 of file ElementaryConstraintData.h.

References agxAssert.

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

Restore data from stream.

Reimplemented from agx::QuatLockData.

void agx::QuatLockData::set ( const agx::AttachmentPair *  ap)
overridevirtualinherited

Associate attachment pair to this object, for this object to register QuatTransformer as attachment pair custom data.

Parameters
ap- the constraint attachment pair

Reimplemented from agx::ElementaryConstraintData.

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

Store data to stream.

Reimplemented from agx::QuatLockData.

Member Data Documentation

const agx::AttachmentPair* agx::ElementaryConstraintData::m_ap
protectedinherited
agx::Attachment::Transformed agx::TwistData::m_dir1
protected

Definition at line 641 of file ElementaryConstraintData.h.

agx::Attachment::Transformed agx::TwistData::m_dir2
protected

Definition at line 642 of file ElementaryConstraintData.h.

QuatTransformerRef agx::QuatLockData::m_qTransformer
protectedinherited

Definition at line 422 of file ElementaryConstraintData.h.


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