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

Basic data holder class for "angle based" (secondary) constraints. More...

#include <ElementaryConstraintData.h>

+ Inheritance diagram for agx::ConstraintAngleBasedData:

Public Member Functions

 ConstraintAngleBasedData ()
 Default constructor used during restore of this object. More...
 
 ConstraintAngleBasedData (const agx::AttachmentPair *ap, const agx::Angle *angle)
 Construct given constraint attachment pair and the input angle for the elementary constraint to work on. More...
 
virtual ~ConstraintAngleBasedData ()
 Destructor. More...
 
const agx::Angle * getAngle () const
 
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
 
virtual void restore (agxStream::InputArchive &in) override
 Restore data from stream. More...
 
virtual void set (const agx::AttachmentPair *ap)
 Assign new attachment pair. More...
 
virtual void store (agxStream::OutputArchive &out) const override
 Store data to stream. More...
 

Protected Types

typedef agx::ref_ptr< const
agx::Angle > 
AngleRefType
 

Protected Attributes

AngleRefType m_angle
 
const agx::AttachmentPair * m_ap
 

Detailed Description

Basic data holder class for "angle based" (secondary) constraints.

Definition at line 428 of file ElementaryConstraintData.h.

Member Typedef Documentation

Constructor & Destructor Documentation

agx::ConstraintAngleBasedData::ConstraintAngleBasedData ( )

Default constructor used during restore of this object.

agx::ConstraintAngleBasedData::ConstraintAngleBasedData ( const agx::AttachmentPair *  ap,
const agx::Angle *  angle 
)

Construct given constraint attachment pair and the input angle for the elementary constraint to work on.

Parameters
ap- constraint attachment pair
angle- input angle
virtual agx::ConstraintAngleBasedData::~ConstraintAngleBasedData ( )
virtual

Destructor.

Member Function Documentation

const Angle * agx::ConstraintAngleBasedData::getAngle ( ) const
Returns
the angle used by the elementary constraint

Definition at line 572 of file ElementaryConstraintData.h.

References m_angle.

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 Vec3 & agx::ConstraintAngleBasedData::getDir1 ( ) const
Returns
the world direction the angle is defined along or about for first attachment

Definition at line 577 of file ElementaryConstraintData.h.

References agxAssert, agx::Angle::getDir(), m_angle, and agx::ElementaryConstraintData::m_ap.

const Vec3 & agx::ConstraintAngleBasedData::getDir2 ( ) const
Returns
the world direction the angle is defined along or about for second attachment

Definition at line 583 of file ElementaryConstraintData.h.

References agxAssert, agx::Angle::getDir(), m_angle, and agx::ElementaryConstraintData::m_ap.

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.

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

Restore data from stream.

Reimplemented from agx::ElementaryConstraintData.

virtual void agx::ElementaryConstraintData::set ( const agx::AttachmentPair *  ap)
virtualinherited

Assign new attachment pair.

Parameters
ap- attachment pair

Reimplemented in agx::QuatLockData.

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

Store data to stream.

Reimplemented from agx::ElementaryConstraintData.

Member Data Documentation

AngleRefType agx::ConstraintAngleBasedData::m_angle
protected

Definition at line 478 of file ElementaryConstraintData.h.

Referenced by getAngle(), getDir1(), and getDir2().

const agx::AttachmentPair* agx::ElementaryConstraintData::m_ap
protectedinherited

Definition at line 95 of file ElementaryConstraintData.h.

Referenced by getDir1(), and getDir2().


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