AGX Dynamics  2.37.2.0
agxModel::Deformable1D Class Reference

One dimensional deformable construction, i.e., objects attached successively. More...

#include <Deformable1D.h>

+ Inheritance diagram for agxModel::Deformable1D:

Public Member Functions

 Deformable1D (agxModel::Deformable1DRoute *route, agxModel::Deformable1DGeometryFactory *geometryFactory)
 Construct given route. More...
 
void addComponent (agxModel::Deformable1DComponent *component)
 Add another component governing the behavior of this Deformable1D. More...
 
void attachmentAdded (agxModel::Deformable1DNode *node, agxModel::NodeAttachment *attachment)
 
agx::UInt calculateNumberOfNodes () const
 Calculates the number of nodes present in current structure. More...
 
virtual void clear () override
 Remove all branches from this tree. More...
 
agxModel::Deformable1DIterator findLastIterator () const
 
agxModel::Deformable1DNode * getBegin () const
 
agxModel::Deformable1DIterator getBeginIterator () const
 
agxModel::Deformable1DBulkProperties * getBulkProperties () const
 
const char * getClassName () const override
 
agxModel::Deformable1DComponent * getComponent (agx::UInt index)
 Gives access to the Deformable1DComponent held by this Deformable1D. More...
 
const agxModel::Deformable1DComponent * getComponent (agx::UInt index) const
 
agxModel::Deformable1DGeometryFactory * getGeometryFactory () const
 
agxModel::Deformable1DInitializationReport getInitializationReport () const
 
agx::UInt getNumComponents () const
 
agxModel::Deformable1DRoute * getRoute () const
 
agxStream::StorageAgent * getStorageAgent () const override
 
virtual bool initialize () override
 Initialize this object given the current route. More...
 
bool rebind () const
 Make the current relative positions of all nodes the rest state. More...
 
bool removeComponent (agxModel::Deformable1DComponent *component)
 Removed the given component from this Deformable1D. More...
 
virtual void restore (agxStream::InputArchive &in) override
 
virtual void restoreLightData (agxStream::StorageStream &str) override
 Restore structural independent data from stream. More...
 
void setBulkProperties (agxModel::Deformable1DBulkProperties *bulkProperties)
 Assign new bulk properties object. More...
 
virtual void store (agxStream::OutputArchive &out) const override
 
virtual void storeLightData (agxStream::StorageStream &str) const override
 Store structural independent data to stream. More...
 
agxModel::Deformable1DInitializationReport tryInitialize ()
 Attempt an initialization with the current settings. More...
 
- Public Member Functions inherited from agxModel::Tree
 Tree ()
 Default constructor. More...
 
bool addGroupID (agx::UInt32 id)
 Add group id to all geometries in this tree. More...
 
virtual bool attach (agx::RigidBody *rb, agx::Frame *frame)
 Attach bottom branch to an object given attachment frame. More...
 
virtual Tree * cut (agxCollide::Geometry *geometry, const agx::Vec3 &point, agx::Real minShapeHeight=agx::Real(1E-2))
 Cut geometry (only one shape per geometry supported) given point in world and minimum shape height, after cut. More...
 
virtual Tree * cut (agxModel::Tree::Branch *branch)
 Cut at branch and get a new tree. More...
 
Branch * findBranch (const agx::RigidBody *rb) const
 Search the tree for rigid body rb. More...
 
Branch * findBranch (const agxModel::Tree::Branch *fromBranch, const agx::RigidBody *rb) const
 Search the tree for rigid body rb given start branch (i.e., whole tree if root). More...
 
agxModel::Tree::BranchEventListener * getBranchEventListener () const
 
const char * getClassName () const override
 
agx::Referenced * getCustomData () const
 
bool getEnableCollisions (const agx::RigidBody *rb) const
 
bool getEnableCollisions (const agxCollide::Geometry *geometry) const
 
agx::Material * getMaterial () const
 
Branch * getRoot () const
 
