AGX Dynamics  2.37.3.2
agxModel::RotatingNodeAttachment Class Reference

Node attachment using hinge joint, i.e., the node can rotate about this attachment. More...

#include <Deformable1DAttachment.h>

+ Inheritance diagram for agxModel::RotatingNodeAttachment:

Public Member Functions

 RotatingNodeAttachment (agx::RigidBody *rb, const agx::Vec3 &relPosition)
 Construct given rigid body and relative position. More...
 
 RotatingNodeAttachment (agx::RigidBody *rb, const agx::AffineMatrix4x4 &relTransform)
 Construct given rigid body and relative transform. More...
 
const char * getClassName () const override
 
agxStream::StorageAgent * getStorageAgent () const override
 
virtual void restore (agxStream::InputArchive &in) override
 
virtual void store (agxStream::OutputArchive &out) const override
 
- Public Member Functions inherited from agxModel::NodeAttachmentT< agx::Hinge >
 NodeAttachmentT (agx::RigidBody *rb, agx::Frame *rbAttachmentFrame, agxModel::NodeAttachment::InitializationMode initMode)
 Construct given rigid body and a relative frame. More...
 
- Public Member Functions inherited from agxModel::NodeAttachment
 AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE (agxModel::NodeAttachment)
 
agx::Constraint * getConstraint () const
 
agx::Frame * getFrame () const
 
InitializationMode getInitMode () const
 
const agx::String & getName () const
 
agx::RigidBody * getRigidBody () const
 
agx::AffineMatrix4x4 getWorldMatrix () const
 
virtual agx::Bool initialize (agxModel::Deformable1DNode *node)
 Initializes constraint. More...
 
virtual void restoreLightData (agxStream::StorageStream &str) override
 Restore structural independent data from stream. More...
 
void setName (const agx::String &name)
 Name this attachment, e.g., to find this attachment using agxModel::Node::getAttachment( const agx::String& name ). More...
 
virtual void storeLightData (agxStream::StorageStream &str) const override
 Store structural independent data to stream. More...
 
- Public Member Functions inherited from agx::Referenced
 Referenced ()
 Default constructor. More...
 
 Referenced (const Referenced &)
 
template<typename T >
T * as ()
 Subclass casting. More...
 
template<typename T >
const T * as () const
 
template<typename T >
T * asSafe ()
 Safe subclass casting, return nullptr if template type does not match. More...
 
template<typename T >
const T * asSafe () const
 
int getReferenceCount () const
 
template<typename T >
bool is () const
 Subclass test. More...
 
Referenced & operator= (const Referenced &)
 Assignment operator. Will increment the number of references to the referenced object. More...
 
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...
 
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...
 
- Public Member Functions inherited from agxStream::Serializable
virtual ~Serializable ()
 Destructor for normal C++ use but hidden from SWIG bindings. More...
 
bool getEnableSerialization () const
 
bool getEnableUuidGeneration ()
 
agx::UInt32 getIndex () const
 This index is given at creation of this object. More...
 
agx::Uuid getUuid () const
 
bool isFinished () const
 
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 setUuid (const agx::Uuid &uuid)
 Explicitly set a Uuid on a serializable object. More...
 

Static Public Member Functions

static agxStream::Serializable * create ()
 
static agxStream::Serializable * create (agxStream::InputArchive &)
 
static const char * getConstructClassId ()
 
- Static Public Member Functions inherited from agxModel::NodeAttachment
template<typename T >
static agxModel::NodeAttachmentRef createFromBody (agx::Vec3 bodyPoint, agx::RigidBody *rb)
 Creates an node attachment given a point in rb local frame. More...
 
template<typename T >
static agxModel::NodeAttachmentRef createFromBody (agx::AffineMatrix4x4 bodyTransform, agx::RigidBody *rb)
 Creates an node attachment given a transform in rb local frame. More...
 
template<typename T >
static agxModel::NodeAttachmentRef createFromWorld (agx::Vec3 worldPoint, agx::RigidBody *rb)
 Creates an node attachment given a point in world frame. More...
 
template<typename T >
static agxModel::NodeAttachmentRef createFromWorld (agx::AffineMatrix4x4 worldTransform, agx::RigidBody *rb)
 Creates an node attachment given a transform in world frame. More...
 
- Static Public Member Functions inherited from agx::Referenced
template<typename T >
static bool ValidateCast (const Referenced *object)
 
- Static Public Member Functions inherited from agxStream::Serializable
static void setEnableUuidGeneration (bool flag)
 Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled. More...
 

Protected Member Functions

 RotatingNodeAttachment ()
 Default constructor for serialization. More...
 
virtual ~RotatingNodeAttachment ()
 Reference counted object, protected destructor. More...
 
