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

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

#include <ElementaryConstraintData.h>

+ Inheritance diagram for agx::QuatLockData:

Classes

class  QuatTransformer
 The class holding the actual data and that transforms the data. More...
 

Public Types

typedef agx::ref_ptr
< QuatTransformer > 
QuatTransformerRef
 

Public Member Functions

 QuatLockData ()
 Default constructor used during restore of this object. More...
 
 QuatLockData (const agx::AttachmentPair *ap)
 Construct given attachment pair. More...
 
virtual ~QuatLockData ()
 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 & 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
 
QuatTransformerRef m_qTransformer
 

Detailed Description

Data holder class for elementary constraint QuatLock.

Definition at line 336 of file ElementaryConstraintData.h.

Member Typedef Documentation

Constructor & Destructor Documentation

agx::QuatLockData::QuatLockData ( )

Default constructor used during restore of this object.

agx::QuatLockData::QuatLockData ( const agx::AttachmentPair *  ap)

Construct given attachment pair.

Parameters
ap- constraint attachment pair
virtual agx::QuatLockData::~QuatLockData ( )
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::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
inline
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)
inline
Returns
the quaternion with index i < 3

Definition at line 409 of file ElementaryConstraintData.h.

References agxAssert.

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

Restore data from stream.

Reimplemented from agx::ElementaryConstraintData.

Reimplemented in agx::TwistData.

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

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::QuatLockData::store ( agxStream::OutputArchive &  out) const
overridevirtual

Store data to stream.

Reimplemented from agx::ElementaryConstraintData.

Reimplemented in agx::TwistData.

Member Data Documentation

const agx::AttachmentPair* agx::ElementaryConstraintData::m_ap
protectedinherited
QuatTransformerRef agx::QuatLockData::m_qTransformer
protected

Definition at line 422 of file ElementaryConstraintData.h.


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