|
AGX Dynamics 2.41.3.0
|
Constraint attachment pair class. More...
#include <Attachment.h>
Classes | |
| class | CustomData |
| Custom data for separation pair. More... | |
| struct | InternalState |
Public Types | |
| typedef agx::ref_ptr< CustomData > | CustomDataRef |
| enum | Transformed { SEPARATION , NUM_ELEMENTS } |
| Data access enum. More... | |
Public Member Functions | |
| AttachmentPair () | |
| Default constructor, attachment frame 1 = attachment frame 2 = 0. | |
| virtual | ~AttachmentPair () |
| Destructor. | |
| void | add (agx::Angle *angle) |
| Add constraint angle. | |
| agx::Real | calculateAngularSpeed () const |
| Calculates the rotational/angular speed between the two attachments, about the constraint axis. | |
| agx::Real | calculateLinearSpeed () const |
| Calculates the linear speed between the two attachments, along the constraint axis. | |
| const agx::Vec3 & | get (agx::AttachmentPair::Transformed entry) const |
| agx::Angle * | getAngle (agx::UInt index) const |
| Access constraint angle given index. | |
| const agx::AngleContainer & | getAngles () const |
| agx::Attachment * | getAttachment1 () const |
| agx::Attachment * | getAttachment2 () const |
| agx::AttachmentPair::CustomData * | getCustomData () const |
| agx::Bool | hasAngle (const agx::Angle *angle) const |
| virtual void | onPostSolve (agx::Real dt, const agx::ConstraintImplementation &context) |
| Post solvers, velocity dependent variables should be updated. | |
| virtual void | onPreSolve (agx::Real dt, const agx::ConstraintImplementation &context) |
| Pre solvers, position/orientation dependent variables (used in Jacobians) should be updated. | |
| agx::Attachment * | operator[] (agx::UInt i) const |
| virtual agx::Bool | rebind () |
| Rebind given first frame. | |
| virtual void | restore (agxStream::InputArchive &in) |
| Restore given stream. | |
| virtual void | restoreLightData (agxStream::StorageStream &str) |
| Restore structural independent data from stream. | |
| void | set (agx::Attachment *a1, agx::Attachment *a2) |
| Assign constraint attachment frames. | |
| void | setCustomData (agx::AttachmentPair::CustomData *customData) |
| Assign custom data to receive transform calls. | |
| virtual void | store (agxStream::OutputArchive &out) const |
| Store given stream. | |
| virtual void | storeLightData (agxStream::StorageStream &str) const |
| Store structural independent data to stream. | |
| virtual void | transform () |
| Transform attachment frames and updates data. | |
| agx::Bool | valid () const |
Protected Attributes | |
| AngleContainer | m_angles |
| AttachmentRef | m_attachments [2] |
| CustomDataRef | m_customData |
| InternalState | m_state |
| agx::Vec3 | m_transformed [NUM_ELEMENTS] |
Constraint attachment pair class.
Data holder for a pair of constraint attachments (i.e., what defines the difference between the frames that is used in constraints).
Definition at line 301 of file agx/Attachment.h.
Definition at line 334 of file agx/Attachment.h.
Data access enum.
| Enumerator | |
|---|---|
| SEPARATION | Separation vector, i.e., the vector from frame 2 to frame 1. |
| NUM_ELEMENTS | Number of data elements. |
Definition at line 307 of file agx/Attachment.h.
| agx::AttachmentPair::AttachmentPair | ( | ) |
Default constructor, attachment frame 1 = attachment frame 2 = 0.
|
virtual |
Destructor.
| void agx::AttachmentPair::add | ( | agx::Angle * | angle | ) |
Add constraint angle.
| angle | - constraint angle to add |
| agx::Real agx::AttachmentPair::calculateAngularSpeed | ( | ) | const |
Calculates the rotational/angular speed between the two attachments, about the constraint axis.
| agx::Real agx::AttachmentPair::calculateLinearSpeed | ( | ) | const |
Calculates the linear speed between the two attachments, along the constraint axis.
| const Vec3 & agx::AttachmentPair::get | ( | agx::AttachmentPair::Transformed | entry | ) | const |
| agx::Angle * agx::AttachmentPair::getAngle | ( | agx::UInt | index | ) | const |
Access constraint angle given index.
| index | - index of angle |
| const agx::AngleContainer & agx::AttachmentPair::getAngles | ( | ) | const |
|
inline |
Definition at line 587 of file agx/Attachment.h.
|
inline |
Definition at line 592 of file agx/Attachment.h.
| agx::AttachmentPair::CustomData * agx::AttachmentPair::getCustomData | ( | ) | const |
| agx::Bool agx::AttachmentPair::hasAngle | ( | const agx::Angle * | angle | ) | const |
|
virtual |
Post solvers, velocity dependent variables should be updated.
| dt | - time step size |
| context | - constraint this attachment pair belongs to |
|
virtual |
Pre solvers, position/orientation dependent variables (used in Jacobians) should be updated.
| dt | - time step size |
| context | - constraint this attachment pair belongs to |
| Attachment * agx::AttachmentPair::operator[] | ( | agx::UInt | i | ) | const |
i (0 or 1!) Definition at line 581 of file agx/Attachment.h.
References agxAssert, agx::ref_ptr< T >::get(), and m_attachments.
|
virtual |
Rebind given first frame.
|
virtual |
Restore given stream.
|
virtual |
Restore structural independent data from stream.
| void agx::AttachmentPair::set | ( | agx::Attachment * | a1, |
| agx::Attachment * | a2 | ||
| ) |
Assign constraint attachment frames.
| a1 | - first attachment frame |
| a2 | - second attachment frame |
| void agx::AttachmentPair::setCustomData | ( | agx::AttachmentPair::CustomData * | customData | ) |
Assign custom data to receive transform calls.
| customData | - user defined custom data |
|
virtual |
Store given stream.
|
virtual |
Store structural independent data to stream.
|
virtual |
Transform attachment frames and updates data.
| agx::Bool agx::AttachmentPair::valid | ( | ) | const |
|
protected |
Definition at line 513 of file agx/Attachment.h.
|
protected |
Definition at line 510 of file agx/Attachment.h.
Referenced by operator[]().
|
protected |
Definition at line 512 of file agx/Attachment.h.
|
protected |
Definition at line 514 of file agx/Attachment.h.
|
protected |
Definition at line 511 of file agx/Attachment.h.
Referenced by get().