AGXDynamics  2.31.1.0
agxModel::Deformable1D Class Reference

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

#include <Deformable1D.h>

+ Inheritance diagram for agxModel::Deformable1D:

Public Types

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) }
 
typedef agx::ref_ptr< TreeExecuteFilter > TreeExecuteFilterRef
 
enum  Type { ASSEMBLY, COLLECTION }
 Specifies the type an assembly is. More...
 

Public Member Functions

 Deformable1D (agxModel::Deformable1DRoute *route, agxModel::Deformable1DGeometryFactory *geometryFactory)
 Construct given route. 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 (agxStream::Serializable *object)
 Add an object of type serialized. More...
 
void addComponent (agxModel::Deformable1DComponent *component)
 Add another component governing the behavior of this Deformable1D. More...
 
bool addGroupID (agx::UInt32 id)
 Add group id to all geometries in this tree. More...
 
virtual void addNotification (Assembly *)
 Called when this assembly is added to another assembly. 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
 
virtual bool attach (agx::RigidBody *rb, agx::Frame *frame)
 Attach bottom branch to an object given attachment frame. 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...
 
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::Deformable1DIterator findLastIterator () const
 
const AssemblyRefSet & 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...
 
agxModel::Deformable1DNode * getBegin () const
 
agxModel::Deformable1DIterator getBeginIterator () const
 
agxModel::Tree::BranchEventListener * getBranchEventListener () 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
 
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::ConstraintRefSet & getConstraints () const
 
agx::Referenced * getCustomData () const
 
const agx::EmitterRefSet & getEmitters () const
 
bool getEnableCollisions (const agx::RigidBody *rb) const
 
bool getEnableCollisions (const agxCollide::Geometry *geometry) const
 
bool getEnableSerialization () const
 
bool getEnableUuidGeneration ()
 
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::GeometryRefSet & 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...
 
agxModel::Deformable1DGeometryFactory * getGeometryFactory () const
 
agx::UInt32 getIndex () const
 This index is given at creation of this object. More...
 
agxModel::Deformable1DInitializationReport getInitializationReport () const
 
const InteractionRefSetVector & getInteractions () const
 
agx::Vec3 getLocalPosition () const
 
agx::Quat getLocalRotation () const
 
const agx::AffineMatrix4x4 & getLocalTransform () const
 
agx::Material * getMaterial () const
 
agx::Name getName () const
 
agx::UInt getNumComponents () 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 ObserverFrameRefSetVector & getObserverFrames () const
 
Assembly * getParent ()
 
const Assembly * getParent () const
 
agx::Frame * getParentFrame ()
 
const agx::Frame * getParentFrame () const
 
const agxSDK::ParticleSystemRefSet & getParticleSystems () const
 
int getReferenceCount () const
 
const agx::RigidBodyRefSet & 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...
 
Branch * getRoot () const
 
agxModel::Deformable1DRoute * getRoute () const
 
agxSDK::Simulation * getSimulation ()
 
const agxSDK::Simulation * getSimulation () const
 
agxStream::StorageAgent * getStorageAgent () const override
 
Type getType () const
 
agx::Uuid getUuid () const
 
bool hasGroupID (agx::UInt32 id) const
 
virtual bool initialize () override
 Initialize this object given the current route. More...
 
bool initialized () const
 
template<typename T >
bool is () const
 Subclass test. More...
 
bool isFinished () 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 rebind () const
 Make the current relative positions of all nodes the rest state. 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...
 
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)
 Remove a rigid body from this assembly (does not recurse down in tree). More...
 
bool remove (agxCollide::Geometry *geometry)
 Remove a geometry from this assembly (does not recurse down in tree). More...
 
bool remove (Assembly *assembly)
 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)
 Remove an ObserverFrame from this assembly. More...
 
bool removeComponent (agxModel::Deformable1DComponent *component)
 Removed the given component from this Deformable1D. More...
 
bool removeGroupID (agx::UInt32 id)
 Removes group id from all geometries in this tree. More...
 
virtual void removeNotification (Assembly *)
 Called when this assembly is removed from another assembly. More...
 
virtual void restore (agxStream::InputArchive &in) override
 
virtual void restoreLightData (agxStream::StorageStream &str) override
 Restore structural independent data from stream. More...
 
virtual void setAngularVelocity (const agx::Vec3 &velocity)
 Set the angular velocity (in world frame) recursively for all rigid bodies stored in assembly. More...
 
virtual void setBranchEventListener (agxModel::Tree::BranchEventListener *branchListener)
 Assign branch event listener. More...
 
void setBulkProperties (agxModel::Deformable1DBulkProperties *bulkProperties)
 Assign new bulk properties object. 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...
 
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 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...
 
virtual void setMaterial (agx::Material *material)
 Assign new material. 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...
 
void setUuid (const agx::Uuid &uuid)
 Explicitly set a Uuid on a serializable object. More...
 
virtual void setVelocity (const agx::Vec3 &velocity)
 Set the linear velocity (in world frame) recursively for all rigid bodies stored in assembly. 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...
 
virtual void store (agxStream::OutputArchive &out) const override
 
virtual void storeLightData (agxStream::StorageStream &str) const override
 Store structural independent data to stream. More...
 
virtual void traverse (AssemblyVisitor *visitor)
 Traverse the assembly tree recursively using a visitor. More...
 
virtual void traverse (const AssemblyVisitor *visitor) const
 
agxModel::Deformable1DInitializationReport tryInitialize ()
 Attempt an initialization with the current settings. 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...
 
bool wakeOnContact () const
 

Static Public Member Functions

static Assembly * asAssembly (agxStream::Serializable *obj)
 
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 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 setEnableUuidGeneration (bool flag)
 Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled. More...
 
static void setLinearVelocityDamping (agxModel::Tree::Branch *branch, const agx::Vec3 &linearVelocityDamping)
 Utility method to set linear velocity damping for all branches. More...
 
template<typename T >
static bool ValidateCast (const Referenced *object)
 

Protected Types

typedef agx::ref_ptr< TreeContactEventListener > TreeContactEventListenerRef
 
typedef agx::ref_ptr< TreeStepEventListener > TreeStepEventListenerRef
 

Protected Member Functions

 Deformable1D ()
 Default constructor for serialization. More...
 
virtual ~Deformable1D ()
 Reference counted object, protected destructor. More...
 
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)
 Called when this assembly is added to a simulation (given that it not already is in the simulation). More...
 
bool addParticleSystem (agx::ParticleSystem *particleSystem)
 Add a particle system to this assembly. More...
 
void addToSimulation (Simulation *simulation)
 