agxStream::StorageAgent * getStorageAgent () const override
 
bool hasGroupID (agx::UInt32 id) const
 
bool initialized () const
 
bool isStatic () const
 
bool makeDynamic ()
 Make all rigid bodies dynamic and add all constraints to the simulation. More...
 
bool makeStatic (bool wakeOnContactEvent, agxModel::Tree::TreeExecuteFilter *filter=new agxModel::Tree::TreeExecuteFilter())
 Simplify this tree. More...
 
bool removeGroupID (agx::UInt32 id)
 Removes group id from all geometries in this tree. More...
 
virtual void setBranchEventListener (agxModel::Tree::BranchEventListener *branchListener)
 Assign branch event listener. More...
 
virtual void setConstraintSolveType (agx::Constraint::SolveType solveType)
 Set new solve type for the branch connections. More...
 
void setCustomData (agx::Referenced *customData)
 Assign custom data. More...
 
bool setEnableCollisions (agx::RigidBody *rb, bool flag)
 Enable or disable collisions between this tree and a rigid body. More...
 
bool setEnableCollisions (agxCollide::Geometry *geometry, bool flag)
 Enable or disable collisions between this tree and a geometry. More...
 
virtual void setMaterial (agx::Material *material)
 Assign new material. More...
 
virtual bool setTreeExecuteFilter (agxModel::Tree::TreeExecuteFilter *filter)
 Set or change the TreeExecuteFilter on a tree that has been made static and set to wake on contact. More...
 
virtual Branch * split (agxCollide::Geometry *geometry, const agx::Vec3 &point, agx::Real minShapeHeight=agx::Real(1E-2))
 Splits this tree given geometry and point in world. More...
 
bool wakeOnContact () const
 
- Public Member Functions inherited from agxSDK::Assembly
 Assembly ()
 Default constructor. More...
 
bool add (agx::Constraint *constraint)
 Add a constraint to the assembly. More...
 
bool add (agx::Interaction *interaction)
 Add an interaction to this assembly. More...
 
bool add (agxSDK::EventListener *listener)
 Add a listener to the assembly. More...
 
bool add (agx::RigidBody *body)
 Add a rigid body to the assembly. More...
 
bool add (agxCollide::Geometry *geometry)
 Add a geometry to the assembly. More...
 
bool add (Assembly *assembly)
 Add another assembly as child to this assembly. More...
 
bool add (agx::ContactMaterial *contactMaterial)
 Add a contact material to this assembly. More...
 
bool add (agx::Emitter *emitter)
 Add an emitter to this assembly. More...
 
bool add (agx::ObserverFrame *observerFrame)
 Add an ObserverFrame to this assembly. More...
 
bool add (agx::MergedBody *mergedBody)
 Add a MergedBody to this assembly. More...
 
bool add (agxStream::Serializable *object)
 Add an object of type serialized. More...
 
virtual void addNotification (Assembly *)
 Called when this assembly is added to another assembly. More...
 
bool empty () const
 
const AssemblyRefSetVector & getAssemblies () const
 
const agxSDK::Assembly * getAssembly (const agx::Name &name, bool recursive=true) const
 Find (linear search) and return named Assembly. More...
 
agxSDK::Assembly * getAssembly (const agx::Name &name, bool recursive=true)
 Find (linear search) and return named Assembly. More...
 
const agxSDK::Assembly * getAssembly (const agx::Uuid &uuid, bool recursive=true) const
 Find (linear search) and return an Assembly matching the given uuid. More...
 
agxSDK::Assembly * getAssembly (const agx::Uuid &uuid, bool recursive=true)
 Find (linear search) and return an Assembly matching the given uuid. More...
 
const char * getClassName () const override
 
const agx::Constraint * getConstraint (const agx::Uuid &uuid, bool recursive=true) const
 Find (linear search) and return a pointer to a Constraint with the given uuid. More...
 
agx::Constraint * getConstraint (const agx::Uuid &uuid, bool recursive=true)
 Find and return a pointer to a Constraint with the given uuid. More...
 
