|
AGXDynamics
2.31.1.0
|
Constraint attachment class for agx::RigidBody. More...
#include <Attachment.h>
Inheritance diagram for agx::RigidBodyAttachment:Public Types | |
| enum | Transformed { U, V, N, ANCHOR_POS, CM_TO_ANCHOR_POS, NUM_ELEMENTS } |
| Data access enum. More... | |
Public Member Functions | |
| RigidBodyAttachment (agx::RigidBody *rb, agx::Frame *relFrame) | |
| Construct given rigid body and relative frame. More... | |
| template<typename T > | |
| T * | as () |
Unsafe version, static cast of this to T. More... | |
| template<typename T > | |
| const T * | as () const |
Unsafe version, static cast of this to T. More... | |
| template<typename T > | |
| T * | asSafe () |
| Safe subclass casting, return nullptr if template type does not match. More... | |
| template<typename T > | |
| const T * | asSafe () const |
| virtual agx::Real | calculateAngularSpeed (const agx::Attachment *other) const override |
| virtual agx::Real | calculateDistance (const agx::Attachment *other) const override |
| virtual agx::Real | calculateLinearDistance (const agx::Attachment *other) const override |
| virtual agx::Real | calculateLinearSpeed (const agx::Attachment *other) const override |
| const agx::Vec3 & | get (agx::Attachment::Transformed entry) const |
| virtual agx::Vec3 | getAngularVelocity () const override |
| const char * | getClassName () const override |
| bool | getEnableSerialization () const |
| bool | getEnableUuidGeneration () |
| agx::Frame * | getFrame () const |
| agx::UInt32 | getIndex () const |
| This index is given at creation of this object. More... | |
| virtual agx::Vec3 | getLinearVelocity () const override |
| agx::Vec3 | getLocal (agx::Attachment::Transformed entry) const |
| int | getReferenceCount () const |
| agx::RigidBody * | getRigidBody () const |
| agxStream::StorageAgent * | getStorageAgent () const override |
| agx::Uuid | getUuid () const |
| template<typename T > | |
| agx::Bool | is () const |
| template<typename T > | |
| Bool | is () const |
| template<> | |
| Bool | is () const |
| bool | isFinished () const |
| virtual agx::Bool | objectDeleted () const override |
| void | reference (void *ptr=nullptr) const |
| Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. More... | |
| virtual void | restore (agxStream::InputArchive &in) override |
| template<typename T > | |
| T * | safeAs () |
Dynamic cast of this to T. More... | |
| template<typename T > | |
| const T * | safeAs () const |
Dynamic cast of this to T. More... | |
| void | setEnableSerialization (bool flag) |
| Set to false to disable serialization of this object. More... | |
| void | setFinished () |
| Tells this class that it is restored correctly and should not be deleted during destruction of an Archive. More... | |
| void | setFrame (agx::Frame *frame) |
| Assign a new frame - transformed data will be updated. More... | |
| void | setRigidBody (agx::RigidBody *rb) |
| Assign rigid body to this constraint frame. More... | |
| void | setUuid (const agx::Uuid &uuid) |
| Explicitly set a Uuid on a serializable object. More... | |
| virtual void | store (agxStream::OutputArchive &out) const override |
| virtual void | transform () override |
| Transform given rigid body and frame. More... | |
| void | unreference (void *ptr=nullptr) const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
| void | unreference_nodelete () const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
| virtual agx::Bool | valid () const override |
Static Public Member Functions | |
| static agxStream::Serializable * | create () |
| static agxStream::Serializable * | create (agxStream::InputArchive &) |
| static void | createAttachmentBase (const agx::Vec3d &N, agx::Vec3d &U, agx::Vec3d &V) |
Given vector N, create orthonormal base. More... | |
| static void | createAttachmentBase (const agx::Vec3f &N, agx::Vec3f &U, agx::Vec3f &V) |
| static const char * | getConstructClassId () |
| static void | setEnableUuidGeneration (bool flag) |
| Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled. More... | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Protected Member Functions | |
| RigidBodyAttachment () | |
| Protected default constructor used by restore. More... | |
| virtual | ~RigidBodyAttachment () |
| Reference counted object, protected destructor. More... | |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
| void | generateUuid () |
| void | transform (const agx::AffineMatrix4x4 &cmTransform, const agx::Vec3 &cmToModel, const agx::AffineMatrix4x4 &localConstraintTransform) |
Fill Transformed data given center of mass transform and offset from model frame to center of mass frame (assumes not rotated relative each other). More... | |
Static Protected Member Functions | |
| static DeleteHandler * | getDeleteHandler () |
| static void | setDeleteHandler (DeleteHandler *handler) |
| Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. More... | |
Constraint attachment class for agx::RigidBody.
Definition at line 207 of file Attachment.h.
|
inherited |
Data access enum.
| Enumerator | |
|---|---|
| U | Constraint attachment x-axis. |
| V | Constraint attachment y-axis. |
| N | Constraint attachment z-axis. |
| ANCHOR_POS | Constraint attachment world position. |
| CM_TO_ANCHOR_POS | Vector from center of mass (if moving) to anchor point given in world frame. |
| NUM_ELEMENTS | Number of data elements. |
Definition at line 42 of file Attachment.h.
| agx::RigidBodyAttachment::RigidBodyAttachment | ( | agx::RigidBody * | rb, |
| agx::Frame * | relFrame | ||
| ) |
Construct given rigid body and relative frame.
| rb | - rigid body (0 if e.g., world frame or other type of static frame) |
| relFrame | - constraint attachment frame relative rb model frame |
|
protected |
Protected default constructor used by restore.
|
protectedvirtual |
Reference counted object, protected destructor.
|
protectedinherited |
|
inherited |
Unsafe version, static cast of this to T.
Definition at line 486 of file Attachment.h.
References agxAssert.
|
inherited |
Unsafe version, static cast of this to T.
Definition at line 505 of file Attachment.h.
References agxAssert.
|
inherited |
Safe subclass casting, return nullptr if template type does not match.
Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().
|
inherited |
|
overridevirtual |
Reimplemented from agx::Attachment.
|
overridevirtual |
Reimplemented from agx::Attachment.
|
overridevirtual |
Reimplemented from agx::Attachment.
|
overridevirtual |
Reimplemented from agx::Attachment.
|
inlinestatic |
Definition at line 275 of file Attachment.h.
|
inlinestatic |
Definition at line 275 of file Attachment.h.
|
staticinherited |
Given vector N, create orthonormal base.
| N | - in vector (a.k.a. z axis) |
| U | - out vector (a.k.a. x axis) |
| V | - out vector (a.k.a. y axis) |
Referenced by agx::OrientedFrictionModelImpl< agx::ScaleBoxFrictionModel >::calculateTangentPlane().
|
staticinherited |
|
protectedinherited |
|
protectedinherited |
|
inherited |
Definition at line 463 of file Attachment.h.
|
overridevirtual |
Reimplemented from agx::Attachment.
|
inlineoverridevirtual |
Reimplemented from agx::Attachment.
Definition at line 275 of file Attachment.h.
|
inlinestatic |
Definition at line 275 of file Attachment.h.
|
staticprotectedinherited |
|
inherited |
Definition at line 273 of file Serializable.h.
|
inherited |
|
inherited |
Definition at line 468 of file Attachment.h.
|
inherited |
This index is given at creation of this object.
It is guaranteed to be unique for the lifetime of this library instance. As long as the application is running. This value is not serialized or restored. A new object will always get a new index no matter how it is created.
Definition at line 247 of file Serializable.h.
|
overridevirtual |
Reimplemented from agx::Attachment.
|
inherited |
|
inherited |
| RigidBody * agx::RigidBodyAttachment::getRigidBody | ( | ) | const |
Definition at line 522 of file Attachment.h.
|
inlineoverridevirtual |
Reimplemented from agx::Attachment.
Definition at line 275 of file Attachment.h.
|
inherited |
Definition at line 268 of file Serializable.h.
Referenced by agxSDK::UuidHashCollisionFilter::match().
|
inherited |
T
|
inherited |
Definition at line 474 of file Attachment.h.
|
inherited |
Definition at line 480 of file Attachment.h.
|
inherited |
Definition at line 252 of file Serializable.h.
References AGX_FORCE_INLINE.
|
overridevirtual |
Reimplemented from agx::Attachment.
Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.
This method should be used with care, always balanced with the same number of calls to unreference.
|
overridevirtual |
Reimplemented from agx::Attachment.
|
inherited |
Dynamic cast of this to T.
Definition at line 499 of file Attachment.h.
|
inherited |
Dynamic cast of this to T.
Definition at line 517 of file Attachment.h.
|
staticprotectedinherited |
Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
|
inherited |
Set to false to disable serialization of this object.
It will just be ignored during serialization (writing). It is still possible to restore TO this object.
|
staticinherited |
Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled.
|
inherited |
Tells this class that it is restored correctly and should not be deleted during destruction of an Archive.
|
inherited |
Assign a new frame - transformed data will be updated.
| frame | - new frame |
| void agx::RigidBodyAttachment::setRigidBody | ( | agx::RigidBody * | rb | ) |
Assign rigid body to this constraint frame.
| rb | - new rigid body |
Explicitly set a Uuid on a serializable object.
Use this method with great care, as it can result in non-unique identifiers in the system!
|
overridevirtual |
Reimplemented from agx::Attachment.
|
protectedinherited |
Fill Transformed data given center of mass transform and offset from model frame to center of mass frame (assumes not rotated relative each other).
| cmTransform | - world transform of the center of mass frame |
| cmToModel | - in local coordinates, vector from center of mass frame to model frame |
| localConstraintTransform | - transform of the local constraint frame |
|
overridevirtual |
Transform given rigid body and frame.
Reimplemented from agx::Attachment.
Decrement the reference count by one, indicating that a pointer to this object is referencing it.
If the reference count goes to zero, it is assumed that this object is no longer referenced and is automatically deleted.
This method should be used with care, always balanced with the same number of calls to reference.
Referenced by agxData::EntityRef< ContactMaterialPtr >::~EntityRef().
|
inherited |
Decrement the reference count by one, indicating that a pointer to this object is referencing it.
However, do not delete it, even if ref count goes to 0. Warning, unref_nodelete() should only be called if the user knows exactly who will be responsible for, one should prefer unref() over unref_nodelete() as the later can lead to memory leaks.
|
overridevirtual |
Reimplemented from agx::Attachment.
|
staticinherited |
|
protected |
Definition at line 290 of file Attachment.h.
|
mutableprotectedinherited |
Definition at line 240 of file Referenced.h.
|
mutableprotectedinherited |
Definition at line 239 of file Referenced.h.
|
protected |
Definition at line 289 of file Attachment.h.
|
mutableprotectedinherited |
Definition at line 241 of file Referenced.h.
|
protectedinherited |
Definition at line 199 of file Attachment.h.
|
protectedinherited |
Definition at line 198 of file Attachment.h.