void allocateObserverVector () const
 
virtual void checkLoad (Branch *branch)
 Checks current load. More...
 
virtual agxModel::Tree * clone () override
 
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...
 
void deleteUsingDeleteHandler () const
 
void generateUuid ()
 
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 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...
 
virtual void preCollide ()
 Pre-collide event callback. More...
 
void prepareForSolve (agxModel::Deformable1DNode *node) const
 
void remove (Branch *branch)
 Removes rigid body, constraint etc associated to this tree. More...
 
void removeFromSimulation (Simulation *simulation)
 
void removeGroupID (Branch *branch, agx::UInt32 id)
 Removes the id from the branch geometries. More...
 
virtual void removeNotification (agxSDK::Simulation *simulation) override
 Removes all constraints, rigid bodies, geometries etc added during initialize. More...
 
bool removeParticleSystem (agx::ParticleSystem *particleSystem)
 Remove a particle system from this assembly. 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...
 

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

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

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.

Member Typedef Documentation

◆ BranchConstIterator

◆ BranchContainer

Definition at line 45 of file agxModel/Tree.h.

◆ BranchEventListenerRef

◆ BranchIterator

Definition at line 46 of file agxModel/Tree.h.

◆ BranchObs

Definition at line 44 of file agxModel/Tree.h.

◆ BranchRef

Definition at line 41 of file agxModel/Tree.h.

◆ DisabledCollisionsGeometryContainer

◆ GroupIdContainer

Definition at line 49 of file agxModel/Tree.h.

◆ TreeContactEventListenerRef

◆ TreeExecuteFilterRef

◆ TreeStepEventListenerRef

Definition at line 738 of file agxModel/Tree.h.

Member Enumeration Documentation

◆ State

enum agxModel::Tree::State
inherited
Enumerator
INITIALIZED 
STATIC 
WAKE_ON_CONTACT 

Definition at line 347 of file agxModel/Tree.h.

◆ Type

enum agxSDK::Assembly::Type
inherited

Specifies the type an assembly is.

Enumerator
ASSEMBLY 

This is a full fledged Assembly which uses Frame for the hierarchy.

COLLECTION 

This is only a collection of objects NOT using Frame for the hierarchy.

Definition at line 615 of file Assembly.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

◆ add() [1/11]

bool agxSDK::Assembly::add ( agx::Constraint *  constraint)
inherited

Add a constraint to the assembly.

Returns
true when the constraint has been successfully added - otherwise false (constraint is nullptr or already present in this assembly)

◆ add() [2/11]

bool agxSDK::Assembly::add ( agx::Interaction *  interaction)
inherited

Add an interaction to this assembly.

Returns
true when the interaction has been successfully added - otherwise false (interaction is nullptr or already present in this assembly)

◆ add() [3/11]

bool agxSDK::Assembly::add ( agxSDK::EventListener *  listener)
inherited

Add a listener to the assembly.

Returns
true when the listener has been successfully added - otherwise false (listener is nullptr or already present in this assembly)

◆ add() [4/11]

bool agxSDK::Assembly::add ( agx::RigidBody *  body)
inherited

Add a rigid body to the assembly.

Returns
true when the rigid body has been successfully added - otherwise false (the rigid body is nullptr or already present in this assembly)

◆ add() [5/11]

bool agxSDK::Assembly::add ( agxCollide::Geometry *  geometry)
inherited

Add a geometry to the assembly.

Returns
true when the geometry has been successfully added - otherwise false (the geometry is nullptr or already present in this assembly)

◆ add() [6/11]

bool agxSDK::Assembly::add ( Assembly *  assembly)
inherited

Add another assembly as child to this assembly.

Returns
true when the assembly has been successfully added - otherwise false (the assembly is nullptr or already present in this assembly)

◆ add() [7/11]

bool agxSDK::Assembly::add ( agx::ContactMaterial *  contactMaterial)
inherited

Add a contact material to this assembly.

Returns
true when the contact material has been successfully added - otherwise false (the contact material is nullptr or already present in this assembly)

◆ add() [8/11]

bool agxSDK::Assembly::add ( agx::Emitter *  emitter)
inherited

Add an emitter to this assembly.

Returns
true when the emitter has been successfully added - otherwise false (the emitter is nullptr or already present in this assembly)

◆ add() [9/11]

bool agxSDK::Assembly::add ( agx::ObserverFrame *  observerFrame)
inherited

Add an ObserverFrame to this assembly.

Returns
true when the observer frame has been successfully added - otherwise false (the observer frame is nullptr or already present in this assembly)

◆ add() [10/11]

bool agxSDK::Assembly::add ( agxStream::Serializable *  object)
inherited

Add an object of type serialized.

The object will be dynamically cast to the types supported by add() methods an appropriately added to this Assembly.

Returns
true when the object has been successfully added - otherwise false (the object is nullptr or already present in this assembly)

◆ add() [11/11]

void agxModel::Tree::add ( Branch *  branch)
protectedinherited

Adds rigid body, constraint etc to this tree.

Recursive.

Parameters
branch- branch with rigid body and constraint to add

◆ 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.

◆ addGroupID() [1/2]

bool agxModel::Tree::addGroupID ( agx::UInt32  id)
inherited

Add group id to all geometries in this tree.

Parameters
id- id to add to all geometries in this tree
Returns
true if valid add

◆ addGroupID() [2/2]

void agxModel::Tree::addGroupID ( Branch *  branch,
agx::UInt32  id 
)
protectedinherited

Adds the id to the branch geometries.

Recursive.

Parameters
branch- current branch
id- id to add

◆ addNotification() [1/2]

virtual void agxSDK::Assembly::addNotification ( Assembly *  )
inlinevirtualinherited

Called when this assembly is added to another assembly.

Reimplemented in agxPowerLine::PowerLine.

Definition at line 589 of file Assembly.h.

◆ addNotification() [2/2]

virtual void agxModel::Tree::addNotification ( agxSDK::Simulation *  )
protectedvirtualinherited

Called when this assembly is added to a simulation (given that it not already is in the simulation).

Reimplemented from agxSDK::Assembly.

Reimplemented in agxOSG::Tree.

Referenced by agxOSG::Tree::Tree().

◆ addParticleSystem()

bool agxSDK::Assembly::addParticleSystem ( agx::ParticleSystem *  particleSystem)
protectedinherited

Add a particle system to this assembly.

ParticleSystems should only be added to Collections.

◆ addToSimulation()

void agxSDK::Assembly::addToSimulation ( Simulation *  simulation)
protectedinherited

◆ allocateObserverVector()