const agx::Constraint * getConstraint (const agx::Name &name, bool recursive=true) const
 Find (linear search) and return named Constraint. More...
 
agx::Constraint * getConstraint (const agx::Name &name, bool recursive=true)
 Find (linear search) and return named Constraint. More...
 
template<typename T >
T * getConstraint (const agx::Name &name, bool recursive=true)
 Find and return named Constraint of a template type, for example Hinge: More...
 
template<typename T >
const T * getConstraint (const agx::Name &name, bool recursive=true) const
 Find and return named Constraint of a template type, for example Hinge: More...
 
agx::Constraint1DOF * getConstraint1DOF (const agx::Name &name, bool recursive=true)
 
agx::Constraint2DOF * getConstraint2DOF (const agx::Name &name, bool recursive=true)
 
const agx::ConstraintRefSetVector & getConstraints () const
 
const agx::EmitterRefSetVector & getEmitters () const
 
const EventListenerRefSetVector & getEventListeners () const
 
virtual agx::Frame * getFrame ()
 Return a reference to the frame containing transformation and velocity information for this assembly. More...
 
virtual const agx::Frame * getFrame () const
 
const agxCollide::GeometryRefSetVector & getGeometries () const
 
const agxCollide::Geometry * getGeometry (const agx::Name &name, bool recursive=true) const
 Find (linear search) and return named collision Geometry. More...
 
agxCollide::Geometry * getGeometry (const agx::Name &name, bool recursive=true)
 Find (linear search) and return named collision Geometry. More...
 
const agxCollide::Geometry * getGeometry (const agx::Uuid &uuid, bool recursive=true) const
 Find (linear search) and return a Geometry matching the given uuid. More...
 
agxCollide::Geometry * getGeometry (const agx::Uuid &uuid, bool recursive=true)
 Find (linear search) and return a Geometry matching the given uuid. More...
 
const agx::InteractionRefSetVector & getInteractions () const
 
agx::Vec3 getLocalPosition () const
 
agx::Quat getLocalRotation () const
 
const agx::AffineMatrix4x4 & getLocalTransform () const
 
const agx::MergedBodyRefSetVector & getMergedBodies () const
 
const agx::MergedBody * getMergedBody (const agx::Uuid &uuid, bool recursive=true) const
 Find (linear search) and return an MergedBody matching the given uuid. More...
 
agx::MergedBody * getMergedBody (const agx::Uuid &uuid, bool recursive=true)
 Find (linear search) and return an MergedBody matching the given uuid. More...
 
agx::Name getName () const
 
const agx::ObserverFrame * getObserverFrame (const agx::Name &name, bool recursive=true) const
 Find (linear search) and return an ObserverFrame matching the given uuid. More...
 
agx::ObserverFrame * getObserverFrame (const agx::Name &name, bool recursive=true)
 Find (linear search) and return an ObserverFrame matching the given uuid. More...
 
const agx::ObserverFrame * getObserverFrame (const agx::Uuid &uuid, bool recursive=true) const
 Find (linear search) and return an ObserverFrame matching the given uuid. More...
 
agx::ObserverFrame * getObserverFrame (const agx::Uuid &uuid, bool recursive=true)
 Find (linear search) and return an ObserverFrame matching the given uuid. More...
 
const agx::ObserverFrameRefSetVector & getObserverFrames () const
 
Assembly * getParent ()
 
const Assembly * getParent () const
 
agx::Frame * getParentFrame ()
 
const agx::Frame * getParentFrame () const
 
const agx::ParticleSystemRefSetVector & getParticleSystems () const
 
const agx::RigidBodyRefSetVector & getRigidBodies () const
 
agx::RigidBody * getRigidBody (const agx::Name &name, bool recursive=true)
 Find (linear search) and return named RigidBody. More...
 
const agx::RigidBody * getRigidBody (const agx::Name &name, bool recursive=true) const
 Find (linear search) and return named RigidBody. More...
 
