AGX Dynamics 2.42.3.0
Loading...
Searching...
No Matches
agx::ElementaryConstraintData Class Reference

Class to hold data for elementary constraints. More...

#include <ElementaryConstraintData.h>

+ Inheritance diagram for agx::ElementaryConstraintData:

Public Member Functions

 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

const agx::AttachmentPair * m_ap
 

Detailed Description

Class to hold data for elementary constraints.

Definition at line 33 of file ElementaryConstraintData.h.

Constructor & Destructor Documentation

◆ ElementaryConstraintData() [1/2]

agx::ElementaryConstraintData::ElementaryConstraintData ( )

Used during serialization restore.

◆ ElementaryConstraintData() [2/2]

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

Construct given attachment pair.

Parameters
ap- attachment pair

◆ ~ElementaryConstraintData()

virtual agx::ElementaryConstraintData::~ElementaryConstraintData ( )
virtual

Destructor.

Member Function Documentation

◆ getAttachment()

const agx::Attachment * agx::ElementaryConstraintData::getAttachment ( agx::UInt  index) const
inline
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.

◆ getAttachmentPair()

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

Definition at line 61 of file ElementaryConstraintData.h.

References agxAssert.

◆ getCmToAnchorPosition()

const agx::Vec3 & agx::ElementaryConstraintData::getCmToAnchorPosition ( agx::UInt  index) const
inline
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.

◆ getSeparation()

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

Definition at line 72 of file ElementaryConstraintData.h.

References agxAssert.

◆ getWorldToAnchorPosition()

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

Definition at line 82 of file ElementaryConstraintData.h.

References agxAssert.

◆ restore()

◆ set()

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

Assign new attachment pair.

Parameters
ap- attachment pair

Reimplemented in agx::QuatLockData.

◆ store()

Member Data Documentation

◆ m_ap

const agx::AttachmentPair* agx::ElementaryConstraintData::m_ap
protected

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