void agx::Referenced::allocateObserverVector ( ) const
protectedinherited

◆ as() [1/2]

template<typename T >
T* agx::Referenced::as ( )
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().

◆ as() [2/2]

template<typename T >
const T* agx::Referenced::as ( ) const
inherited

◆ asAssembly()

static Assembly* agxSDK::Assembly::asAssembly ( agxStream::Serializable *  obj)
inlinestaticinherited
Returns
a pointer to an Assembly if obj is infact an Assembly

Definition at line 636 of file Assembly.h.

◆ asSafe() [1/2]

template<typename T >
T* agx::Referenced::asSafe ( )
inherited

Safe subclass casting, return nullptr if template type does not match.

Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().

◆ asSafe() [2/2]

template<typename T >
const T* agx::Referenced::asSafe ( ) const
inherited

◆ attach()

virtual bool agxModel::Tree::attach ( agx::RigidBody *  rb,
agx::Frame *  frame 
)
virtualinherited

Attach bottom branch to an object given attachment frame.

Make sure this tree has the correct transform when calling this method.

Parameters
rb- attach to rigid body (if 0, attached to world)
frame- attachment frame, will be calculated in this method (invalid if 0)
Returns
true if attach is successful - otherwise false (not initialized, frame = 0, root->getNumBranches() = 0)

◆ 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

◆ checkLoad()

virtual void agxModel::Tree::checkLoad ( Branch *  branch)
protectedvirtualinherited

Checks current load.

If it exceeds the maximum load an event is fired. Recursive.

Parameters
branch- current branch

◆ 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.

◆ configure()

void agxModel::Tree::configure ( Branch *  branch)
protectedinherited

Traverse this tree and configures the branches.

Recursive.

Parameters
branch- current branch

◆ copyParameters() [1/2]

void agxModel::Tree::copyParameters ( const Branch *  source,
Branch *  destination 
) const
protectedinherited

Copy branch parameters from source to destination.

◆ copyParameters() [2/2]

void agxModel::Tree::copyParameters ( const agx::Constraint *  source,
agx::Constraint *  destination 
) const
protectedinherited

Copy constraint parameters from source to destination.

◆ 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.

◆ cut() [1/2]

virtual Tree* agxModel::Tree::cut ( agxCollide::Geometry *  geometry,
const agx::Vec3 &  point,
agx::Real  minShapeHeight = agx::Real(1E-2) 
)
virtualinherited

Cut geometry (only one shape per geometry supported) given point in world and minimum shape height, after cut.

If cut is too close to the shape ends (minShapeHeight), the cut is made between two geometries or directly at a branch connection.

This method first splits this tree (see split method) and later cuts given the branch returned from split.

Note
Split and cut assumes that the geometries in a branch are ordered in position with first geometry furthest down in branch body coordinates.
Parameters
geometry- geometry to cut (only one shape per geometry supported)
point- point in world
minShapeHeight- resulting geometry/shape minimum height (default: 1 cm)
Returns
new tree "above" branch with geometry geometry

◆ cut() [2/2]

virtual Tree* agxModel::Tree::cut ( agxModel::Tree::Branch *  branch)
virtualinherited

Cut at branch and get a new tree.

Branch branch will be member (first child of root) in the new tree.

Parameters
branch- cut position in tree
Returns
new tree

◆ deleteUsingDeleteHandler()

void agx::Referenced::deleteUsingDeleteHandler ( ) const
protectedinherited

◆ findBranch() [1/2]

Branch* agxModel::Tree::findBranch ( const agx::RigidBody *  rb) const
inherited

Search the tree for rigid body rb.

Parameters
rb- rigid body to search for
Returns
branch with rigid body rb (0 if not found)

◆ findBranch() [2/2]

Branch* agxModel::Tree::findBranch ( const agxModel::Tree::Branch *  fromBranch,
const agx::RigidBody *  rb 
) const
inherited

Search the tree for rigid body rb given start branch (i.e., whole tree if root).

Recursive.

Parameters
fromBranch- branch to start from
rb- rigid body to search for
Returns
branch with rigid body rb (0 if not found)

◆ findLastIterator()

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

◆ generateUuid()

void agxStream::Serializable::generateUuid ( )
protectedinherited

◆ getAssemblies()

const AssemblyRefSet& agxSDK::Assembly::getAssemblies ( ) const
inherited
Returns
a const reference to the Assemblies in this Assembly (not tracing recursively into sub-assemblies)

◆ getAssembly() [1/4]

const agxSDK::Assembly* agxSDK::Assembly::getAssembly ( const agx::Name &  name,
bool  recursive = true 
) const
inherited

Find (linear search) and return named Assembly.

Parameters
name- name of the Assembly to find
recursive- if true (default) the search will include sub-assemblies
Returns
pointer to the found Assembly, null if not found

◆ getAssembly() [2/4]

agxSDK::Assembly* agxSDK::Assembly::getAssembly ( const agx::Name &  name,
bool  recursive = true 
)
inherited

Find (linear search) and return named Assembly.

Parameters
name- name of the Assembly to find
recursive- if true (default) the search will include sub-assemblies
Returns
pointer to the found Assembly, null if not found

◆ getAssembly() [3/4]

const agxSDK::Assembly* agxSDK::Assembly::getAssembly ( const agx::Uuid &  uuid,
bool  recursive = true 
) const
inherited

Find (linear search) and return an Assembly matching the given uuid.

Parameters
uuid- uuid of the Assembly to find
recursive- if true (default) the search will include sub-assemblies
Returns
pointer to the found Assembly, null if not found

◆ getAssembly() [4/4]

agxSDK::Assembly* agxSDK::Assembly::getAssembly ( const agx::Uuid &  uuid,
bool  recursive = true 
)
inherited

Find (linear search) and return an Assembly matching the given uuid.

Parameters
uuid- uuid of the Assembly to find
recursive- if true (default) the search will include sub-assemblies
Returns
pointer to the found Assembly, null if not found

◆ 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

◆ getBranchEventListener()

agxModel::Tree::BranchEventListener* agxModel::Tree::getBranchEventListener ( ) const
inherited
Returns
the branch event listener assigned to this tree - 0 if none

◆ 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

◆ getConstraint() [1/6]

const agx::Constraint* agxSDK::Assembly::getConstraint ( const agx::Uuid &  uuid,
bool  recursive = true 
) const
inherited

Find (linear search) and return a pointer to a Constraint with the given uuid.

Parameters
uuid- uuid of the requested constraint
recursive- if true (default) the search will include sub-assemblies
Returns
const pointer to the found constraint, null if not found

◆ getConstraint() [2/6]