agx::RigidBody * getRigidBody (const agx::Uuid &uuid, bool recursive=true)
 Find (linear search) and return a pointer to a RigidBody with the given uuid. More...
 
const agx::RigidBody * getRigidBody (const agx::Uuid &uuid, bool recursive=true) const
 Find (linear search) and return a pointer to a RigidBody with the given uuid. More...
 
agxSDK::Simulation * getSimulation ()
 
const agxSDK::Simulation * getSimulation () const
 
agxStream::StorageAgent * getStorageAgent () const override
 
Type getType () const
 
bool remove (agx::Constraint *constraint)
 Remove a constraint from this assembly (does not recurse down in tree). More...
 
bool remove (agx::Interaction *interaction)
 Remove an interaction from this assembly. More...
 
bool remove (EventListener *listener)
 Remove an EventListener from the assembly. More...
 
bool remove (agx::RigidBody *body, bool removeAssociatedGeometries=false, bool resetParentFrame=true)
 Remove a rigid body from this assembly (does not recurse down in tree). More...
 
bool remove (agxCollide::Geometry *geometry, bool resetParentFrame=true)
 Remove a geometry from this assembly (does not recurse down in tree). More...
 
bool remove (Assembly *assembly, bool resetParentFrame=true)
 Remove a child assembly from a parent. More...
 
bool remove (agx::ContactMaterial *contactMaterial)
 Remove a contact material from this assembly. More...
 
bool remove (agx::Emitter *emitter)
 Remove an emitter from this assembly. More...
 
bool remove (agx::ObserverFrame *observerFrame, bool resetParentFrame=true)
 Remove an ObserverFrame from this assembly. More...
 
bool remove (agx::MergedBody *mergedBody)
 Remove a MergedBody from this assembly. More...
 
virtual void removeNotification (Assembly *)
 Called when this assembly is removed from another assembly. More...
 
bool reset (bool resetParentFrame=true)
 If this assembly is not added to a simulation it will clear all added bodies etc. More...
 
virtual void setAngularVelocity (const agx::Vec3 &velocity)
 Set the angular velocity (in world frame) recursively for all rigid bodies stored in assembly. More...
 
void setLocalPosition (const agx::Vec3 &p)
 Set the position of the assembly relative to its frame's parent frame. More...
 
void setLocalPosition (agx::Real x, agx::Real y, agx::Real z)
 Set the position of the assembly relative to its frame's parent frame. More...
 
void setLocalRotation (const agx::Quat &q)
 Set the rotation of the assembly relative to its frame's parent frame. More...
 
void setLocalRotation (const agx::EulerAngles &e)
 Set the rotation of the assembly relative to its frame's parent frame. More...
 
void setLocalTransform (const agx::AffineMatrix4x4 &matrix)
 Assign the local transformation matrix for this assembly, ignoring any eventual parent transformation. More...
 
void setName (const agx::Name &name)
 Set the name of this Assembly. More...
 
bool setParentFrame (agx::Frame *frame)
 Set the parent frame of this assembly's frame. More...
 
void setPosition (const agx::Vec3 &p)
 Set the position of the frame in world coordinates. More...
 
void setPosition (agx::Real x, agx::Real y, agx::Real z)
 Set the position of the frame in world coordinates. More...
 
void setRotation (const agx::Quat &q)
 Set the rotation of the assembly relative to world frame. More...
 
void setRotation (const agx::EulerAngles &e)
 Set the rotation of the assembly relative to world frame. More...
 
void setRotation (const agx::OrthoMatrix3x3 &m)
 Set the rotation of the assembly relative to world frame. More...
 
void setTransform (const agx::AffineMatrix4x4 &matrix)
 Set the transform of the assembly. More...
 
virtual void setVelocity (const agx::Vec3 &velocity)
 Set the linear velocity (in world frame) recursively for all rigid bodies stored in assembly. More...
 
