|
AGXDynamics
2.31.1.0
|
Special node implementation of segments in e.g., a Deformable1D object. More...
#include <Deformable1DNode.h>
Inheritance diagram for agxModel::Deformable1DNode:Classes | |
| struct | DeformationData |
| Structure containing relevant data for elasto-plastic deformation. More... | |
Public Types | |
| enum | MaxLoadType { TRANSLATIONAL = 0, ROTATIONAL } |
Public Member Functions | |
| Deformable1DNode (const agx::AffineMatrix4x4 &transform) | |
| Construct given full transform of the rigid body in this node. More... | |
| Deformable1DNode (const agx::AffineMatrix4x4 &transform, agxModel::NodeAttachment *attachment) | |
| Construct given full transform of the rigid body in this node and an external attachment. More... | |
| agx::Bool | add (agxModel::NodeAttachmentRef attachment) |
| Add an external attachment to this node. More... | |
| bool | addBranch (agxModel::Tree::Branch *branch) |
| Add child branch to this branch. More... | |
| 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 |
| agx::Vec3 | calculateAreaMomentOfInertia (const agxModel::Deformable1DGeometryFactory *geometryFactory) const |
| Calculates the moment of area given a geometry factory containing values such as width and height. More... | |
| virtual agxModel::Tree::Branch * | clone () override |
| virtual agx::ConstraintRef | createConstraintWithParent () const override |
| Internal method that creates the constraint between this node and its parent. More... | |
| agxModel::NodeAttachment * | getAttachment (agx::UInt index) const |
Finds attachment given index index. More... | |
| agxModel::NodeAttachment * | getAttachment (const agx::String &name) const |
Find attachment given name name. More... | |
| agxModel::Tree::Branch * | getBranch (size_t i) const |
| agxModel::Deformable1DNode * | getChild (agx::UInt i=0) const |
| const char * | getClassName () const override |
| agx::Constraint * | getConstraint () const |
| agx::Vec2 | getCurrentLoad () const |
| agx::Real | getCurrentRotationalLoad () const |
| agx::Real | getCurrentTranslationalLoad () const |
| agx::Referenced * | getCustomData () const |
| const agxModel::Deformable1DNode::DeformationData & | getDeformationData () const |
| agx::Vec3 | getDirection () const |
| bool | getEnableSerialization () const |
| bool | getEnableUuidGeneration () |
| agx::UInt32 | getIndex () const |
| This index is given at creation of this object. More... | |
| agx::Real | getLength () const |
| virtual agx::Real | getLength (const agxCollide::Geometry *geometry) const override |
Internal method that calculates/estimate the length of geometry. More... | |
| agx::Vec3 | getLocalDirection () const |
| agx::Vec2 | getMaxLoad () const |
| agx::Real | getMaxRotationalLoad () const |
| agx::Real | getMaxTranslationalLoad () const |
| agx::UInt | getNumAttachments () const |
| size_t | getNumBranches () const |
| agx::UInt | getNumChildren () const |
| agxModel::Deformable1DNode * | getParent () const |
| agx::Vec3 | getPosition () const |
| Position of this node is defined to be at the start of this node given this node has an extent. More... | |
| int | getReferenceCount () const |
| agx::RigidBody * | getRigidBody () const |
| agxModel::Segment * | getSegment () |
| const agxModel::Segment * | getSegment () const |
| agxStream::StorageAgent * | getStorageAgent () const override |
| agx::Uuid | getUuid () const |
| agx::Bool | hasChildren () const |
| template<typename T > | |
| bool | is () const |
| Subclass test. More... | |
| bool | isFinished () const |
| 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... | |
| bool | removeBranch (agxModel::Tree::Branch *branch) |
| Remove a child branch. More... | |
| bool | removeBranch (size_t index) |
| Remove child given index. More... | |
| virtual void | removeNotification (agxSDK::Assembly *assembly, agxSDK::Simulation *simulation) |
| Remove notification from an assembly (typically the agxModel::Deformable1D object) and the simulation. More... | |
| virtual void | restore (agxStream::InputArchive &in) override |
| virtual void | restoreLightData (agxStream::StorageStream &str) override |
| Restore structural independent data from stream. More... | |
| void | setCustomData (agx::Referenced *customData) |
| Assign custom/user data of any type. 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 | setMaxLoad (agx::Real translational, agx::Real rotational) |
| Assign max load for this branch (connection at start). More... | |
| void | setMaxRotationalLoad (agx::Real maxLoad) |
| Assign rotational max load for this branch. More... | |
| void | setMaxTranslationalLoad (agx::Real maxLoad) |
| Assign translational max load for this branch. More... | |
| void | setUuid (const agx::Uuid &uuid) |
| Explicitly set a Uuid on a serializable object. More... | |
| virtual agxCollide::Shape * | splitShape (agxCollide::Shape *shapeInBranch, agx::Real shapePosition, agxModel::Tree::Branch *newBranch, agx::Real &newBelowLength, agx::Real &newAboveLength) override |
| Internal method that splits a geometry in two. More... | |
| virtual void | store (agxStream::OutputArchive &out) const override |
| virtual void | storeLightData (agxStream::StorageStream &str) const override |
| Store structural independent data to stream. 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... | |
| const agxModel::Deformable1DNode::DeformationData & | updateDeformationData () |
| Updates deformation data (current constraint forces and relative rotations) given current state. More... | |
Static Public Member Functions | |
| static agxStream::Serializable * | create () |
| static agxStream::Serializable * | create (agxStream::InputArchive &) |
| 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 Types | |
| typedef agx::Vector< NodeAttachmentRef > | AttachmentContainer |
Protected Member Functions | |
| Deformable1DNode () | |
| A node has to have a transform, hidden default constructor. More... | |
| virtual | ~Deformable1DNode () |
| Reference counted object, protected destructor. More... | |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
| void | generateUuid () |
| agx::Bool | getCurrentConstraintForce (agx::Vec3 &translational, agx::Vec3 &rotational) const |
| void | setConstraint (agx::Constraint *constraint) |
| Assign constraint attached at start point of this branch. More... | |
| void | setLength (agx::Real length) |
| Assign the length of this node. More... | |
| void | setParent (agxModel::Tree::Branch *parent) |
| Assign parent to this branch. 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... | |
Protected Attributes | |
| AttachmentContainer | m_attachments |
| BranchContainer | m_branches |
| agx::ConstraintRef | m_constraint |
| agx::ref_ptr< agx::Referenced > | m_customData |
| DeformationData | m_deformationData |
| agx::Real | m_length |
| agx::Vec2 | m_maxLoad |
| Mutex | m_mutex |
| ObserverContainer | m_observers |
| BranchObs | m_parent |
| agx::RigidBodyRef | m_rb |
| AtomicValue | m_refCount |
| Segment | m_segment |
Special node implementation of segments in e.g., a Deformable1D object.
Definition at line 36 of file Deformable1DNode.h.
|
protected |
Definition at line 227 of file Deformable1DNode.h.
|
inherited |
| Enumerator | |
|---|---|
| TRANSLATIONAL | |
| ROTATIONAL | |
Definition at line 57 of file agxModel/Tree.h.
| agxModel::Deformable1DNode::Deformable1DNode | ( | const agx::AffineMatrix4x4 & | transform | ) |
Construct given full transform of the rigid body in this node.
| transform | - full transform of the rigid body in this node |
| agxModel::Deformable1DNode::Deformable1DNode | ( | const agx::AffineMatrix4x4 & | transform, |
| agxModel::NodeAttachment * | attachment | ||
| ) |
Construct given full transform of the rigid body in this node and an external attachment.
| transform | - full transform of the rigid body in this node |
| attachment | - external attachment to this node |
|
protected |
A node has to have a transform, hidden default constructor.
|
protectedvirtual |
Reference counted object, protected destructor.
| agx::Bool agxModel::Deformable1DNode::add | ( | agxModel::NodeAttachmentRef | attachment | ) |
Add an external attachment to this node.
| attachment | - attachment to add |
|
inherited |
Add child branch to this branch.
This branch will be parent to branch and later attached to it with a constraint.
| branch | - child branch |
|
protectedinherited |
|
inherited |
Subclass casting.
Template type must match actual type, dynamic_cast assertion will fail otherwise.
Referenced by agx::InternalData::get(), agxVehicle::Track::getNode(), agx::InternalData::getOrCreate(), and agx::InternalData::hasData().
|
inherited |
|
inherited |
Safe subclass casting, return nullptr if template type does not match.
Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().
|
inherited |
| agx::Vec3 agxModel::Deformable1DNode::calculateAreaMomentOfInertia | ( | const agxModel::Deformable1DGeometryFactory * | geometryFactory | ) | const |
Calculates the moment of area given a geometry factory containing values such as width and height.
If geometryFactory is null width and height will be estimated as one (1).
| geometryFactory | - geometry factory holding values such as width and height |
|
overridevirtual |
Reimplemented from agxModel::Tree::Branch.
|
inlinestatic |
Definition at line 188 of file Deformable1DNode.h.
|
inlinestatic |
Definition at line 188 of file Deformable1DNode.h.
|
overridevirtual |
Internal method that creates the constraint between this node and its parent.
Reimplemented from agxModel::Tree::Branch.
|
protectedinherited |
|
protectedinherited |
| agxModel::NodeAttachment* agxModel::Deformable1DNode::getAttachment | ( | agx::UInt | index | ) | const |
Finds attachment given index index.
| index | - index of attachment |
index if present, if index is out of bounds null | agxModel::NodeAttachment* agxModel::Deformable1DNode::getAttachment | ( | const agx::String & | name | ) | const |
Find attachment given name name.
| name | - name of the attachment (naming by attachment->setName( "name" )) |
name, null if not present
|
inherited |
i | agxModel::Deformable1DNode* agxModel::Deformable1DNode::getChild | ( | agx::UInt | i = 0 | ) | const |
| i | - index of child |
i (null if out of bound)
|
inlineoverridevirtual |
Reimplemented from agxStream::Serializable.
Definition at line 188 of file Deformable1DNode.h.
|
inherited |
|
inlinestatic |
Definition at line 188 of file Deformable1DNode.h.
|
protected |
| [out] | translational | - translational force applied by the constraint |
| [out] | rotational | - rotational force applied by the constraint |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
| const agxModel::Deformable1DNode::DeformationData& agxModel::Deformable1DNode::getDeformationData | ( | ) | const |
|
staticprotectedinherited |
|
inherited |
|
inherited |
Definition at line 273 of file Serializable.h.
|
inherited |
|
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.
| agx::Real agxModel::Deformable1DNode::getLength | ( | ) | const |
Referenced by agxModel::Deformable1DRadiusGeometryFactory< agxCollide::Capsule >::createGeometry().
|
overridevirtual |
Internal method that calculates/estimate the length of geometry.
| geometry | - geometry to estimate length |
Reimplemented from agxModel::Tree::Branch.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
| agx::UInt agxModel::Deformable1DNode::getNumAttachments | ( | ) | const |
|
inherited |
| agx::UInt agxModel::Deformable1DNode::getNumChildren | ( | ) | const |
| agxModel::Deformable1DNode* agxModel::Deformable1DNode::getParent | ( | ) | const |
| agx::Vec3 agxModel::Deformable1DNode::getPosition | ( | ) | const |
Position of this node is defined to be at the start of this node given this node has an extent.
|
inherited |
|
inherited |
| agxModel::Segment* agxModel::Deformable1DNode::getSegment | ( | ) |
| const agxModel::Segment* agxModel::Deformable1DNode::getSegment | ( | ) | const |
|
inlineoverridevirtual |
Implements agxStream::Serializable.
Definition at line 188 of file Deformable1DNode.h.
|
inherited |
Definition at line 268 of file Serializable.h.
Referenced by agxSDK::UuidHashCollisionFilter::match().
| agx::Bool agxModel::Deformable1DNode::hasChildren | ( | ) | const |
|
inherited |
Subclass test.
Referenced by agx::Object::getAutoScopedResource(), agxData::EntityStorage::getInstances(), and agx::Object::getResource().
|
inherited |
Definition at line 252 of file Serializable.h.
References AGX_FORCE_INLINE.
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.
|
inherited |
Remove a child branch.
Parent will be set to 0 for branch.
| branch | - child branch |
|
inherited |
Remove child given index.
Parent will be set to 0 for branch at index.
| index | - index of branch to remove |
|
virtual |
Remove notification from an assembly (typically the agxModel::Deformable1D object) and the simulation.
|
overridevirtual |
|
overridevirtual |
Restore structural independent data from stream.
|
protectedinherited |
Assign constraint attached at start point of this branch.
| constraint | - constraint attached at start point of this branch |
|
inherited |
Assign custom/user data of any type.
Only constraint is that the class inherits agx::Referenced for easier memory managment.
| customData | - custom/user data for this branch |
|
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.
Assign the length of this node.
| length | - new length of this node |
Assign max load for this branch (connection at start).
Maximum load is divided into two parts, translational and rotational, units force. When/if the constraint exceeds one of these values an event is fired.
| translational | - translational max load, unit force (default: infinity = disabled) |
| rotational | - rotational max load, unit force (default: infinity = disabled) |
Assign rotational max load for this branch.
| maxLoad | - rotational max load, unit force (default: infinity = disabled) |
Assign translational max load for this branch.
| maxLoad | - translational max load, unit force (default: infinity = disabled) |
|
protectedinherited |
Assign parent to this branch.
| parent | - parent branch |
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 |
Internal method that splits a geometry in two.
Reimplemented from agxModel::Tree::Branch.
|
overridevirtual |
|
overridevirtual |
Store structural independent data to stream.
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.
| const agxModel::Deformable1DNode::DeformationData& agxModel::Deformable1DNode::updateDeformationData | ( | ) |
Updates deformation data (current constraint forces and relative rotations) given current state.
|
staticinherited |
|
protected |
Definition at line 231 of file Deformable1DNode.h.
|
protectedinherited |
Definition at line 252 of file agxModel/Tree.h.
|
protectedinherited |
Definition at line 256 of file agxModel/Tree.h.
|
protectedinherited |
Definition at line 253 of file agxModel/Tree.h.
|
protected |
Definition at line 232 of file Deformable1DNode.h.
|
protected |
Definition at line 230 of file Deformable1DNode.h.
|
protectedinherited |
Definition at line 257 of file agxModel/Tree.h.
|
mutableprotectedinherited |
Definition at line 240 of file Referenced.h.
|
mutableprotectedinherited |
Definition at line 239 of file Referenced.h.
|
protectedinherited |
Definition at line 251 of file agxModel/Tree.h.
|
protectedinherited |
Definition at line 255 of file agxModel/Tree.h.
|
mutableprotectedinherited |
Definition at line 241 of file Referenced.h.
|
protected |
Definition at line 233 of file Deformable1DNode.h.