agx::Constraint* agxSDK::Assembly::getConstraint ( const agx::Uuid &  uuid,
bool  recursive = true 
)
inherited

Find and return a pointer to a Constraint with the given uuid.

Parameters
uuid- uuid of the requested constraint
recursive- if true (default) the search will include sub-assemblies
Returns
pointer to the found Constraint, null if not found

◆ getConstraint() [3/6]

const agx::Constraint* agxSDK::Assembly::getConstraint ( const agx::Name &  name,
bool  recursive = true 
) const
inherited

Find (linear search) and return named Constraint.

Parameters
name- name of the Constraint to find
recursive- if true (default) the search will include sub-assemblies
Returns
pointer to the found Constraint, null if not found

◆ getConstraint() [4/6]

agx::Constraint* agxSDK::Assembly::getConstraint ( const agx::Name &  name,
bool  recursive = true 
)
inherited

Find (linear search) and return named Constraint.

Parameters
name- name of the Constraint to find
recursive- if true (default) the search will include sub-assemblies
Returns
pointer to the found Constraint, null if not found

◆ getConstraint() [5/6]

template<typename T >
T * agxSDK::Assembly::getConstraint ( const agx::Name &  name,
bool  recursive = true 
)
inherited

Find and return named Constraint of a template type, for example Hinge:

agx::Hinge *hinge = simulation->getConstraint<agx::Hinge>("FrontWheelHinge");

Parameters
name- name of the Constraint to find
recursive- if true (default) the search will include sub-assemblies
Returns
typed pointer to the found Constraint, null if not found

Definition at line 757 of file Assembly.h.

◆ getConstraint() [6/6]

template<typename T >
const T * agxSDK::Assembly::getConstraint ( const agx::Name &  name,
bool  recursive = true 
) const
inherited

Find and return named Constraint of a template type, for example Hinge:

const agx::Hinge* hinge = simulation->getConstraint<agx::Hinge>("FrontWheelHinge");

Parameters
name- name of the Constraint to find
recursive- if true (default) the search will include sub-assemblies
Returns
typed pointer to the found Constraint, null if not found

Definition at line 763 of file Assembly.h.

◆ getConstraint1DOF()

agx::Constraint1DOF* agxSDK::Assembly::getConstraint1DOF ( const agx::Name &  name,
bool  recursive = true 
)
inlineinherited

Definition at line 632 of file Assembly.h.

◆ getConstraint2DOF()

agx::Constraint2DOF* agxSDK::Assembly::getConstraint2DOF ( const agx::Name &  name,
bool  recursive = true 
)
inlineinherited

Definition at line 633 of file Assembly.h.

◆ getConstraints()

const agx::ConstraintRefSet& agxSDK::Assembly::getConstraints ( ) const
inherited
Returns
a const reference to the Constraints in this Assembly (not tracing recursively into sub-assemblies)

◆ getConstructClassId()

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

Definition at line 175 of file Deformable1D.h.

◆ getCustomData()

agx::Referenced* agxModel::Tree::getCustomData ( ) const
inherited
Returns
any custom data assigned to this tree

◆ 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.

◆ getDeleteHandler()

static DeleteHandler* agx::Referenced::getDeleteHandler ( )
staticprotectedinherited
Returns
a DeleteHandler.

◆ getEmitters()

const agx::EmitterRefSet& agxSDK::Assembly::getEmitters ( ) const
inherited
Returns
a const reference to the Emitters in this Assembly (not tracing recursively into sub-assemblies)

◆ getEnableCollisions() [1/2]

bool agxModel::Tree::getEnableCollisions ( const agx::RigidBody *  rb) const
inherited
Returns
true if collisions is enabled between this tree and all geometries in rb

◆ getEnableCollisions() [2/2]

bool agxModel::Tree::getEnableCollisions ( const agxCollide::Geometry *  geometry) const
inherited
Returns
true if collisions is enabled between this tree and geometry

◆ getEnableSerialization()

bool agxStream::Serializable::getEnableSerialization ( ) const
inherited
Returns
true if serialization is enabled for this object

Definition at line 273 of file Serializable.h.

◆ getEnableUuidGeneration()

bool agxStream::Serializable::getEnableUuidGeneration ( )
inherited
Returns
true if Uuid:s should be generated for each new Serializable object

◆ getFrame() [1/2]

agx::Frame * agxSDK::Assembly::getFrame ( )
inlinevirtualinherited

Return a reference to the frame containing transformation and velocity information for this assembly.

Definition at line 690 of file Assembly.h.

◆ getFrame() [2/2]

const agx::Frame * agxSDK::Assembly::getFrame ( ) const
inlinevirtualinherited

Definition at line 695 of file Assembly.h.

◆ getGeometries()

const agxCollide::GeometryRefSet& agxSDK::Assembly::getGeometries ( ) const
inherited
Returns
a const reference to the Geometries in this Assembly (not tracing recursively into sub-assemblies)

Referenced by agxSDK::matchFilter().

◆ getGeometry() [1/4]

const agxCollide::Geometry* agxSDK::Assembly::getGeometry ( const agx::Name &  name,
bool  recursive = true 
) const
inherited

Find (linear search) and return named collision Geometry.

Parameters
name- name of the collision Geometry to find
recursive- if true (default) the search will include sub-assemblies
Returns
pointer to the found collision Geometry, null if not found

◆ getGeometry() [2/4]

agxCollide::Geometry* agxSDK::Assembly::getGeometry ( const agx::Name &  name,
bool  recursive = true 
)
inherited

Find (linear search) and return named collision Geometry.

Parameters
name- name of the collision Geometry to find
recursive- if true (default) the search will include sub-assemblies
Returns
pointer to the found collision Geometry, null if not found

◆ getGeometry() [3/4]

const agxCollide::Geometry* agxSDK::Assembly::getGeometry ( const agx::Uuid &  uuid,
bool  recursive = true 
) const
inherited

Find (linear search) and return a Geometry matching the given uuid.

Parameters
uuid- uuid of the collision Geometry to find
recursive- if true (default) the search will include sub-assemblies
Returns
pointer to the found collision Geometry, null if not found

◆ getGeometry() [4/4]

agxCollide::Geometry* agxSDK::Assembly::getGeometry ( const agx::Uuid &  uuid,
bool  recursive = true 
)
inherited

Find (linear search) and return a Geometry matching the given uuid.

Parameters
uuid- uuid of the collision Geometry to find
recursive- if true (default) the search will include sub-assemblies
Returns
pointer to the found collision Geometry, null if not found

◆ getGeometryFactory()

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

◆ getIndex()