bool transfer (agxSDK::Assembly *target)
 Transfer all the content from this assembly to the target, including name and transformation. More...
 
virtual void traverse (AssemblyVisitor *visitor)
 Traverse the assembly tree recursively using a visitor. More...
 
virtual void traverse (const AssemblyVisitor *visitor) const
 
- 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 agxModel::Deformable1D * getDeformable (agx::RigidBody *body)
 
static agxModel::Deformable1DIterator getIterator (agxModel::Deformable1DNode *node)
 
static agx::Bool isBeginIterator (agxModel::Deformable1DIterator it)
 
- Static Public Member Functions inherited from agxModel::Tree
static agxStream::Serializable * create ()
 
static agxStream::Serializable * create (agxStream::InputArchive &)
 
static Tree * find (agxSDK::Simulation *simulation, const agx::Name &name)
 
static Tree * find (agxSDK::Simulation *simulation, const agx::Uuid &uuid)
 
static TreePtrVector findAll (agxSDK::Simulation *simulation, const agx::Name &name)
 
static TreePtrVector getAll (agxSDK::Simulation *simulation)
 
static const char * getConstructClassId ()
 
static void setAngularVelocityDamping (agxModel::Tree::Branch *branch, const agx::Vec3 &angularVelocityDamping)
 Utility method to set angular velocity damping for all branches. More...
 
static void setDefaultParameters (agx::Material *material)
 Sets default material parameters for a tree. More...
 
static void setLinearVelocityDamping (agxModel::Tree::Branch *branch, const agx::Vec3 &linearVelocityDamping)
 Utility method to set linear velocity damping for all branches. More...
 
- Static Public Member Functions inherited from agxSDK::Assembly
static Assembly * asAssembly (agxStream::Serializable *obj)
 
static agxStream::Serializable * create (agxStream::InputArchive &)
 
static agxStream::Serializable * create ()
 
static const char * getConstructClassId ()
 
- 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

 Deformable1D ()
 Default constructor for serialization. More...
 
virtual ~Deformable1D ()
 Reference counted object, protected destructor. More...
 
virtual agxModel::Tree * clone () override
 
virtual void onCreate (agxModel::Deformable1DNode *node)
 Called when a node is created. More...
 
virtual void post () override
 Post step event callback. More...
 
virtual void pre () override
 Pre event callback. More...
 
void prepareForSolve (agxModel::Deformable1DNode *node) const
 
virtual void removeNotification (agxSDK::Simulation *simulation) override
 Removes all constraints, rigid bodies, geometries etc added during initialize. More...
 
- Protected Member Functions inherited from agxModel::Tree
 Tree (agxModel::Tree::Branch *root)
 
virtual ~Tree ()
 
void add (Branch *branch)
 Adds rigid body, constraint etc to this tree. More...
 
void addGroupID (Branch *branch, agx::UInt32 id)
 Adds the id to the branch geometries. More...
 
virtual void addNotification (agxSDK::Simulation *simulation) override
 Called when this assembly is added to a simulation (given that it not already is in the simulation). More...
 
virtual void checkLoad (Branch *branch)
 Checks current load. More...
 
void configure (Branch *branch)
 Traverse this tree and configures the branches. More...
 
void copyParameters (const Branch *source, Branch *destination) const
 Copy branch parameters from source to destination. More...
 
void copyParameters (const agx::Constraint *source, agx::Constraint *destination) const
 Copy constraint parameters from source to destination. More...
 
Branch * guessConnectingChild (Branch *branch) const
 Searches branch children and examines orientation etc to "guess" which of the children that is along the main/current tree branch. More...
 
virtual void preCollide ()
 Pre-collide event callback. More...
 
void remove (Branch *branch)
 Removes rigid body, constraint etc associated to this tree. More...
 
void removeGroupID (Branch *branch, agx::UInt32 id)
 Removes the id from the branch geometries. More...
 
void setConstraintSolveType (Branch *branch, agx::Constraint::SolveType solveType)
 Assign constraint solve type. More...
 