- Protected Member Functions inherited from agxModel::NodeAttachmentT< agx::Hinge >
 NodeAttachmentT ()
 Default constructor for serialization. More...
 
virtual ~NodeAttachmentT ()
 Reference counted object, protected destructor. More...
 
virtual agx::ConstraintRef createConstraint (agx::RigidBodyRef rb1, agx::FrameRef f1, agx::RigidBodyRef rb2, agx::FrameRef f2) const override
 
- Protected Member Functions inherited from agxModel::NodeAttachment
 NodeAttachment (agx::RigidBody *rb, agx::Frame *rbAttachmentFrame, agxModel::NodeAttachment::InitializationMode initMode)
 Construct given rigid body and a relative frame. More...
 
virtual ~NodeAttachment ()
 Reference counted object, protected destructor. More...
 
void restore (agxStream::InputArchive &in) override
 Serialization restore. More...
 
void store (agxStream::OutputArchive &out) const override
 Serialization store. More...
 
- Protected Member Functions inherited from agx::Referenced
virtual ~Referenced ()
 Destructor. More...
 
void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 
- Protected Member Functions inherited from agxStream::Serializable
 Serializable ()
 Default constructor. More...
 
 Serializable (const Serializable &other)
 Copy constructor. More...
 
void generateUuid ()
 

Additional Inherited Members

- Public Types inherited from agxModel::NodeAttachment
enum  InitializationMode { USE_RELATIVE_TRANSFORM, ROTATE_TO_NODE_DIRECTION }
 Each attachment implementation controls the initialization mode. More...
 
- Static Protected Member Functions inherited from agx::Referenced
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...
 
- Protected Attributes inherited from agxModel::NodeAttachment
agx::ConstraintRef m_constraint
 
InitializationMode m_initMode
 
agx::String m_name
 
agx::RigidBodyRef m_rb
 
agx::FrameRef m_rbAttachmentFrame
 
- Protected Attributes inherited from agx::Referenced
Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

Detailed Description

Node attachment using hinge joint, i.e., the node can rotate about this attachment.

Definition at line 288 of file Deformable1DAttachment.h.

Constructor & Destructor Documentation

◆ RotatingNodeAttachment() [1/3]

agxModel::RotatingNodeAttachment::RotatingNodeAttachment ( agx::RigidBody *  rb,
const agx::Vec3 &  relPosition 
)

Construct given rigid body and relative position.

The hinge axis will be calculated to be along the Deformable1D.

Parameters
rb- rigid body
relPosition- position in rigid body frame

◆ RotatingNodeAttachment() [2/3]

agxModel::RotatingNodeAttachment::RotatingNodeAttachment ( agx::RigidBody *  rb,
const agx::AffineMatrix4x4 &  relTransform 
)

Construct given rigid body and relative transform.

The relative transform defines the hinge.

Parameters
rb- rigid body
relTransform- transform in rigid body frame

◆ RotatingNodeAttachment() [3/3]

agxModel::RotatingNodeAttachment::RotatingNodeAttachment ( )
protected

Default constructor for serialization.

◆ ~RotatingNodeAttachment()

virtual agxModel::RotatingNodeAttachment::~RotatingNodeAttachment ( )
protectedvirtual

Reference counted object, protected destructor.

Member Function Documentation

◆ create() [1/2]

static agxStream::Serializable* agxModel::RotatingNodeAttachment::create ( )
inlinestatic

Definition at line 306 of file Deformable1DAttachment.h.

◆ create() [2/2]

static agxStream::Serializable* agxModel::RotatingNodeAttachment::create ( agxStream::InputArchive &  )
inlinestatic

Definition at line 306 of file Deformable1DAttachment.h.

◆ getClassName()

const char* agxModel::RotatingNodeAttachment::getClassName ( ) const
inlineoverridevirtual
Returns
the class name of this class.

Reimplemented from agxStream::Serializable.

Definition at line 306 of file Deformable1DAttachment.h.

◆ getConstructClassId()

static const char* agxModel::RotatingNodeAttachment::getConstructClassId ( )
inlinestatic

Definition at line 306 of file Deformable1DAttachment.h.

◆ getStorageAgent()

agxStream::StorageAgent* agxModel::RotatingNodeAttachment::getStorageAgent ( ) const
inlineoverridevirtual
Returns
the storage agent

Implements agxStream::Serializable.

Definition at line 306 of file Deformable1DAttachment.h.

◆ restore()

virtual void agxModel::RotatingNodeAttachment::restore ( agxStream::InputArchive &  in)
overridevirtual

◆ store()

virtual void agxModel::RotatingNodeAttachment::store ( agxStream::OutputArchive &  out) const
overridevirtual

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