agx::UInt32 agxStream::Serializable::getIndex ( ) const
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.

Returns
an instance index of this object. This is unique for the lifetime of this library instance.

Definition at line 247 of file Serializable.h.

◆ getInitializationReport()

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

◆ getInteractions()

const InteractionRefSetVector& agxSDK::Assembly::getInteractions ( ) const
inherited
Returns
interactions in this assembly (not tracing recursively into sub-assemblies)

◆ getIterator()

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

◆ getLocalPosition()

agx::Vec3 agxSDK::Assembly::getLocalPosition ( ) const
inherited
Returns
- the relative translate to the parent frame of the assembly's frame.

◆ getLocalRotation()

agx::Quat agxSDK::Assembly::getLocalRotation ( ) const
inherited
Returns
- the assembly's rotation relative to its frame's parent frame.

◆ getLocalTransform()

const agx::AffineMatrix4x4& agxSDK::Assembly::getLocalTransform ( ) const
inherited
Returns
- the local transformation matrix of the assembly's frame, relative to the parent's frame.

◆ getMaterial()

agx::Material* agxModel::Tree::getMaterial ( ) const
inherited
Returns
current material

◆ getName()

agx::Name agxSDK::Assembly::getName ( ) const
inherited
Returns
the name of this Assembly

◆ getNumComponents()

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

◆ getObserverFrame() [1/4]

const agx::ObserverFrame* agxSDK::Assembly::getObserverFrame ( const agx::Name &  name,
bool  recursive = true 
) const
inherited

Find (linear search) and return an ObserverFrame matching the given uuid.

Parameters
name- name of the ObserverFrame to find
recursive- if true (default) the search will include sub-assemblies
Returns
pointer to the found ObserverFrame, null if not found

◆ getObserverFrame() [2/4]

agx::ObserverFrame* agxSDK::Assembly::getObserverFrame ( const agx::Name &  name,
bool  recursive = true 
)
inherited

Find (linear search) and return an ObserverFrame matching the given uuid.

Parameters
name- name of the ObserverFrame to find
recursive- if true (default) the search will include sub-assemblies
Returns
pointer to the found ObserverFrame, null if not found

◆ getObserverFrame() [3/4]

const agx::ObserverFrame* agxSDK::Assembly::getObserverFrame ( const agx::Uuid &  uuid,
bool  recursive = true 
) const
inherited

Find (linear search) and return an ObserverFrame matching the given uuid.

Parameters
uuid- uuid of the ObserverFrame to find
recursive- if true (default) the search will include sub-assemblies
Returns
pointer to the found ObserverFrame, null if not found

◆ getObserverFrame() [4/4]

agx::ObserverFrame* agxSDK::Assembly::getObserverFrame ( const agx::Uuid &  uuid,
bool  recursive = true 
)
inherited

Find (linear search) and return an ObserverFrame matching the given uuid.

Parameters
uuid- uuid of the ObserverFrame to find
recursive- if true (default) the search will include sub-assemblies
Returns
pointer to the found ObserverFrame, null if not found

◆ getObserverFrames()

const ObserverFrameRefSetVector& agxSDK::Assembly::getObserverFrames ( ) const
inherited
Returns
observers in this assembly (not tracing recursively into sub-assemblies)

◆ getParent() [1/2]

Assembly* agxSDK::Assembly::getParent ( )
inherited
Returns
the parent assembly if this assembly is part of another assembly.

◆ getParent() [2/2]

const Assembly* agxSDK::Assembly::getParent ( ) const
inherited
Returns
the parent assembly if this assembly is part of another assembly.

◆ getParentFrame() [1/2]

agx::Frame* agxSDK::Assembly::getParentFrame ( )
inherited
Returns
- the parent frame of the assembly's frame, or 0 if this frame has no parent

◆ getParentFrame() [2/2]

const agx::Frame* agxSDK::Assembly::getParentFrame ( ) const
inherited
Returns
- the parent frame of the assembly's frame, or 0 if this frame has no parent

◆ getParticleSystems()

const agxSDK::ParticleSystemRefSet& agxSDK::Assembly::getParticleSystems ( ) const
inherited
Returns
a const reference to the ParticleSystems in this Assembly (not tracing recursively into sub-assemblies)

◆ getReferenceCount()

int agx::Referenced::getReferenceCount ( ) const
inherited
Returns
the number pointers currently referencing this object.

◆ getRigidBodies()

const agx::RigidBodyRefSet& agxSDK::Assembly::getRigidBodies ( ) const
inherited
Returns
a const reference to the RigidBodies in this Assembly (not tracing recursively into sub-assemblies)

◆ getRigidBody() [1/4]

agx::RigidBody* agxSDK::Assembly::getRigidBody ( const agx::Name &  name,
bool  recursive = true 
)
inherited

Find (linear search) and return named RigidBody.

Parameters
name- name of the body to find
recursive- if true (default) the search will include sub-assemblies
Returns
pointer to the found RigidBody body, null if not found

◆ getRigidBody() [2/4]

const agx::RigidBody* agxSDK::Assembly::getRigidBody ( const agx::Name &  name,
bool  recursive = true 
) const
inherited

Find (linear search) and return named RigidBody.

Parameters
name- name of the body to find
recursive- if true (default) the search will include sub-assemblies
Returns
pointer to the found RigidBody body, null if not found

◆ getRigidBody() [3/4]

agx::RigidBody* agxSDK::Assembly::getRigidBody ( const agx::Uuid &  uuid,
bool  recursive = true 
)
inherited

Find (linear search) and return a pointer to a RigidBody with the given uuid.

Parameters
uuid- uuid of the requested rigidbody
recursive- if true (default) the search will include sub-assemblies
Returns
pointer to the found RigidBody, null if not found

◆ getRigidBody() [4/4]

const agx::RigidBody* agxSDK::Assembly::getRigidBody ( const agx::Uuid &  uuid,
bool  recursive = true 
) const
inherited

Find (linear search) and return a pointer to a RigidBody with the given uuid.

Parameters
uuid- uuid of the requested rigidbody
recursive- if true (default) the search will include sub-assemblies
Returns
pointer to the found RigidBody, null if not found

◆ getRoot()

Branch* agxModel::Tree::getRoot ( ) const
inherited
Returns
the root branch (created with this tree)

◆ getRoute()

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

◆ getSimulation() [1/2]

agxSDK::Simulation* agxSDK::Assembly::getSimulation ( )
inherited
Returns
the simulation this assembly is added to. nullptr if none.

◆ getSimulation() [2/2]

const agxSDK::Simulation* agxSDK::Assembly::getSimulation ( ) const
inherited
Returns
the simulation this assembly is added to. nullptr if none.