void setMaterial (Branch *branch, agx::Material *material)
 Assign material to all geometries for branch. More...
 
void simplify (Branch *branch, bool flag, agxSDK::Simulation *simulation)
 Changes motion control and adds/removes constraints depending on flag. More...
 
void split (Branch *source, Branch *destination) const
 Move from source to destination. More...
 
- Protected Member Functions inherited from agxSDK::Assembly
 Assembly (Type type)
 
virtual ~Assembly ()
 Destructor. More...
 
bool addParticleSystem (agx::ParticleSystem *particleSystem)
 Add a particle system to this assembly. More...
 
void addToSimulation (Simulation *simulation)
 
void removeFromSimulation (Simulation *simulation)
 
bool removeParticleSystem (agx::ParticleSystem *particleSystem)
 Remove a particle system from this assembly. 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 ()
 

Protected Attributes

Deformable1DBulkPropertiesRef m_bulkProperties
 
Deformable1DComponentRefVector m_components
 
Deformable1DGeometryFactoryRef m_geometryFactory
 
Deformable1DInitializationReport m_initializationReport
 
Deformable1DRouteRef m_route
 
- Protected Attributes inherited from agxModel::Tree
BranchEventListenerRef m_branchListener
 
agx::ref_ptr< agx::Referenced > m_customData
 
agx::UInt32 m_disabledCollisionsID
 
DisabledCollisionsGeometryContainer m_externalDisabledGeometries
 
agx::UInt32 m_geometriesID
 
GroupIdContainer m_geometryIDs
 
agx::MaterialRef m_material
 
BranchRef m_root
 
int m_state
 
TreeStepEventListenerRef m_stepListener
 
TreeContactEventListenerRef m_wakeOnContactListener
 
- Protected Attributes inherited from agx::Referenced
Mutex m_mutex
 
ObserverContainer m_observers
 
AtomicValue m_refCount
 

Additional Inherited Members

- Public Types inherited from agxModel::Tree
typedef BranchContainer::const_iterator BranchConstIterator
 
typedef agx::Vector< BranchRef > BranchContainer
 
typedef agx::ref_ptr< BranchEventListener > BranchEventListenerRef
 
typedef BranchContainer::iterator BranchIterator
 
typedef agx::observer_ptr< Branch > BranchObs
 
typedef agx::ref_ptr< Branch > BranchRef
 
typedef agx::HashVector< agxCollide::Geometry *, agx::observer_ptr< agxCollide::Geometry > > DisabledCollisionsGeometryContainer
 
typedef agx::SetVector< agx::UInt32 > GroupIdContainer
 
enum  State { INITIALIZED = (1<<0), STATIC = (1<<1), WAKE_ON_CONTACT = (1<<2), RESTORING = (1<<3) }
 
typedef agx::ref_ptr< TreeExecuteFilter > TreeExecuteFilterRef
 
- Public Types inherited from agxSDK::Assembly
enum  Type { ASSEMBLY, COLLECTION }
 Specifies the type an assembly is. More...
 
- Protected Types inherited from agxModel::Tree
typedef agx::ref_ptr< TreeContactEventListener > TreeContactEventListenerRef
 
typedef agx::ref_ptr< TreeStepEventListener > TreeStepEventListenerRef
 
- 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...
 

Detailed Description

One dimensional deformable construction, i.e., objects attached successively.

A Deformable1D may be used to simulate elasto-plastic cables, wires, beams etc.

Definition at line 36 of file Deformable1D.h.

Constructor & Destructor Documentation

◆ Deformable1D() [1/2]

agxModel::Deformable1D::Deformable1D ( agxModel::Deformable1DRoute *  route,
agxModel::Deformable1DGeometryFactory *  geometryFactory 
)

Construct given route.

Parameters
route- route to initialize this object

◆ Deformable1D() [2/2]

agxModel::Deformable1D::Deformable1D ( )
protected

Default constructor for serialization.

