|
AGXDynamics
2.31.1.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. More... | |
| 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. More... | |
| agx::Bool | add (Listener *listener) |
| Add listener to receive callbacks during certain events. More... | |
| AGXSTREAM_DECLARE_ABSTRACT_SERIALIZABLE (MergedBody::EdgeInteraction) | |
| 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 |
| BinaryConstraintEdgeInteraction (agx::Constraint *constraint) | |
| Construct given a one or two body constraint. More... | |
| BinaryConstraintEdgeInteraction (agx::HighLevelConstraintImplementation *constraint) | |
| Construct given constraint implementation of a binary constraint. More... | |
| virtual MergedBodyRef | clone () |
| Creates an empty clone of this merged body where each object that supports cloning also are cloned. More... | |
| virtual ListenerRef | clone ()=0 |
| This listener will be cloned when e.g., splitIslands is used. More... | |
| ContactGeneratorEdgeInteraction (agx::RigidBody *rb1, agx::RigidBody *rb2) | |
| Construct given two rigid bodies. More... | |
| agx::Bool | containsDeletedBodies () const |
| void | debugPrint (const agx::RigidBody *rb) const |
Debug prints (cout) interactions to rb. More... | |
| EmptyEdgeInteraction (agx::RigidBody *rb1, agx::RigidBody *rb2) | |
| Construct given two rigid bodies. More... | |
| virtual void | generateInteraction (agxSDK::Simulation *simulation, agxCollide::LocalGeometryContactVector &newContacts)=0 |
| Generate interaction or do nothing. More... | |
| GeometryContactEdgeInteraction (agx::Physics::GeometryContactPtr gcPtr) | |
| Construct given a geometry contact data. More... | |
| GeometryContactEdgeInteraction (agxCollide::Geometry *geometry1, agx::RigidBody *rb1, agxCollide::Geometry *geometry2, agx::RigidBody *rb2) | |
| Construct given two geometries. More... | |
| const char * | getClassName () const override |
| const char * | getClassName () const override |
| const char * | getClassName () const override |
| const char * | getClassName () const override |
| const char * | getClassName () const override |
| agx::HighLevelConstraintImplementation * | getConstraint () |
| const agx::HighLevelConstraintImplementation * | getConstraint () const |
| void | getDebugRenderColor (agx::Vec3 &color) const |
| Color of this merged body used for debug rendering. More... | |
| const EdgeInteractionRefContainer * | getEdges (const agx::RigidBody *rb1, const agx::RigidBody *rb2) const |
| agx::Bool | getEnableAutomaticCleanupWhenEmpty () const |
| bool | getEnableSerialization () const |
| bool | getEnableUuidGeneration () |
| agxCollide::Geometry * | getGeometry1 () const |
| agxCollide::Geometry * | getGeometry2 () const |
| agx::UInt32 | getIndex () const |
| This index is given at creation of this object. More... | |
| const agx::RigidBodyPtrVector * | getNeighbors (const agx::RigidBody *rb) const |
| agx::UInt | getNumPairs () const |
| const PointContainer & | getPoints () const |
| int | getReferenceCount () const |
| agx::RigidBody * | getRigidBody () const |
| agx::RigidBody * | getRigidBody1 () const |
| agx::RigidBody * | getRigidBody2 () const |
| const InternalState & | getState () const |
| agxStream::StorageAgent * | getStorageAgent () const override |
| agxStream::StorageAgent * | getStorageAgent () const override |
| agxStream::StorageAgent * | getStorageAgent () const override |
| agxStream::StorageAgent * | getStorageAgent () const override |
| agxStream::StorageAgent * | getStorageAgent () const override |
| agx::Uuid | getUuid () const |
| agx::Bool | getValid () const |
| template<typename T > | |
| bool | is () const |
| Subclass test. More... | |
| agx::Bool | isActive () const |
| agx::Bool | isEmpty () const |
| bool | isFinished () const |
| agx::Bool | isTagged (InteractionTag tag) const |
| agx::Bool | merge (agx::MergedBody *other, EdgeInteraction *edge) |
Merges this with other and clears other. More... | |
| 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. More... | |
| virtual void | onAdded (EdgeInteraction *, const agx::MergedBody *) const |
| Called when an edge is added to the merged body. More... | |
| 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. More... | |
| virtual void | onRemove (agx::RigidBody *, const agx::MergedBody *) const |
| Called when a body is removed from the merged body. More... | |
| virtual void | onRemoved (const MergedBody::EdgeInteractionRefContainer &, const agx::MergedBody *) const |
| Called when an edge is removed from the merged body. More... | |
| ParticleParticleInteraction (agx::RigidBody *substituteBody1, agx::RigidBody *substituteBody2) | |
| Construct given two rigid bodies. 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... | |
| agx::Bool | remove (EdgeInteraction *edge) |
| Remove an edge interaction from this merged body. More... | |
| agx::Bool | remove (agx::RigidBody *rb) |
| Split/Remove a rigid body from this merged body. More... | |
| agx::Bool | remove (Listener *listener) |
| Remove listener from this merged body. More... | |
| virtual void | restore (agxStream::InputArchive &in) override |
| Restores the two bodies and the construction state. More... | |
| virtual void | restore (agxStream::InputArchive &in) override |
| virtual void | restore (agxStream::InputArchive &in) override |
| virtual void | restore (agxStream::InputArchive &in) override |
| virtual void | restore (agxStream::InputArchive &in) override |
| virtual void | restore (agxStream::InputArchive &in) override |
| virtual void | restoreLightData (agxStream::StorageStream &str) override |
| Restore non-structural data from stream. More... | |
| virtual void | restoreLightData (agxStream::StorageStream &str) override |
| Restore non-structural data from stream. More... | |
| virtual void | restoreLightData (agxStream::StorageStream &str) override |
| Restore non-structural data from stream. More... | |
| virtual void | restoreLightData (agxStream::StorageStream &str) override |
| Restore non-structural data from stream. More... | |
| virtual void | restoreLightData (agxStream::StorageStream &str) override |
| Restore non-structural data from stream. More... | |
| virtual void | restoreLightData (agxStream::StorageStream &str) override |
| Restore non-structural data from stream. More... | |
| 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. 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 | setUuid (const agx::Uuid &uuid) |
| Explicitly set a Uuid on a serializable object. More... | |
| agx::MergedBodyRefVector | splitIslands () |
| Splits into islands. More... | |
| virtual void | store (agxStream::OutputArchive &out) const override |
| Stores the two bodies and the construction state. More... | |
| virtual void | store (agxStream::OutputArchive &out) const override |
| virtual void | store (agxStream::OutputArchive &out) const override |
| virtual void | store (agxStream::OutputArchive &out) const override |
| virtual void | store (agxStream::OutputArchive &out) const override |
| virtual void | store (agxStream::OutputArchive &out) const override |
| virtual void | storeLightData (agxStream::StorageStream &str) const override |
| Store non-structural data to stream. More... | |
| virtual void | storeLightData (agxStream::StorageStream &str) const override |
| Store non-structural data to stream. More... | |
| virtual void | storeLightData (agxStream::StorageStream &str) const override |
| Store non-structural data to stream. More... | |
| virtual void | storeLightData (agxStream::StorageStream &str) const override |
| Store non-structural data to stream. More... | |
| virtual void | storeLightData (agxStream::StorageStream &str) const override |
| Store non-structural data to stream. More... | |
| virtual void | storeLightData (agxStream::StorageStream &str) const override |
| Store non-structural data to stream. More... | |
| void | traverse (RigidBodyVisitor visitor, agx::Bool includeDisabled=false) const |
| Traverse the internal interaction graph and receive callback for all rigid bodies (unique). More... | |
| void | traverse (EdgeInteractionVisitor visitor, agx::Bool includeDisabled=false) const |
| Traverse the internal interaction graph and receive callback for each edge interaction. More... | |
| 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. More... | |
| void | traverse (const agx::RigidBody *rb, RigidBodyVisitor visitor, agx::Bool includeDisabled=false) const |
Traverse neighboring bodies to rb. 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... | |
Static Public Member Functions | |
| static agxStream::Serializable * | create () |
| static agxStream::Serializable * | create (agxStream::InputArchive &) |
| static agxStream::Serializable * | create () |
| static agxStream::Serializable * | create (agxStream::InputArchive &) |
| static agxStream::Serializable * | create () |
| static agxStream::Serializable * | create (agxStream::InputArchive &) |
| static agxStream::Serializable * | create () |
| static agxStream::Serializable * | create (agxStream::InputArchive &) |
| static agxStream::Serializable * | create (agxStream::InputArchive &) |
| static agxStream::Serializable * | create () |
| static const agx::RigidBody * | filter (const agx::RigidBody *rb) |
Filters rb and returns the merged rigid body if rb is part of one. More... | |
| static agx::RigidBody * | filter (agx::RigidBody *rb) |
| static MergedBodyIndex | findMergedBodyIndex (agx::Physics::RigidBodyPtr rb) |
| Similar to filter( const agx::RigidBody* rb ). More... | |
| static const agx::MergedBody * | get (const agx::RigidBody *rb) |
This method returns an agx::MergedBody if rb has been added to one. More... | |
| static agx::MergedBody * | get (agx::RigidBody *rb) |
This method returns an agx::MergedBody if rb has been added to one. More... | |
| 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. More... | |
| 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. More... | |
| static const agx::MergedBody * | getActive (const agx::RigidBody *rb) |
| This method returns an agx::MergedBody that is active and in a simulation. More... | |
| static agx::MergedBody * | getActive (agx::RigidBody *rb) |
| This method returns an agx::MergedBody that is active and in a simulation. More... | |
| static const char * | getConstructClassId () |
| static const char * | getConstructClassId () |
| static const char * | getConstructClassId () |
| static const char * | getConstructClassId () |
| static const char * | getConstructClassId () |
| static BinaryConstraintEdgeInteraction * | getEdge (const agx::Constraint *constraint) |
| static BinaryConstraintEdgeInteraction * | getEdge (const agx::HighLevelConstraintImplementation *constraint) |
| static agx::Bool | isRoot (const agx::RigidBody *rb) |
| 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 agx::Bool | shouldIntegratePosition (const agx::RigidBody *rb) |
| static agx::Bool | split (agx::RigidBody *rb) |
| Split rigid body if merged. More... | |
| static agx::Bool | split (agx::Constraint *constraint) |
| Removes the edge defined by the constraint from the merged body, if any. More... | |
| static agx::Bool | split (agx::HighLevelConstraintImplementation *constraint) |
| Removes the edge defined by the constraint from the merged body, if any. More... | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Protected Member Functions | |
| virtual | ~BinaryConstraintEdgeInteraction () |
| Reference counted object, protected destructor. More... | |
| virtual | ~ContactGeneratorEdgeInteraction () |
| Reference counted object, protected destructor. More... | |
| virtual | ~EdgeInteraction () |
| Reference counted object, protected destructor. More... | |
| virtual | ~EmptyEdgeInteraction () |
| Reference counted object, protected destructor. More... | |
| virtual | ~GeometryContactEdgeInteraction () |
| Reference counted object, protected destructor. More... | |
| virtual | ~Listener () |
| Reference counted object, protected destructor. More... | |
| virtual | ~MergedBody () throw () |
| Reference counted object, protected destructor. More... | |
| virtual | ~ParticleParticleInteraction () |
| Reference counted object, protected destructor. More... | |
| void | allocateObserverVector () const |
| BinaryConstraintEdgeInteraction () | |
| Default constructor used by serialization. More... | |
| ContactGeneratorEdgeInteraction () | |
| Default constructor used by serialization. More... | |
| void | deleteUsingDeleteHandler () const |
| EdgeInteraction (agx::RigidBody *rb1, agx::RigidBody *rb2, InteractionTag tag, agx::Bool valid=true) | |
| Construct given two rigid bodies and a valid flag. More... | |
| EmptyEdgeInteraction () | |
| Default constructor used by serialization. More... | |
| virtual void | generateInteraction (agxSDK::Simulation *, agxCollide::LocalGeometryContactVector &) override |
| Does nothing. More... | |
| virtual void | generateInteraction (agxSDK::Simulation *simulation, agxCollide::LocalGeometryContactVector &newContacts) override |
| Checks for contacts between the bodies and adds them. More... | |
| virtual void | generateInteraction (agxSDK::Simulation *simulation, agxCollide::LocalGeometryContactVector &newContacts) override |
| Transforms and adds the local contact data as a new geometry contact. More... | |
| virtual void | generateInteraction (agxSDK::Simulation *simulation, agxCollide::LocalGeometryContactVector &newContacts) override |
| Activates the constraint. More... | |
| virtual void | generateInteraction (agxSDK::Simulation *, agxCollide::LocalGeometryContactVector &) override |
| Checks for contacts between the bodies and adds them. More... | |
| void | generateUuid () |
| GeometryContactEdgeInteraction () | |
| Default constructor used by serialization. More... | |
| agxSDK::Simulation * | getSimulation () |
| const agxSDK::Simulation * | getSimulation () const |
| virtual void | onCleanup () |
| Called when the simulation is cleaned. More... | |
| virtual void | onRemove (agx::RigidBody *rb) |
| Called when a rigid body, present in this merged body, is removed from the simulation. More... | |
| virtual void | onRemove (agx::Constraint *constraint) |
| Called when a constraint, present in this merged body, is removed from the simulation. More... | |
| virtual void | onRemove (agxCollide::Geometry *geometry) |
| Called when a geometry, probably present in this merged body, is removed from space or body. More... | |
| ParticleParticleInteraction () | |
| Default constructor used by serialization. More... | |
| virtual void | postStep () |
| Called after solver (new velocities and POSSIBLY (or not) new transforms). More... | |
| virtual void | preCollide () |
| Called before collision detection. More... | |
| virtual void | preStep () |
| Called before solver executes. More... | |
| void | setBodies (agx::RigidBody *rb1, agx::RigidBody *rb2) |
| Assign bodies during restore. More... | |
| virtual void | setSimulation (agxSDK::Simulation *simulation) |
| Called during agxSDK::Simulation::add and agxSDK::Simulation::remove. More... | |
| agx::Bool | updateProperties () |
| Updates mass, position, velocity etc of the root body given the current state. 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 | |
| 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 54 of file MergedBody.h.
| typedef agx::observer_ptr< const BinaryConstraintEdgeInteraction > agx::MergedBody::BinaryConstraintEdgeInteractionConstObserver |
Definition at line 62 of file MergedBody.h.
| typedef agx::ref_ptr< const BinaryConstraintEdgeInteraction > agx::MergedBody::BinaryConstraintEdgeInteractionConstRef |
Definition at line 62 of file MergedBody.h.
| typedef agx::observer_ptr< BinaryConstraintEdgeInteraction > agx::MergedBody::BinaryConstraintEdgeInteractionObserver |
Definition at line 62 of file MergedBody.h.
| typedef agx::ref_ptr< BinaryConstraintEdgeInteraction > agx::MergedBody::BinaryConstraintEdgeInteractionRef |
Definition at line 62 of file MergedBody.h.
| typedef agx::observer_ptr< const ContactGeneratorEdgeInteraction > agx::MergedBody::ContactGeneratorEdgeInteractionConstObserver |
Definition at line 60 of file MergedBody.h.
| typedef agx::ref_ptr< const ContactGeneratorEdgeInteraction > agx::MergedBody::ContactGeneratorEdgeInteractionConstRef |
Definition at line 60 of file MergedBody.h.
| typedef agx::observer_ptr< ContactGeneratorEdgeInteraction > agx::MergedBody::ContactGeneratorEdgeInteractionObserver |
Definition at line 60 of file MergedBody.h.
| typedef agx::ref_ptr< ContactGeneratorEdgeInteraction > agx::MergedBody::ContactGeneratorEdgeInteractionRef |
Definition at line 60 of file MergedBody.h.
Definition at line 58 of file MergedBody.h.
| typedef agx::ref_ptr< const EdgeInteraction > agx::MergedBody::EdgeInteractionConstRef |
Definition at line 58 of file MergedBody.h.
Definition at line 58 of file MergedBody.h.
Definition at line 58 of file MergedBody.h.
Definition at line 109 of file MergedBody.h.
| typedef std::function< void( EdgeInteraction* ) > agx::MergedBody::EdgeInteractionVisitor |
Definition at line 107 of file MergedBody.h.
| typedef agx::observer_ptr< const EmptyEdgeInteraction > agx::MergedBody::EmptyEdgeInteractionConstObserver |
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 59 of file MergedBody.h.
| typedef agx::observer_ptr< const GeometryContactEdgeInteraction > agx::MergedBody::GeometryContactEdgeInteractionConstObserver |
Definition at line 61 of file MergedBody.h.
| typedef agx::ref_ptr< const GeometryContactEdgeInteraction > agx::MergedBody::GeometryContactEdgeInteractionConstRef |
Definition at line 61 of file MergedBody.h.
| typedef agx::observer_ptr< GeometryContactEdgeInteraction > agx::MergedBody::GeometryContactEdgeInteractionObserver |
Definition at line 61 of file MergedBody.h.
| typedef agx::ref_ptr< GeometryContactEdgeInteraction > agx::MergedBody::GeometryContactEdgeInteractionRef |
Definition at line 61 of file MergedBody.h.
| typedef agx::BitState< State > agx::MergedBody::InternalState |
Definition at line 108 of file MergedBody.h.
| typedef agx::observer_ptr< const Listener > agx::MergedBody::ListenerConstObserver |
Definition at line 105 of file MergedBody.h.
| typedef agx::ref_ptr< const Listener > agx::MergedBody::ListenerConstRef |
Definition at line 105 of file MergedBody.h.
| typedef agx::observer_ptr< Listener > agx::MergedBody::ListenerObserver |
Definition at line 105 of file MergedBody.h.
| typedef agx::ref_ptr< Listener > agx::MergedBody::ListenerRef |
Definition at line 105 of file MergedBody.h.
| typedef agx::observer_ptr< const ParticleParticleInteraction > agx::MergedBody::ParticleParticleInteractionConstObserver |
Definition at line 63 of file MergedBody.h.
| typedef agx::ref_ptr< const ParticleParticleInteraction > agx::MergedBody::ParticleParticleInteractionConstRef |
Definition at line 63 of file MergedBody.h.
| typedef agx::observer_ptr< ParticleParticleInteraction > agx::MergedBody::ParticleParticleInteractionObserver |
Definition at line 63 of file MergedBody.h.
Definition at line 63 of file MergedBody.h.
| typedef agx::VectorPOD< Point > agx::MergedBody::PointContainer |
Definition at line 962 of file MergedBody.h.
| typedef std::function< void( agx::RigidBody* ) > agx::MergedBody::RigidBodyVisitor |
Definition at line 106 of file MergedBody.h.
| Enumerator | |
|---|---|
| NONE | |
| CONTACT | |
| CONTACT_GENERATOR | |
| CONSTRAINT | |
| BINARY_CONSTRAINT | |
| PARTICLE_GENERATOR | |
Definition at line 752 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 68 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 | ) |
|
protectedinherited |
|
inherited |
Subclass casting.
Template type must match actual type, dynamic_cast assertion will fail otherwise.
Referenced by agx::InternalData::get(), agxVehicle::Track::getNode(), and agx::InternalData::getOrCreate().
|
inherited |
|
inherited |
Safe subclass casting, return nullptr if template type does not match.
Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().
|
inherited |
|
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 |
|
protected |
Default constructor used by serialization.
|
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.
| agx::MergedBody::ContactGeneratorEdgeInteraction | ( | agx::RigidBody * | rb1, |
| agx::RigidBody * | rb2 | ||
| ) |
Construct given two rigid bodies.
Both rigid bodies have to be valid.
|
protected |
Default constructor used by serialization.
| agx::Bool agx::MergedBody::containsDeletedBodies | ( | ) | const |
|
inlinestatic |
Definition at line 863 of file MergedBody.h.
|
inlinestatic |
Definition at line 863 of file MergedBody.h.
|
inlinestatic |
Definition at line 905 of file MergedBody.h.
|
inlinestatic |
Definition at line 905 of file MergedBody.h.
|
inlinestatic |
Definition at line 997 of file MergedBody.h.
|
inlinestatic |
Definition at line 997 of file MergedBody.h.
|
inlinestatic |
Definition at line 1079 of file MergedBody.h.
|
inlinestatic |
Definition at line 1079 of file MergedBody.h.
|
inlinestatic |
Definition at line 1123 of file MergedBody.h.
|
inlinestatic |
Definition at line 1123 of file MergedBody.h.
| void agx::MergedBody::debugPrint | ( | const agx::RigidBody * | rb | ) | const |
Debug prints (cout) interactions to rb.
|
protectedinherited |
|
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 |
| agx::MergedBody::EmptyEdgeInteraction | ( | agx::RigidBody * | rb1, |
| agx::RigidBody * | rb2 | ||
| ) |
Construct given two rigid bodies.
Both rigid bodies have to be valid.
|
protected |
Default constructor used by serialization.
|
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 1203 of file MergedBody.h.
References getRigidBody(), and agx::root().
|
static |
Definition at line 1209 of file MergedBody.h.
References getRigidBody(), and agx::root().
|
static |
Similar to filter( const agx::RigidBody* rb ).
rb or a merged body that rb is part of Definition at line 1195 of file MergedBody.h.
References agx::RigidBody::getEntity(), getRigidBody(), agx::Physics::RigidBodyPtr::model(), and agx::root().
|
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.
|
inlineoverrideprotectedvirtual |
Does nothing.
Definition at line 889 of file MergedBody.h.
|
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.
|
overrideprotectedvirtual |
Checks for contacts between the bodies and adds them.
|
protectedinherited |
|
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 |
|
protected |
Default constructor used by serialization.
|
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 1165 of file MergedBody.h.
Referenced by getActive().
|
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 1171 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 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 that is active and in a simulation.
rb - rb to find the active agx::MergedBody for
Definition at line 1177 of file MergedBody.h.
References get(), and 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 1183 of file MergedBody.h.
References get(), and isActive().
|
inlineoverridevirtual |
Reimplemented from agxStream::Serializable.
Definition at line 863 of file MergedBody.h.
|
inlineoverridevirtual |
Reimplemented from agxStream::Serializable.
Definition at line 905 of file MergedBody.h.
|
inlineoverridevirtual |
Reimplemented from agxStream::Serializable.
Definition at line 997 of file MergedBody.h.
|
inlineoverridevirtual |
Reimplemented from agxStream::Serializable.
Definition at line 1079 of file MergedBody.h.
|
inlineoverridevirtual |
Reimplemented from agxStream::Serializable.
Definition at line 1123 of file MergedBody.h.
| agx::HighLevelConstraintImplementation* agx::MergedBody::getConstraint | ( | ) |
| const agx::HighLevelConstraintImplementation* agx::MergedBody::getConstraint | ( | ) | const |
|
inlinestatic |
Definition at line 863 of file MergedBody.h.
|
inlinestatic |
Definition at line 905 of file MergedBody.h.
|
inlinestatic |
Definition at line 997 of file MergedBody.h.
|
inlinestatic |
Definition at line 1079 of file MergedBody.h.
|
inlinestatic |
Definition at line 1123 of file MergedBody.h.
Color of this merged body used for debug rendering.
|
staticprotectedinherited |
|
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 |
|
inherited |
Definition at line 273 of file Serializable.h.
|
inherited |
| agxCollide::Geometry* agx::MergedBody::getGeometry1 | ( | ) | const |
| agxCollide::Geometry* agx::MergedBody::getGeometry2 | ( | ) | 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.
Definition at line 247 of file Serializable.h.
| 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 |
|
inherited |
| agx::RigidBody* agx::MergedBody::getRigidBody | ( | ) | const |
Referenced by filter(), and findMergedBodyIndex().
| agx::RigidBody* agx::MergedBody::getRigidBody1 | ( | ) | const |
| agx::RigidBody* agx::MergedBody::getRigidBody2 | ( | ) | const |
|
protected |
|
protected |
| const InternalState& agx::MergedBody::getState | ( | ) | const |
|
inlineoverridevirtual |
Implements agxStream::Serializable.
Definition at line 863 of file MergedBody.h.
|
inlineoverridevirtual |
Implements agxStream::Serializable.
Definition at line 905 of file MergedBody.h.
|
inlineoverridevirtual |
Implements agxStream::Serializable.
Definition at line 997 of file MergedBody.h.
|
inlineoverridevirtual |
Implements agxStream::Serializable.
Definition at line 1079 of file MergedBody.h.
|
inlineoverridevirtual |
Implements agxStream::Serializable.
Definition at line 1123 of file MergedBody.h.
|
inherited |
Definition at line 268 of file Serializable.h.
| agx::Bool agx::MergedBody::getValid | ( | ) | const |
|
inherited |
Subclass test.
Referenced by agx::Object::getAutoScopedResource(), agxData::Buffer::getElement(), and agx::Object::getResource().
| Bool agx::MergedBody::isActive | ( | ) | const |
Definition at line 1220 of file MergedBody.h.
Referenced by getActive().
| agx::Bool agx::MergedBody::isEmpty | ( | ) | const |
|
inherited |
Definition at line 252 of file Serializable.h.
|
inlinestatic |
| rb | - rigid body instance |
rb is root body of a MergedBody instance, otherwise false Definition at line 1189 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 716 of file MergedBody.h.
|
inlinevirtual |
Called when an edge is added to the merged body.
Definition at line 726 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 736 of file MergedBody.h.
|
protectedvirtual |
Called when a rigid body, present in this merged body, is removed from the simulation.
|
protectedvirtual |
Called when a constraint, 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 a body is removed from the merged body.
Definition at line 721 of file MergedBody.h.
|
inlinevirtual |
Called when an edge is removed from the merged body.
Definition at line 731 of file MergedBody.h.
| agx::MergedBody::ParticleParticleInteraction | ( | agx::RigidBody * | substituteBody1, |
| agx::RigidBody * | substituteBody2 | ||
| ) |
Construct given two rigid bodies.
Both rigid bodies have to be valid.
|
protected |
Default constructor used by serialization.
|
protectedvirtual |
Called after solver (new velocities and POSSIBLY (or not) new transforms).
|
protectedvirtual |
Called before collision detection.
|
protectedvirtual |
Called before solver executes.
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.
Referenced by agxData::Val< UInt >::Val().
| 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 | ( | 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 | ( | Listener * | listener | ) |
Remove listener from this merged body.
| listener | - listener to remove |
|
overridevirtual |
Restores the two bodies and the construction state.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
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.
|
staticprotectedinherited |
Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
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 |
|
inherited |
Set to false to disable serialization of this object.
It will just be ignored during serialization (writing). It is still possible to restore TO this object.
|
staticinherited |
Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled.
|
inherited |
Tells this class that it is restored correctly and should not be deleted during destruction of an Archive.
|
protectedvirtual |
Called during agxSDK::Simulation::add and agxSDK::Simulation::remove.
If removed, simulation == null.
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!
|
static |
|
static |
Split rigid body if merged.
|
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.
| agx::MergedBodyRefVector agx::MergedBody::splitIslands | ( | ) |
Splits into islands.
|
overridevirtual |
Stores the two bodies and the construction state.
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
overridevirtual |
|
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 | ( | 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 |
| 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 | ( | 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 |
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.
|
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.
|
protected |
Updates mass, position, velocity etc of the root body given the current state.
|
staticinherited |
|
mutableprotectedinherited |
Definition at line 239 of file Referenced.h.
|
mutableprotectedinherited |
Definition at line 241 of file Referenced.h.