◆ getStorageAgent()

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

Implements agxStream::Serializable.

Definition at line 175 of file Deformable1D.h.

◆ getType()

Type agxSDK::Assembly::getType ( ) const
inherited
Returns
the type of this Assembly/Collection

◆ getUuid()

agx::Uuid agxStream::Serializable::getUuid ( ) const
inherited
Returns
a unique id for this instance.

Definition at line 268 of file Serializable.h.

Referenced by agxSDK::UuidHashCollisionFilter::match().

◆ guessConnectingChild()

Branch* agxModel::Tree::guessConnectingChild ( Branch *  branch) const
protectedinherited

Searches branch children and examines orientation etc to "guess" which of the children that is along the main/current tree branch.

◆ hasGroupID()

bool agxModel::Tree::hasGroupID ( agx::UInt32  id) const
inherited
Returns
true if this tree has id

◆ 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.

◆ initialized()

bool agxModel::Tree::initialized ( ) const
inherited
Returns
true if this tree is initialized - otherwise false

◆ is()

template<typename T >
bool agx::Referenced::is ( ) const
inherited

◆ isBeginIterator()

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

◆ isFinished()

bool agxStream::Serializable::isFinished ( ) const
inherited
Returns
true if this class is restored correctly and should not be deleted during destruction of an Archive.

Definition at line 252 of file Serializable.h.

References AGX_FORCE_INLINE.

◆ isStatic()

bool agxModel::Tree::isStatic ( ) const
inherited
Returns
true if this tree is simplified - otherwise false

◆ makeDynamic()

bool agxModel::Tree::makeDynamic ( )
inherited

Make all rigid bodies dynamic and add all constraints to the simulation.

This is the default state.

Returns
true if the state was changed

◆ makeStatic()

bool agxModel::Tree::makeStatic ( bool  wakeOnContactEvent,
agxModel::Tree::TreeExecuteFilter *  filter = new agxModel::Tree::TreeExecuteFilter() 
)
inherited

Simplify this tree.

Make all rigid bodies static and remove all constraints from the simulation. It's possible to flag if this tree should wake on contact with other objects. If a contact wakes this tree, it will not automatically become static again. This has to be monitored by the user.

Default contact execute filter will trigger on all other contacts with this tree's geometries.

Parameters
wakeOnContactEvent- true to enable this tree to wake up upon contact
filter- default all contacts with this tree
Returns
true if the state was changed

◆ 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.

◆ preCollide()

virtual void agxModel::Tree::preCollide ( )
protectedvirtualinherited

Pre-collide event callback.

◆ 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.

◆ reference()

void agx::Referenced::reference ( void *  ptr = nullptr) const
inherited

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.

◆ remove() [1/10]

bool agxSDK::Assembly::remove ( agx::Constraint *  constraint)
inherited

Remove a constraint from this assembly (does not recurse down in tree).

Returns
true when the constraint has been successfully removed - otherwise false (constraint is nullptr or not in this assembly)

◆ remove() [2/10]

bool agxSDK::Assembly::remove ( agx::Interaction *  interaction)
inherited

Remove an interaction from this assembly.

Returns
true when the interaction has been successfully removed - otherwise false (interaction is nullptr or not in this assembly)

◆ remove() [3/10]

bool agxSDK::Assembly::remove ( EventListener *  listener)
inherited

Remove an EventListener from the assembly.

Returns
true when the listener has been successfully removed - otherwise false (listener is nullptr or not in this assembly)

◆ remove() [4/10]

bool agxSDK::Assembly::remove ( agx::RigidBody *  body,
bool  removeAssociatedGeometries = false 
)
inherited

Remove a rigid body from this assembly (does not recurse down in tree).

Parameters
body- The body to be removed
removeAssociatedGeometries- If true, the geometries associated to this body will also be removed
Returns
true if the body been successfully removed

◆ remove() [5/10]

bool agxSDK::Assembly::remove ( agxCollide::Geometry *  geometry)
inherited

Remove a geometry from this assembly (does not recurse down in tree).

Returns
true when the geometry has been successfully removed - otherwise false (geometry is nullptr or not in this assembly)

◆ remove() [6/10]

bool agxSDK::Assembly::remove ( Assembly *  assembly)
inherited

Remove a child assembly from a parent.

Returns
true when the assembly has been successfully removed - otherwise false (assembly is nullptr or not in this assembly)

◆ remove() [7/10]

bool agxSDK::Assembly::remove ( agx::ContactMaterial *  contactMaterial)
inherited

Remove a contact material from this assembly.

Returns
true when the contact material has been successfully removed - otherwise false (contact material is nullptr or not in this assembly)

◆ remove() [8/10]

bool agxSDK::Assembly::remove ( agx::Emitter *  emitter)
inherited

Remove an emitter from this assembly.

Returns
true when the emitter has been successfully removed - otherwise false (emitter is nullptr or not in this assembly)

◆ remove() [9/10]

bool agxSDK::Assembly::remove ( agx::ObserverFrame *  observerFrame)
inherited

Remove an ObserverFrame from this assembly.

Returns
true when the observer frame has been successfully removed - otherwise false (observer frame is nullptr or not in this assembly)

◆ remove() [10/10]

void agxModel::Tree::remove ( Branch *  branch)
protectedinherited

Removes rigid body, constraint etc associated to this tree.

Recursive.

◆ 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.

◆ removeFromSimulation()

void agxSDK::Assembly::removeFromSimulation ( Simulation *  simulation)
protectedinherited

◆ removeGroupID() [1/2]

bool agxModel::Tree::removeGroupID ( agx::UInt32  id)
inherited

Removes group id from all geometries in this tree.

Parameters
id- id to remove
Returns
true if valid remove

◆ removeGroupID() [2/2]

void agxModel::Tree::removeGroupID ( Branch *  branch,
agx::UInt32  id 
)
protectedinherited

Removes the id from the branch geometries.

Recursive.

Parameters
branch- current branch
id- id to remove

◆ removeNotification() [1/2]

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

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

Reimplemented from agxModel::Tree.

◆ removeNotification() [2/2]

virtual void agxSDK::Assembly::removeNotification ( Assembly *  )
inlinevirtualinherited

Called when this assembly is removed from another assembly.

Reimplemented in agxPowerLine::PowerLine.

Definition at line 594 of file Assembly.h.

◆ removeParticleSystem()

bool agxSDK::Assembly::removeParticleSystem ( agx::ParticleSystem *  particleSystem)
protectedinherited

Remove a particle system from this assembly.

◆ restore()

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

