|
AGX Dynamics 2.41.2.0
|
Structure holding several "normal" rigid bodies. More...
#include <MergedBody.h>
Inheritance diagram for agx::MergedBody:Classes | |
| struct | MergedBodyIndex |
| Object with index of merged body and the original index of a merged object. More... | |
| struct | Point |
| Contact point data store in first rigid body local frame. More... | |
Public Member Functions | |
| MergedBody () | |
| Construct merged body, default containing a root rigid body. | |
| agx::Bool | add (EdgeInteraction *edge) |
| Add an edge interaction defining a base interaction between one or two rigid bodies that will be considered merged if successful. | |
| agx::Bool | add (Listener *listener) |
| Add listener to receive callbacks during certain events. | |
| AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE (MergedBody::EdgeInteraction) | |
| AGXSTREAM_DECLARE_SERIALIZABLE_BASE (MergedBody::BinaryConstraintEdgeInteraction) | |
| AGXSTREAM_DECLARE_SERIALIZABLE_BASE (MergedBody::ContactGeneratorEdgeInteraction) | |
| AGXSTREAM_DECLARE_SERIALIZABLE_BASE (MergedBody::EmptyEdgeInteraction) | |
| AGXSTREAM_DECLARE_SERIALIZABLE_BASE (MergedBody::GeometryContactEdgeInteraction) | |
| AGXSTREAM_DECLARE_SERIALIZABLE_BASE (MergedBody::ParticleParticleInteraction) | |
| BinaryConstraintEdgeInteraction (agx::Constraint *constraint) | |
| Construct given a one or two body constraint. | |
| BinaryConstraintEdgeInteraction (agx::HighLevelConstraintImplementation *constraint) | |
| Construct given constraint implementation of a binary constraint. | |
| virtual MergedBodyRef | clone () |
| Creates an empty clone of this merged body where each object that supports cloning also are cloned. | |
| virtual ListenerRef | clone ()=0 |
| This listener will be cloned when e.g., splitIslands is used. | |
| ContactGeneratorEdgeInteraction (agx::RigidBody *rb1, agx::RigidBody *rb2) | |
| Construct given two rigid bodies. | |
| agx::Bool | containsDeletedBodies () const |
| void | debugPrint (const agx::RigidBody *rb) const |
Debug prints (cout) interactions to rb. | |
| EmptyEdgeInteraction (agx::RigidBody *rb1, agx::RigidBody *rb2) | |
| Construct given two rigid bodies. | |
| virtual void | generateInteraction (agxSDK::Simulation *simulation, agxCollide::LocalGeometryContactVector &newContacts)=0 |
| Generate interaction or do nothing. | |
| GeometryContactEdgeInteraction (agx::Physics::GeometryContactPtr gcPtr) | |
| Construct given a geometry contact data. | |
| GeometryContactEdgeInteraction (agxCollide::Geometry *geometry1, agx::RigidBody *rb1, agxCollide::Geometry *geometry2, agx::RigidBody *rb2) | |
| Construct given two geometries. | |
| agx::HighLevelConstraintImplementation * | getConstraint () |
| const agx::HighLevelConstraintImplementation * | getConstraint () const |
| void | getDebugRenderColor (agx::Vec3 &color) const |
| Color of this merged body used for debug rendering. | |
| const EdgeInteractionRefContainer * | getEdges (const agx::RigidBody *rb1, const agx::RigidBody *rb2) const |
| agx::Bool | getEnableAutomaticCleanupWhenEmpty () const |
| agxCollide::Geometry * | getGeometry1 () const |
| agxCollide::Geometry * | getGeometry2 () const |
| const agx::Name & | getName () const |
| const agx::RigidBodyPtrVector * | getNeighbors (const agx::RigidBody *rb) const |
| agx::UInt | getNumPairs () const |
| const PointContainer & | getPoints () const |
| agx::RigidBody * | getRigidBody () const |
| agx::RigidBody * | getRigidBody1 () const |
| agx::RigidBody * | getRigidBody2 () const |
| const InternalState & | getState () const |
| agx::Bool | getValid () const |
| agx::Bool | isActive () const |
| agx::Bool | isEmpty () const |
| agx::Bool | isTagged (InteractionTag tag) const |
| agx::Bool | merge (agx::MergedBody *other, EdgeInteraction *edge) |
Merges this with other and clears other. | |
| agx::Bool | merged (const agx::RigidBody *rb1, const agx::RigidBody *rb2) const |
| virtual void | onAdd (agx::RigidBody *, const agx::MergedBody *) const |
| Called when a body is added to the merged body. | |
| virtual void | onAdded (EdgeInteraction *, const agx::MergedBody *) const |
| Called when an edge is added to the merged body. | |
| virtual void | onMovedFromTo (const MergedBody::EdgeInteractionRefContainer &, const agx::MergedBody *, const agx::MergedBody *) const |
| Called when the edges between two bodies are moved from one merged body to another. | |
| virtual void | onRemove (agx::RigidBody *, const agx::MergedBody *) const |
| Called when a body is removed from the merged body. | |
| virtual void | onRemoved (const MergedBody::EdgeInteractionRefContainer &, const agx::MergedBody *) const |
| Called when an edge is removed from the merged body. | |
| ParticleParticleInteraction (agx::RigidBody *substituteBody1, agx::RigidBody *substituteBody2) | |
| Construct given two rigid bodies. | |
| agx::Bool | remove (agx::RigidBody *rb) |
| Split/Remove a rigid body from this merged body. | |
| agx::Bool | remove (EdgeInteraction *edge) |
| Remove an edge interaction from this merged body. | |
| agx::Bool | remove (Listener *listener) |
| Remove listener from this merged body. | |
| virtual void | restore (agxStream::InputArchive &in) override |
| Restores the two bodies and the construction state. | |
| virtual void | restoreLightData (agxStream::StorageStream &str) override |
| Restore non-structural data from stream. | |
| virtual void | restoreLightData (agxStream::StorageStream &str) override |
| Restore non-structural data from stream. | |
| virtual void | restoreLightData (agxStream::StorageStream &str) override |
| Restore non-structural data from stream. | |
| virtual void | restoreLightData (agxStream::StorageStream &str) override |
| Restore non-structural data from stream. | |
| virtual void | restoreLightData (agxStream::StorageStream &str) override |
| Restore non-structural data from stream. | |
| virtual void | restoreLightData (agxStream::StorageStream &str) override |
| Restore non-structural data from stream. | |
| void | setEnableAutomaticCleanupWhenEmpty (agx::Bool enable) |
| If true, this merged body will remove itself from the simulation and clear all internal states when it becomes empty. | |
| void | setName (const agx::Name &name) |
| Assign new name to this MergedBOdy Default: "". | |
| agx::MergedBodyRefVector | splitIslands () |
| Splits into islands. | |
| virtual void | store (agxStream::OutputArchive &out) const override |
| Stores the two bodies and the construction state. | |
| virtual void | storeLightData (agxStream::StorageStream &str) const override |
| Store non-structural data to stream. | |
| virtual void | storeLightData (agxStream::StorageStream &str) const override |
| Store non-structural data to stream. | |
| virtual void | storeLightData (agxStream::StorageStream &str) const override |
| Store non-structural data to stream. | |
| virtual void | storeLightData (agxStream::StorageStream &str) const override |
| Store non-structural data to stream. | |
| virtual void | storeLightData (agxStream::StorageStream &str) const override |
| Store non-structural data to stream. | |
| virtual void | storeLightData (agxStream::StorageStream &str) const override |
| Store non-structural data to stream. | |
| void | traverse (const agx::RigidBody *rb, EdgeInteractionVisitor visitor, agx::Bool includeDisabled=false) const |
Traverse the internal interaction graph and receive callback for each edge interaction where rb is part of. | |
| void | traverse (const agx::RigidBody *rb, RigidBodyVisitor visitor, agx::Bool includeDisabled=false) const |
Traverse neighboring bodies to rb. | |
| void | traverse (EdgeInteractionVisitor visitor, agx::Bool includeDisabled=false) const |
| Traverse the internal interaction graph and receive callback for each edge interaction. | |
| void | traverse (RigidBodyVisitor visitor, agx::Bool includeDisabled=false) const |
| Traverse the internal interaction graph and receive callback for all rigid bodies (unique). | |
| agx::Bool | updateProperties () |
| Updates mass, position, velocity etc of the root body given the current state. | |
Public Member Functions inherited from agx::Referenced | |
| Referenced () | |
| Default constructor. | |
| Referenced (const Referenced &) | |
| template<typename T > | |
| T * | as () |
| Subclass casting. | |
| template<typename T > | |
| const T * | as () const |
| template<typename T > | |
| T * | asSafe () |
| Safe subclass casting, return nullptr if template type does not match. | |
| template<typename T > | |
| const T * | asSafe () const |
| int | getReferenceCount () const |
| template<typename T > | |
| bool | is () const |
| Subclass test. | |
| Referenced & | operator= (const Referenced &) |
| Assignment operator. Will increment the number of references to the referenced object. | |
| void | reference (void *ptr=nullptr) const |
| Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. | |
| void | unreference (void *ptr=nullptr) const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. | |
| void | unreference_nodelete () const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. | |
Public Member Functions inherited from agxStream::Serializable | |
| virtual | ~Serializable () |
| Destructor for normal C++ use but hidden from SWIG bindings. | |
| virtual const char * | getClassName () const |
| bool | getEnableSerialization () const |
| bool | getEnableUuidGeneration () |
| agx::UInt32 | getIndex () const |
| This index is given at creation of this object. | |
| virtual StorageAgent * | getStorageAgent () const =0 |
| agx::Uuid | getUuid () const |
| bool | isFinished () const |
| void | setEnableSerialization (bool flag) |
| Set to false to disable serialization of this object. | |
| void | setFinished () |
| Tells this class that it is restored correctly and should not be deleted during destruction of an Archive. | |
| void | setUuid (const agx::Uuid &uuid) |
| Explicitly set a Uuid on a serializable object. | |
Static Public Member Functions | |
| static agxStream::Serializable * | create (agxStream::InputArchive &) |
| static agxStream::Serializable * | create (agxStream::InputArchive &) |
| static agxStream::Serializable * | create (agxStream::InputArchive &) |
| static agxStream::Serializable * | create (agxStream::InputArchive &) |
| static agxStream::Serializable * | create (agxStream::InputArchive &) |
| static agx::RigidBody * | filter (agx::RigidBody *rb) |
| static const agx::RigidBody * | filter (const agx::RigidBody *rb) |
Filters rb and returns the merged rigid body if rb is part of one. | |
| static MergedBodyIndex | findMergedBodyIndex (agx::Physics::RigidBodyPtr rb) |
| Similar to filter( const agx::RigidBody* rb ). | |
| static agx::MergedBody * | get (agx::Constraint *constraint) |
| This method returns a merged body if the constraint has been involved in it, e.g., by having an edge created given it. | |
| static agx::MergedBody * | get (agx::RigidBody *rb) |
This method returns an agx::MergedBody if rb has been added to one. | |
| static const agx::MergedBody * | get (const agx::Constraint *constraint) |
| This method returns a merged body if the constraint has been involved in it, e.g., by having an edge created given it. | |
| static const agx::MergedBody * | get (const agx::RigidBody *rb) |
This method returns an agx::MergedBody if rb has been added to one. | |
| static agx::MergedBody * | getActive (agx::RigidBody *rb) |
| This method returns an agx::MergedBody that is active and in a simulation. | |
| static const agx::MergedBody * | getActive (const agx::RigidBody *rb) |
| This method returns an agx::MergedBody that is active and in a simulation. | |
| static BinaryConstraintEdgeInteraction * | getEdge (const agx::Constraint *constraint) |
| static BinaryConstraintEdgeInteraction * | getEdge (const agx::HighLevelConstraintImplementation *constraint) |
| static agx::Bool | isRoot (const agx::RigidBody *rb) |
| static agx::Bool | shouldIntegratePosition (const agx::RigidBody *rb) |
| static agx::Bool | split (agx::Constraint *constraint) |
| Removes the edge defined by the constraint from the merged body, if any. | |
| static agx::Bool | split (agx::HighLevelConstraintImplementation *constraint) |
| Removes the edge defined by the constraint from the merged body, if any. | |
| static agx::Bool | split (agx::RigidBody *rb) |
| Split rigid body if merged. | |
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. | |
Protected Member Functions | |
| virtual | ~BinaryConstraintEdgeInteraction () |
| Reference counted object, protected destructor. | |
| virtual | ~ContactGeneratorEdgeInteraction () |
| Reference counted object, protected destructor. | |
| virtual | ~EdgeInteraction () |
| Reference counted object, protected destructor. | |
| virtual | ~EmptyEdgeInteraction () |
| Reference counted object, protected destructor. | |
| virtual | ~GeometryContactEdgeInteraction () |
| Reference counted object, protected destructor. | |
| virtual | ~Listener () |
| Reference counted object, protected destructor. | |
| virtual | ~MergedBody () throw () |
| Reference counted object, protected destructor. | |
| virtual | ~ParticleParticleInteraction () |
| Reference counted object, protected destructor. | |
| BinaryConstraintEdgeInteraction () | |
| Default constructor used by serialization. | |
| ContactGeneratorEdgeInteraction () | |
| Default constructor used by serialization. | |
| EdgeInteraction (agx::RigidBody *rb1, agx::RigidBody *rb2, InteractionTag tag, agx::Bool valid=true) | |
| Construct given two rigid bodies and a valid flag. | |
| EmptyEdgeInteraction () | |
| Default constructor used by serialization. | |
| virtual void | generateInteraction (agxSDK::Simulation *, agxCollide::LocalGeometryContactVector &) override |
| Does nothing. | |
| virtual void | generateInteraction (agxSDK::Simulation *, agxCollide::LocalGeometryContactVector &) override |
| Checks for contacts between the bodies and adds them. | |
| virtual void | generateInteraction (agxSDK::Simulation *simulation, agxCollide::LocalGeometryContactVector &newContacts) override |
| Checks for contacts between the bodies and adds them. | |
| virtual void | generateInteraction (agxSDK::Simulation *simulation, agxCollide::LocalGeometryContactVector &newContacts) override |
| Transforms and adds the local contact data as a new geometry contact. | |
| virtual void | generateInteraction (agxSDK::Simulation *simulation, agxCollide::LocalGeometryContactVector &newContacts) override |
| Activates the constraint. | |
| GeometryContactEdgeInteraction () | |
| Default constructor used by serialization. | |
| agxSDK::Simulation * | getSimulation () |
| const agxSDK::Simulation * | getSimulation () const |
| virtual void | onCleanup () |
| Called when the simulation is cleaned. | |
| virtual void | onRemove (agx::Constraint *constraint) |
| Called when a constraint, present in this merged body, is removed from the simulation. | |
| virtual void | onRemove (agx::RigidBody *rb) |
| Called when a rigid body, present in this merged body, is removed from the simulation. | |
| virtual void | onRemove (agxCollide::Geometry *geometry) |
| Called when a geometry, probably present in this merged body, is removed from space or body. | |
| ParticleParticleInteraction () | |
| Default constructor used by serialization. | |
| virtual void | postStep () |
| Called after solver (new velocities and POSSIBLY (or not) new transforms). | |
| virtual void | preCollide () |
| Called before collision detection. | |
| virtual void | preStep () |
| Called before solver executes. | |
| void | setBodies (agx::RigidBody *rb1, agx::RigidBody *rb2) |
| Assign bodies during restore. | |
| virtual void | setSimulation (agxSDK::Simulation *simulation) |
| Called during agxSDK::Simulation::add and agxSDK::Simulation::remove. | |
Protected Member Functions inherited from agx::Referenced | |
| virtual | ~Referenced () |
| Destructor. | |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
Protected Member Functions inherited from agxStream::Serializable | |
| Serializable () | |
| Default constructor. | |
| Serializable (const Serializable &other) | |
| Copy constructor. | |
| void | generateUuid () |
Additional Inherited Members | |
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. | |
Protected Attributes inherited from agx::Referenced | |
| Mutex | m_mutex |
| ObserverContainer | m_observers |
| AtomicValue | m_refCount |
Structure holding several "normal" rigid bodies.
Edge interaction that handles connection between rigid bodies that are converted from granular bodies.
Interaction data for a (one or) two body constraint.
Interaction data for two (previously contacting) merged objects.
Edge interaction that calls colliders for each pair of geometries in the bodies during split.
Empty edge interaction class containing only the two bodies.
Base type for general interaction with two rigid bodies.
Base class for merged body listener listener.
The "normal" rigid bodies will not be seen by the solver and they will not move relative each other. A rigid body added to this structure can still interact with other bodies in a simulation.
This object can be used when e.g., the two bodies have a constraint defined between them.
Functionality is the same as Empty Edge.
Definition at line 55 of file MergedBody.h.
| typedef agx::observer_ptr< const BinaryConstraintEdgeInteraction > agx::MergedBody::BinaryConstraintEdgeInteractionConstObserver |
Definition at line 63 of file MergedBody.h.
| typedef agx::ref_ptr< const BinaryConstraintEdgeInteraction > agx::MergedBody::BinaryConstraintEdgeInteractionConstRef |
Definition at line 63 of file MergedBody.h.
| typedef agx::observer_ptr< BinaryConstraintEdgeInteraction > agx::MergedBody::BinaryConstraintEdgeInteractionObserver |
Definition at line 63 of file MergedBody.h.
| typedef agx::ref_ptr< BinaryConstraintEdgeInteraction > agx::MergedBody::BinaryConstraintEdgeInteractionRef |
Definition at line 63 of file MergedBody.h.
| typedef agx::observer_ptr< const ContactGeneratorEdgeInteraction > agx::MergedBody::ContactGeneratorEdgeInteractionConstObserver |
Definition at line 61 of file MergedBody.h.
| typedef agx::ref_ptr< const ContactGeneratorEdgeInteraction > agx::MergedBody::ContactGeneratorEdgeInteractionConstRef |
Definition at line 61 of file MergedBody.h.
| typedef agx::observer_ptr< ContactGeneratorEdgeInteraction > agx::MergedBody::ContactGeneratorEdgeInteractionObserver |
Definition at line 61 of file MergedBody.h.
| typedef agx::ref_ptr< ContactGeneratorEdgeInteraction > agx::MergedBody::ContactGeneratorEdgeInteractionRef |
Definition at line 61 of file MergedBody.h.
Definition at line 59 of file MergedBody.h.
| typedef agx::ref_ptr< const EdgeInteraction > agx::MergedBody::EdgeInteractionConstRef |
Definition at line 59 of file MergedBody.h.
Definition at line 59 of file MergedBody.h.
Definition at line 59 of file MergedBody.h.
Definition at line 110 of file MergedBody.h.
| typedef std::function< void( EdgeInteraction* ) > agx::MergedBody::EdgeInteractionVisitor |
Definition at line 108 of file MergedBody.h.
| typedef agx::observer_ptr< const EmptyEdgeInteraction > agx::MergedBody::EmptyEdgeInteractionConstObserver |
Definition at line 60 of file MergedBody.h.
Definition at line 60 of file MergedBody.h.
Definition at line 60 of file MergedBody.h.
Definition at line 60 of file MergedBody.h.
| typedef agx::observer_ptr< const GeometryContactEdgeInteraction > agx::MergedBody::GeometryContactEdgeInteractionConstObserver |
Definition at line 62 of file MergedBody.h.
| typedef agx::ref_ptr< const GeometryContactEdgeInteraction > agx::MergedBody::GeometryContactEdgeInteractionConstRef |
Definition at line 62 of file MergedBody.h.
| typedef agx::observer_ptr< GeometryContactEdgeInteraction > agx::MergedBody::GeometryContactEdgeInteractionObserver |
Definition at line 62 of file MergedBody.h.
| typedef agx::ref_ptr< GeometryContactEdgeInteraction > agx::MergedBody::GeometryContactEdgeInteractionRef |
Definition at line 62 of file MergedBody.h.
| typedef agx::BitState< State > agx::MergedBody::InternalState |
Definition at line 109 of file MergedBody.h.
| typedef agx::observer_ptr< const Listener > agx::MergedBody::ListenerConstObserver |
Definition at line 106 of file MergedBody.h.
| typedef agx::ref_ptr< const Listener > agx::MergedBody::ListenerConstRef |
Definition at line 106 of file MergedBody.h.
| typedef agx::observer_ptr< Listener > agx::MergedBody::ListenerObserver |
Definition at line 106 of file MergedBody.h.
| typedef agx::ref_ptr< Listener > agx::MergedBody::ListenerRef |
Definition at line 106 of file MergedBody.h.
| typedef agx::observer_ptr< const ParticleParticleInteraction > agx::MergedBody::ParticleParticleInteractionConstObserver |
Definition at line 64 of file MergedBody.h.
| typedef agx::ref_ptr< const ParticleParticleInteraction > agx::MergedBody::ParticleParticleInteractionConstRef |
Definition at line 64 of file MergedBody.h.
| typedef agx::observer_ptr< ParticleParticleInteraction > agx::MergedBody::ParticleParticleInteractionObserver |
Definition at line 64 of file MergedBody.h.
Definition at line 64 of file MergedBody.h.
| typedef agx::VectorPOD< Point > agx::MergedBody::PointContainer |
Definition at line 975 of file MergedBody.h.
| typedef std::function< void( agx::RigidBody* ) > agx::MergedBody::RigidBodyVisitor |
Definition at line 107 of file MergedBody.h.
| Enumerator | |
|---|---|
| NONE | |
| CONTACT | |
| CONTACT_GENERATOR | |
| CONSTRAINT | |
| BINARY_CONSTRAINT | |
| PARTICLE_GENERATOR | |
Definition at line 765 of file MergedBody.h.
Internal state of this merged body.
| Enumerator | |
|---|---|
| INTERACTION_GRAPH_DIRTY | |
| RESTORED | |
| READY_FOR_SOLVER | |
| AUTO_CLEAN_WHEN_EMPTY | |
Definition at line 69 of file MergedBody.h.
| agx::MergedBody::MergedBody | ( | ) |
Construct merged body, default containing a root rigid body.
|
protectedvirtual | |||||||||||||
Reference counted object, protected destructor.
|
protectedvirtual |
Reference counted object, protected destructor.
|
protectedvirtual |
Reference counted object, protected destructor.
|
protectedvirtual |
Reference counted object, protected destructor.
|
protectedvirtual |
Reference counted object, protected destructor.
|
protectedvirtual |
Reference counted object, protected destructor.
|
protectedvirtual |
Reference counted object, protected destructor.
|
protectedvirtual |
Reference counted object, protected destructor.
| agx::Bool agx::MergedBody::add | ( | EdgeInteraction * | edge | ) |
Add an edge interaction defining a base interaction between one or two rigid bodies that will be considered merged if successful.
| edge | - edge interaction |
| agx::Bool agx::MergedBody::add | ( | Listener * | listener | ) |
Add listener to receive callbacks during certain events.
| listener | - listener to add |
| agx::MergedBody::AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE | ( | MergedBody::EdgeInteraction | ) |
| agx::MergedBody::AGXSTREAM_DECLARE_SERIALIZABLE_BASE | ( | MergedBody::BinaryConstraintEdgeInteraction | ) |
| agx::MergedBody::AGXSTREAM_DECLARE_SERIALIZABLE_BASE | ( | MergedBody::ContactGeneratorEdgeInteraction | ) |
| agx::MergedBody::AGXSTREAM_DECLARE_SERIALIZABLE_BASE | ( | MergedBody::EmptyEdgeInteraction | ) |
| agx::MergedBody::AGXSTREAM_DECLARE_SERIALIZABLE_BASE | ( | MergedBody::GeometryContactEdgeInteraction | ) |
| agx::MergedBody::AGXSTREAM_DECLARE_SERIALIZABLE_BASE | ( | MergedBody::ParticleParticleInteraction | ) |
|
protected |
Default constructor used by serialization.
|
explicit |
Construct given a one or two body constraint.
| constraint | - one or two body constraint |
|
explicit |
Construct given constraint implementation of a binary constraint.
| constraint | - binary constraint |
|
virtual |
Creates an empty clone of this merged body where each object that supports cloning also are cloned.
|
pure virtual |
This listener will be cloned when e.g., splitIslands is used.
|
protected |
Default constructor used by serialization.
| agx::MergedBody::ContactGeneratorEdgeInteraction | ( | agx::RigidBody * | rb1, |
| agx::RigidBody * | rb2 | ||
| ) |
Construct given two rigid bodies.
Both rigid bodies have to be valid.
| agx::Bool agx::MergedBody::containsDeletedBodies | ( | ) | const |
|
inlinestatic |
Definition at line 876 of file MergedBody.h.
|
inlinestatic |
Definition at line 918 of file MergedBody.h.
|
inlinestatic |
Definition at line 1010 of file MergedBody.h.
|
inlinestatic |
Definition at line 1092 of file MergedBody.h.
|
inlinestatic |
Definition at line 1136 of file MergedBody.h.
| void agx::MergedBody::debugPrint | ( | const agx::RigidBody * | rb | ) | const |
Debug prints (cout) interactions to rb.
|
protected |
Construct given two rigid bodies and a valid flag.
| rb1 | - first rigid body |
| rb2 | - second rigid body |
| tag | - Tag type of the interaction |
| valid | - true if valid, false if invalid |
|
protected |
Default constructor used by serialization.
| agx::MergedBody::EmptyEdgeInteraction | ( | agx::RigidBody * | rb1, |
| agx::RigidBody * | rb2 | ||
| ) |
Construct given two rigid bodies.
Both rigid bodies have to be valid.
|
static |
Definition at line 1222 of file MergedBody.h.
References agx::root().
|
static |
Filters rb and returns the merged rigid body if rb is part of one.
Otherwise rb is returned.
| rb | - rb to filter |
rb is present in one, otherwise rb Definition at line 1216 of file MergedBody.h.
References agx::root().
|
static |
Similar to filter( const agx::RigidBody* rb ).
rb or a merged body that rb is part of Definition at line 1208 of file MergedBody.h.
References agx::Physics::RigidBodyPtr::model(), and agx::root().
|
inlineoverrideprotectedvirtual |
Does nothing.
Definition at line 902 of file MergedBody.h.
|
overrideprotectedvirtual |
Checks for contacts between the bodies and adds them.
|
overrideprotectedvirtual |
Checks for contacts between the bodies and adds them.
|
overrideprotectedvirtual |
Transforms and adds the local contact data as a new geometry contact.
|
overrideprotectedvirtual |
Activates the constraint.
|
pure virtual |
Generate interaction or do nothing.
This method is called when this edge interaction is split, i.e., when removed from a merged body.
|
protected |
Default constructor used by serialization.
|
explicit |
Construct given a geometry contact data.
| gcPtr | - geometry contact data |
| agx::MergedBody::GeometryContactEdgeInteraction | ( | agxCollide::Geometry * | geometry1, |
| agx::RigidBody * | rb1, | ||
| agxCollide::Geometry * | geometry2, | ||
| agx::RigidBody * | rb2 | ||
| ) |
Construct given two geometries.
Use this method when this edge is being restored using light data.
| geometry1 | - first geometry |
| rb1 | - First rigid body |
| geometry2 | - second geometry |
| rb2 | - Second rigid body |
|
static |
This method returns a merged body if the constraint has been involved in it, e.g., by having an edge created given it.
| constraint | - constraint to check if involved in a merged body |
|
static |
This method returns an agx::MergedBody if rb has been added to one.
This method returns an agx::MergedBody regardless of if the agx::MergedBody is in a simulation or not.
| rb | - rb to find the agx::MergedBody for |
Definition at line 1184 of file MergedBody.h.
|
static |
This method returns a merged body if the constraint has been involved in it, e.g., by having an edge created given it.
| constraint | - constraint to check if involved in a merged body |
|
static |
This method returns an agx::MergedBody if rb has been added to one.
This method returns an agx::MergedBody regardless of if the agx::MergedBody is in a simulation or not.
| rb | - rb to find the agx::MergedBody for |
Definition at line 1178 of file MergedBody.h.
|
static |
This method returns an agx::MergedBody that is active and in a simulation.
rb - rb to find the active agx::MergedBody for
Definition at line 1196 of file MergedBody.h.
References isActive().
|
static |
This method returns an agx::MergedBody that is active and in a simulation.
rb - rb to find the active agx::MergedBody for
Definition at line 1190 of file MergedBody.h.
References isActive().
| agx::HighLevelConstraintImplementation * agx::MergedBody::getConstraint | ( | ) |
| const agx::HighLevelConstraintImplementation * agx::MergedBody::getConstraint | ( | ) | const |
| void agx::MergedBody::getDebugRenderColor | ( | agx::Vec3 & | color | ) | const |
Color of this merged body used for debug rendering.
|
static |
|
static |
| const EdgeInteractionRefContainer * agx::MergedBody::getEdges | ( | const agx::RigidBody * | rb1, |
| const agx::RigidBody * | rb2 | ||
| ) | const |
Referenced by agxSDK::MergeSplitUtils::collectConnectingEdges().
| agx::Bool agx::MergedBody::getEnableAutomaticCleanupWhenEmpty | ( | ) | const |
| agxCollide::Geometry * agx::MergedBody::getGeometry1 | ( | ) | const |
| agxCollide::Geometry * agx::MergedBody::getGeometry2 | ( | ) | const |
| const agx::Name & agx::MergedBody::getName | ( | ) | const |
| const agx::RigidBodyPtrVector * agx::MergedBody::getNeighbors | ( | const agx::RigidBody * | rb | ) | const |
rb is merged with, null if not merged Referenced by agxSDK::MergeSplitUtils::collectConnectingEdges().
| agx::UInt agx::MergedBody::getNumPairs | ( | ) | const |
| const PointContainer & agx::MergedBody::getPoints | ( | ) | const |
| agx::RigidBody * agx::MergedBody::getRigidBody | ( | ) | const |
| agx::RigidBody * agx::MergedBody::getRigidBody1 | ( | ) | const |
| agx::RigidBody * agx::MergedBody::getRigidBody2 | ( | ) | const |
|
protected |
|
protected |
| const InternalState & agx::MergedBody::getState | ( | ) | const |
| agx::Bool agx::MergedBody::getValid | ( | ) | const |
| Bool agx::MergedBody::isActive | ( | ) | const |
Definition at line 1233 of file MergedBody.h.
Referenced by getActive().
| agx::Bool agx::MergedBody::isEmpty | ( | ) | const |
|
inlinestatic |
| rb | - rigid body instance |
rb is root body of a MergedBody instance, otherwise false Definition at line 1202 of file MergedBody.h.
References agx::RigidBody::getEntity(), and agx::Physics::RigidBodyPtr::state().
| agx::Bool agx::MergedBody::isTagged | ( | InteractionTag | tag | ) | const |
| agx::Bool agx::MergedBody::merge | ( | agx::MergedBody * | other, |
| EdgeInteraction * | edge | ||
| ) |
Merges this with other and clears other.
| other | - other root to merge with this |
| edge | - new edge between this and other |
| agx::Bool agx::MergedBody::merged | ( | const agx::RigidBody * | rb1, |
| const agx::RigidBody * | rb2 | ||
| ) | const |
rb1 is merged with rb2, i.e., there's an edge interaction present between them
|
inlinevirtual |
Called when a body is added to the merged body.
Definition at line 729 of file MergedBody.h.
|
inlinevirtual |
Called when an edge is added to the merged body.
Definition at line 739 of file MergedBody.h.
|
protectedvirtual |
Called when the simulation is cleaned.
|
inlinevirtual |
Called when the edges between two bodies are moved from one merged body to another.
Definition at line 749 of file MergedBody.h.
|
protectedvirtual |
Called when a constraint, present in this merged body, is removed from the simulation.
|
inlinevirtual |
Called when a body is removed from the merged body.
Definition at line 734 of file MergedBody.h.
|
protectedvirtual |
Called when a rigid body, present in this merged body, is removed from the simulation.
|
protectedvirtual |
Called when a geometry, probably present in this merged body, is removed from space or body.
|
inlinevirtual |
Called when an edge is removed from the merged body.
Definition at line 744 of file MergedBody.h.
|
protected |
Default constructor used by serialization.
| agx::MergedBody::ParticleParticleInteraction | ( | agx::RigidBody * | substituteBody1, |
| agx::RigidBody * | substituteBody2 | ||
| ) |
Construct given two rigid bodies.
Both rigid bodies have to be valid.
|
protectedvirtual |
Called after solver (new velocities and POSSIBLY (or not) new transforms).
|
protectedvirtual |
Called before collision detection.
|
protectedvirtual |
Called before solver executes.
| agx::Bool agx::MergedBody::remove | ( | agx::RigidBody * | rb | ) |
Split/Remove a rigid body from this merged body.
rb isn't part of this merged body this action will fail. | rb | - rigid body to split |
| agx::Bool agx::MergedBody::remove | ( | EdgeInteraction * | edge | ) |
Remove an edge interaction from this merged body.
| edge | - edge interaction to remove |
| agx::Bool agx::MergedBody::remove | ( | Listener * | listener | ) |
Remove listener from this merged body.
| listener | - listener to remove |
|
overridevirtual |
Restores the two bodies and the construction state.
|
overridevirtual |
Restore non-structural data from stream.
|
overridevirtual |
Restore non-structural data from stream.
|
overridevirtual |
Restore non-structural data from stream.
|
overridevirtual |
Restore non-structural data from stream.
|
overridevirtual |
Restore non-structural data from stream.
|
overridevirtual |
Restore non-structural data from stream.
|
protected |
Assign bodies during restore.
| void agx::MergedBody::setEnableAutomaticCleanupWhenEmpty | ( | agx::Bool | enable | ) |
If true, this merged body will remove itself from the simulation and clear all internal states when it becomes empty.
This state is disabled by default and can be used when handling merged bodies implicitly by doing agx::MergedBody::get/getActive( rb ).
| enable | - true to enable, false to disable |
| void agx::MergedBody::setName | ( | const agx::Name & | name | ) |
Assign new name to this MergedBOdy Default: "".
|
protectedvirtual |
Called during agxSDK::Simulation::add and agxSDK::Simulation::remove.
If removed, simulation == null.
|
static |
|
static |
Removes the edge defined by the constraint from the merged body, if any.
|
static |
Removes the edge defined by the constraint from the merged body, if any.
|
static |
Split rigid body if merged.
| agx::MergedBodyRefVector agx::MergedBody::splitIslands | ( | ) |
Splits into islands.
|
overridevirtual |
Stores the two bodies and the construction state.
|
overridevirtual |
Store non-structural data to stream.
|
overridevirtual |
Store non-structural data to stream.
|
overridevirtual |
Store non-structural data to stream.
|
overridevirtual |
Store non-structural data to stream.
|
overridevirtual |
Store non-structural data to stream.
|
overridevirtual |
Store non-structural data to stream.
| void agx::MergedBody::traverse | ( | const agx::RigidBody * | rb, |
| EdgeInteractionVisitor | visitor, | ||
| agx::Bool | includeDisabled = false |
||
| ) | const |
Traverse the internal interaction graph and receive callback for each edge interaction where rb is part of.
| rb | - rigid body to check whether part of an edge interaction |
| visitor | - visitor function |
| includeDisabled | - true to receive callback for all edge interactions, including ones with disabled and/or not simulating bodies. False to only receive callback for edge interactions containing enabled and simulated bodies. |
| void agx::MergedBody::traverse | ( | const agx::RigidBody * | rb, |
| RigidBodyVisitor | visitor, | ||
| agx::Bool | includeDisabled = false |
||
| ) | const |
Traverse neighboring bodies to rb.
Neighboring bodies are the bodies with an edge interaction to rb.
| rb | - rb with neighbors |
| visitor | - visitor function |
| includeDisabled | - true to receive callback for all bodies, false to only receive callback for enabled and simulated bodies |
| void agx::MergedBody::traverse | ( | EdgeInteractionVisitor | visitor, |
| agx::Bool | includeDisabled = false |
||
| ) | const |
Traverse the internal interaction graph and receive callback for each edge interaction.
| visitor | - visitor function |
| includeDisabled | - true to receive callback for all edge interactions, including ones with disabled and/or not simulating bodies. False to only receive callback for edge interactions containing enabled and simulated bodies. |
| void agx::MergedBody::traverse | ( | RigidBodyVisitor | visitor, |
| agx::Bool | includeDisabled = false |
||
| ) | const |
Traverse the internal interaction graph and receive callback for all rigid bodies (unique).
| visitor | - visitor function |
| includeDisabled | - true to receive callback for all bodies, false to only receive callback for enabled and simulated bodies |
| agx::Bool agx::MergedBody::updateProperties | ( | ) |
Updates mass, position, velocity etc of the root body given the current state.