◆ ~Deformable1D()

virtual agxModel::Deformable1D::~Deformable1D ( )
protectedvirtual

Reference counted object, protected destructor.

Member Function Documentation

◆ addComponent()

void agxModel::Deformable1D::addComponent ( agxModel::Deformable1DComponent *  component)

Add another component governing the behavior of this Deformable1D.

Parameters
component- The component that this Deformable1D should have.

◆ attachmentAdded()

void agxModel::Deformable1D::attachmentAdded ( agxModel::Deformable1DNode *  node,
agxModel::NodeAttachment *  attachment 
)

◆ calculateNumberOfNodes()

agx::UInt agxModel::Deformable1D::calculateNumberOfNodes ( ) const

Calculates the number of nodes present in current structure.

If not initialized the number of nodes is 0 (i.e., the route nodes aren't included).

Returns
the number of nodes

◆ clear()

virtual void agxModel::Deformable1D::clear ( )
overridevirtual

Remove all branches from this tree.

Reimplemented from agxModel::Tree.

◆ clone()

virtual agxModel::Tree* agxModel::Deformable1D::clone ( )
overrideprotectedvirtual
Returns
a clone of this object

Reimplemented from agxModel::Tree.

◆ create() [1/2]

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

Definition at line 175 of file Deformable1D.h.

◆ create() [2/2]

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

Definition at line 175 of file Deformable1D.h.

◆ findLastIterator()

agxModel::Deformable1DIterator agxModel::Deformable1D::findLastIterator ( ) const
Returns
Iterator to the last element in the structure.

◆ getBegin()

agxModel::Deformable1DNode* agxModel::Deformable1D::getBegin ( ) const
Returns
the begin node, i.e., the first element in the structure

◆ getBeginIterator()

agxModel::Deformable1DIterator agxModel::Deformable1D::getBeginIterator ( ) const
Returns
the begin iterator

◆ getBulkProperties()

agxModel::Deformable1DBulkProperties* agxModel::Deformable1D::getBulkProperties ( ) const
Returns
the bulk properties

◆ getClassName()

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

Reimplemented from agxStream::Serializable.

Definition at line 175 of file Deformable1D.h.

◆ getComponent() [1/2]

agxModel::Deformable1DComponent* agxModel::Deformable1D::getComponent ( agx::UInt  index)

Gives access to the Deformable1DComponent held by this Deformable1D.

Returns
The Deformable1DComponent stored at the given index, or nullptr.

◆ getComponent() [2/2]

const agxModel::Deformable1DComponent* agxModel::Deformable1D::getComponent ( agx::UInt  index) const

◆ getConstructClassId()

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

Definition at line 175 of file Deformable1D.h.

◆ getDeformable()

static agxModel::Deformable1D* agxModel::Deformable1D::getDeformable ( agx::RigidBody *  body)
static
Returns
The Deformable1D that the given body is part of, or nullptr if not part of any Deformable1D.

◆ getGeometryFactory()

agxModel::Deformable1DGeometryFactory* agxModel::Deformable1D::getGeometryFactory ( ) const
Returns
geometry factory used to create the geometries

◆ getInitializationReport()

agxModel::Deformable1DInitializationReport agxModel::Deformable1D::getInitializationReport ( ) const
Returns
the initialization report

◆ getIterator()

static agxModel::Deformable1DIterator agxModel::Deformable1D::getIterator ( agxModel::Deformable1DNode *  node)
static
Parameters
node- node to find iterator for
Returns
iterator to the given node

◆ getNumComponents()

agx::UInt agxModel::Deformable1D::getNumComponents ( ) const
Returns
The number of components held by this Deformable1D.

◆ getRoute()

agxModel::Deformable1DRoute* agxModel::Deformable1D::getRoute ( ) const
Returns
the route algorithm

◆ getStorageAgent()

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

Implements agxStream::Serializable.

Definition at line 175 of file Deformable1D.h.

◆ initialize()

virtual bool agxModel::Deformable1D::initialize ( )
overridevirtual

Initialize this object given the current route.

This method will be called automatically when this Deformable1D is added to a simulation - so there's no need to explicitly call this method.

Returns
true if initialization process were successful

Reimplemented from agxModel::Tree.

◆ isBeginIterator()

static agx::Bool agxModel::Deformable1D::isBeginIterator ( agxModel::Deformable1DIterator  it)
static
Returns
true if the iterator is begin of a Deformable1D structure

◆ onCreate()

virtual void agxModel::Deformable1D::onCreate ( agxModel::Deformable1DNode *  node)
protectedvirtual

Called when a node is created.

◆ post()

virtual void agxModel::Deformable1D::post ( )
overrideprotectedvirtual

Post step event callback.

Check max load and fire events.

Reimplemented from agxModel::Tree.

◆ pre()

virtual void agxModel::Deformable1D::pre ( )
overrideprotectedvirtual

Pre event callback.

Reimplemented from agxModel::Tree.

◆ prepareForSolve()

void agxModel::Deformable1D::prepareForSolve ( agxModel::Deformable1DNode *  node) const
protected

◆ rebind()

bool agxModel::Deformable1D::rebind ( ) const

Make the current relative positions of all nodes the rest state.

That is, when this call returns no constraint in the Deformable1D will be violated. Constraints that are part of an attachment on a node in the cable are not affected.

Should only be called after the Deformable1D has been initialized.

Returns
True if the Deformable1D was initialized. False otherwise.

◆ removeComponent()

bool agxModel::Deformable1D::removeComponent ( agxModel::Deformable1DComponent *  component)

Removed the given component from this Deformable1D.

Has no effect if the given component is not part of this Deformable1D.

Parameters
component- The component to remove.
Returns
True if the component was removed. False otherwise.

◆ removeNotification()

virtual void agxModel::Deformable1D::removeNotification ( agxSDK::Simulation *  simulation)
overrideprotectedvirtual

Removes all constraints, rigid bodies, geometries etc added during initialize.

Reimplemented from agxModel::Tree.

◆ restore()

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

Reimplemented from agxModel::Tree.

◆ restoreLightData()

virtual void agxModel::Deformable1D::restoreLightData ( agxStream::StorageStream &  str)
overridevirtual

Restore structural independent data from stream.

◆ setBulkProperties()

void agxModel::Deformable1D::setBulkProperties ( agxModel::Deformable1DBulkProperties *  bulkProperties)

Assign new bulk properties object.

If null, a default bulk properties object will be created.

Parameters
bulkProperties- new bulk properties

◆ store()

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

Reimplemented from agxModel::Tree.

◆ storeLightData()

virtual void agxModel::Deformable1D::storeLightData ( agxStream::StorageStream &  str) const
overridevirtual

Store structural independent data to stream.

◆ tryInitialize()

agxModel::Deformable1DInitializationReport agxModel::Deformable1D::tryInitialize ( )

Attempt an initialization with the current settings.

If the Deformable1D has been initialized already then nothing is done and the old initialization report is returned.

Returns
Initialization report describing the quality of the found route.

Member Data Documentation

◆ m_bulkProperties

Deformable1DBulkPropertiesRef agxModel::Deformable1D::m_bulkProperties
protected

Definition at line 224 of file Deformable1D.h.

◆ m_components

Deformable1DComponentRefVector agxModel::Deformable1D::m_components
protected

Definition at line 227 of file Deformable1D.h.

◆ m_geometryFactory

Deformable1DGeometryFactoryRef agxModel::Deformable1D::m_geometryFactory
protected

Definition at line 223 of file Deformable1D.h.

◆ m_initializationReport

Deformable1DInitializationReport agxModel::Deformable1D::m_initializationReport
protected

Definition at line 225 of file Deformable1D.h.

◆ m_route

Deformable1DRouteRef agxModel::Deformable1D::m_route
protected

Definition at line 222 of file Deformable1D.h.


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