Reimplemented from agxSDK::Assembly.

◆ restoreLightData()

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

Restore structural independent data from stream.

◆ setAngularVelocity()

virtual void agxSDK::Assembly::setAngularVelocity ( const agx::Vec3 &  velocity)
virtualinherited

Set the angular velocity (in world frame) recursively for all rigid bodies stored in assembly.

Parameters
velocity- The angular velocity in world frame that will be set for all rigid bodies.

◆ setAngularVelocityDamping()

static void agxModel::Tree::setAngularVelocityDamping ( agxModel::Tree::Branch *  branch,
const agx::Vec3 &  angularVelocityDamping 
)
staticinherited

Utility method to set angular velocity damping for all branches.

I.g., Tree::setAngularVelocityDamping( aTree->getRoot(), angDamping ). Recursive.

Note
Only utility method, i.e., a tree does NOT store or keep track of damping information.
Parameters
branch- start branch
angularVelocityDamping- angular velocity damping

◆ setBranchEventListener()

virtual void agxModel::Tree::setBranchEventListener ( agxModel::Tree::BranchEventListener *  branchListener)
virtualinherited

Assign branch event listener.

Unique for this tree.

Parameters
branchListener- new listener unique for this tree

◆ 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

◆ setConstraintSolveType() [1/2]

virtual void agxModel::Tree::setConstraintSolveType ( agx::Constraint::SolveType  solveType)
virtualinherited

Set new solve type for the branch connections.

Only valid for initialized trees. Default: DIREKT_AND_ITERATIVE.

Parameters
solveTypenew solve type

◆ setConstraintSolveType() [2/2]

void agxModel::Tree::setConstraintSolveType ( Branch *  branch,
agx::Constraint::SolveType  solveType 
)
protectedinherited

Assign constraint solve type.

Recursive.

Parameters
branch- current branch
solveType- new constraint solve type

◆ setCustomData()

void agxModel::Tree::setCustomData ( agx::Referenced *  customData)
inherited

Assign custom data.

Parameters
customData- custom data

◆ setDefaultParameters()

static void agxModel::Tree::setDefaultParameters ( agx::Material *  material)
staticinherited

Sets default material parameters for a tree.

◆ setDeleteHandler()

static void agx::Referenced::setDeleteHandler ( DeleteHandler *  handler)
staticprotectedinherited

Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.

◆ setEnableCollisions() [1/2]

bool agxModel::Tree::setEnableCollisions ( agx::RigidBody *  rb,
bool  flag 
)
inherited

Enable or disable collisions between this tree and a rigid body.

Parameters
rb- rigid body
flag- true to enable, false to disable
Returns
true if collision flag was set - otherwise false

◆ setEnableCollisions() [2/2]

bool agxModel::Tree::setEnableCollisions ( agxCollide::Geometry *  geometry,
bool  flag 
)
inherited

Enable or disable collisions between this tree and a geometry.

Parameters
geometry- the geometry
flag- true to enable, false to disable
Returns
true if collision flag was set - otherwise false

◆ setEnableSerialization()

void agxStream::Serializable::setEnableSerialization ( bool  flag)
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.

◆ setEnableUuidGeneration()

static void agxStream::Serializable::setEnableUuidGeneration ( bool  flag)
staticinherited

Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled.

◆ setFinished()

void agxStream::Serializable::setFinished ( )
inherited

Tells this class that it is restored correctly and should not be deleted during destruction of an Archive.

◆ setLinearVelocityDamping()

static void agxModel::Tree::setLinearVelocityDamping ( agxModel::Tree::Branch *  branch,
const agx::Vec3 &  linearVelocityDamping 
)
staticinherited

Utility method to set linear velocity damping for all branches.

I.e., Tree::setLinearVelocityDamping( aTree->getRoot(), linDamping ). Recursive.

Note
Only utility method, i.e., a tree does NOT store or keep track of damping information.
Parameters
branch- start branch
linearVelocityDamping- linear velocity damping

◆ setLocalPosition() [1/2]

void agxSDK::Assembly::setLocalPosition ( const agx::Vec3 &  p)
inherited

Set the position of the assembly relative to its frame's parent frame.

Parameters
p- local translate of assembly as a 3D vector

◆ setLocalPosition() [2/2]

void agxSDK::Assembly::setLocalPosition ( agx::Real  x,
agx::Real  y,
agx::Real  z 
)
inherited

Set the position of the assembly relative to its frame's parent frame.

Parameters
x- local x translate
y- local y translate
z- local z translate

◆ setLocalRotation() [1/2]

void agxSDK::Assembly::setLocalRotation ( const agx::Quat &  q)
inherited

Set the rotation of the assembly relative to its frame's parent frame.

Parameters
q- rotation given as a quaternion

◆ setLocalRotation() [2/2]

void agxSDK::Assembly::setLocalRotation ( const agx::EulerAngles &  e)
inherited

Set the rotation of the assembly relative to its frame's parent frame.

Parameters
e- rotation given as Euler angles

◆ setLocalTransform()

void agxSDK::Assembly::setLocalTransform ( const agx::AffineMatrix4x4 &  matrix)
inherited

Assign the local transformation matrix for this assembly, ignoring any eventual parent transformation.

Parameters
matrix- transformation matrix relative to parent transform for the assembly's frame

◆ setMaterial() [1/2]

virtual void agxModel::Tree::setMaterial ( agx::Material *  material)
virtualinherited

Assign new material.

All geometries in this tree will have this material.

Parameters
material- new material

◆ setMaterial() [2/2]

void agxModel::Tree::setMaterial ( Branch *  branch,
agx::Material *  material 
)
protectedinherited

Assign material to all geometries for branch.

Recursive.

Parameters
branch- current branch
material- new material

◆ setName()

void agxSDK::Assembly::setName ( const agx::Name &  name)
inherited

Set the name of this Assembly.

Parameters
name- new name of this Assembly.

◆ setParentFrame()

bool agxSDK::Assembly::setParentFrame ( agx::Frame *  frame)
inherited

Set the parent frame of this assembly's frame.

This means that getLocalTranslate, getLocalRotate, getLocalTransform will be given in the parents coordinate frame. I.e., this frame's transformation will be concatenated with the parents.

Parameters
frame- new parent frame, 0 to remove parent
Returns
true if parent is changed (not the same as before) - otherwise false

◆ setPosition() [1/2]

void agxSDK::Assembly::setPosition ( const agx::Vec3 &  p)
inherited

Set the position of the frame in world coordinates.

Parameters
p- desired position in world coordinates.

◆ setPosition() [2/2]

void agxSDK::Assembly::setPosition ( agx::Real  x,
agx::Real  y,
agx::Real  z 
)
inherited

Set the position of the frame in world coordinates.

Parameters
x- desired x-coordinate in world frame
y- desired y-coordinate in world frame
z- desired z-coordinate in world frame

◆ setRotation() [1/3]

void agxSDK::Assembly::setRotation ( const agx::Quat &  q)
inherited

Set the rotation of the assembly relative to world frame.

Parameters
q- rotation given as a quaternion

◆ setRotation() [2/3]

void agxSDK::Assembly::setRotation ( const agx::EulerAngles &  e)
inherited

Set the rotation of the assembly relative to world frame.

Parameters
e- rotation given as Euler angles

◆ setRotation() [3/3]

void agxSDK::Assembly::setRotation ( const agx::OrthoMatrix3x3 &  m)
inherited

Set the rotation of the assembly relative to world frame.

Parameters
m- rotation given as an orthogonal transformation matrix

◆ setTransform()

void agxSDK::Assembly::setTransform ( const agx::AffineMatrix4x4 &  matrix)
inherited

Set the transform of the assembly.

Its frame will move to the specified transform, which is given in world coordinates.

Parameters
matrix- desired transform for the frame in world coordinates.

◆ setUuid()

void agxStream::Serializable::setUuid ( const agx::Uuid &  uuid)
inherited

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!

◆ setVelocity()

virtual void agxSDK::Assembly::setVelocity ( const agx::Vec3 &  velocity)
virtualinherited

Set the linear velocity (in world frame) recursively for all rigid bodies stored in assembly.

Parameters
velocity- The linear velocity in world frame that will be set for all rigid bodies.

◆ simplify()

void agxModel::Tree::simplify ( Branch *  branch,
bool  flag,
agxSDK::Simulation *  simulation 
)
protectedinherited

Changes motion control and adds/removes constraints depending on flag.

Recursive.

Parameters
branch- current branch
flag- true for STATIC and remove

◆ split() [1/2]

virtual Branch* agxModel::Tree::split ( agxCollide::Geometry *  geometry,
const agx::Vec3 &  point,
agx::Real  minShapeHeight = agx::Real(1E-2) 
)
virtualinherited

Splits this tree given geometry and point in world.

During this split a new branch is created and will be child to branch the geometry belongs to. Parameters are inherited from the old branch.

With minShapeHeight it's possible to control how the split is made. If the split results in a shape with height less than that, the split will take place between two geometries (if present) or returns 0 if the split is too close to a branch connection (i.e., split unnecessary).

Note
Split and cut assumes that the geometries in a branch are ordered in position with first geometry furthest down in branch body coordinates.
Parameters
geometry- geometry to split (only one shape per geometry supported)
point- point in world
minShapeHeight- resulting geometry/shape minimum height (default: 1 cm)
Returns
the new branch which is a child branch to the one holding geometry

◆ split() [2/2]

void agxModel::Tree::split ( Branch *  source,
Branch *  destination 
) const
protectedinherited

Move from source to destination.

◆ store()

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

Reimplemented from agxSDK::Assembly.

◆ storeLightData()

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

Store structural independent data to stream.

◆ traverse() [1/2]

virtual void agxSDK::Assembly::traverse ( AssemblyVisitor *  visitor)
virtualinherited

Traverse the assembly tree recursively using a visitor.

Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().

◆ traverse() [2/2]

virtual void agxSDK::Assembly::traverse ( const AssemblyVisitor *  visitor) const
virtualinherited

◆ 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.

◆ unreference()

void agx::Referenced::unreference ( void *  ptr = nullptr) const
inherited

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().

◆ unreference_nodelete()

void agx::Referenced::unreference_nodelete ( ) const
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.

◆ ValidateCast()

template<typename T >
static bool agx::Referenced::ValidateCast ( const Referenced *  object)
staticinherited

◆ wakeOnContact()

bool agxModel::Tree::wakeOnContact ( ) const
inherited
Returns
true if this tree should wake on contact in state STATIC

Member Data Documentation

◆ m_branchListener

BranchEventListenerRef agxModel::Tree::m_branchListener
protectedinherited

Definition at line 749 of file agxModel/Tree.h.

◆ 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_customData

agx::ref_ptr< agx::Referenced > agxModel::Tree::m_customData
protectedinherited

Definition at line 747 of file agxModel/Tree.h.

◆ m_disabledCollisionsID

agx::UInt32 agxModel::Tree::m_disabledCollisionsID
protectedinherited

Definition at line 744 of file agxModel/Tree.h.

◆ m_externalDisabledGeometries

DisabledCollisionsGeometryContainer agxModel::Tree::m_externalDisabledGeometries
protectedinherited

Definition at line 745 of file agxModel/Tree.h.

◆ m_geometriesID

agx::UInt32 agxModel::Tree::m_geometriesID
protectedinherited

Definition at line 743 of file agxModel/Tree.h.

◆ m_geometryFactory

Deformable1DGeometryFactoryRef agxModel::Deformable1D::m_geometryFactory
protected

Definition at line 223 of file Deformable1D.h.

◆ m_geometryIDs

GroupIdContainer agxModel::Tree::m_geometryIDs
protectedinherited

Definition at line 746 of file agxModel/Tree.h.

◆ m_initializationReport

Deformable1DInitializationReport agxModel::Deformable1D::m_initializationReport
protected

Definition at line 225 of file Deformable1D.h.

◆ m_material

agx::MaterialRef agxModel::Tree::m_material
protectedinherited

Definition at line 748 of file agxModel/Tree.h.

◆ m_mutex

Mutex agx::Referenced::m_mutex
mutableprotectedinherited

Definition at line 240 of file Referenced.h.

◆ m_refCount

AtomicValue agx::Referenced::m_refCount
mutableprotectedinherited

Definition at line 241 of file Referenced.h.

◆ m_root

BranchRef agxModel::Tree::m_root
protectedinherited

Definition at line 741 of file agxModel/Tree.h.

◆ m_route

Deformable1DRouteRef agxModel::Deformable1D::m_route
protected

Definition at line 222 of file Deformable1D.h.

◆ m_state

int agxModel::Tree::m_state
protectedinherited

Definition at line 742 of file agxModel/Tree.h.

◆ m_stepListener

TreeStepEventListenerRef agxModel::Tree::m_stepListener
protectedinherited

Definition at line 751 of file agxModel/Tree.h.

◆ m_wakeOnContactListener

TreeContactEventListenerRef agxModel::Tree::m_wakeOnContactListener
protectedinherited

Definition at line 750 of file agxModel/Tree.h.


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