|
AGXDynamics
2.31.1.0
|
#include <GranularBodySystem.h>
Inheritance diagram for agx::Physics::GranularBodySystem:Public Types | |
| typedef agx::observer_ptr< const Event > | EventConstObserver |
| typedef agx::ref_ptr< const Event > | EventConstRef |
| typedef agx::observer_ptr< Event > | EventObserver |
| typedef agx::ref_ptr< Event > | EventRef |
| enum | MotionControl { KINEMATICS = 2, DYNAMICS = 3 } |
| The MotionControl enumeration indicates what makes a GranularBody in the GranularBodySystem move. More... | |
| typedef Event2< Component *, Object * > | ObjectEvent |
| Event when adding removing child objects. More... | |
| typedef Callback1< Object * > | TraverseCallback |
Public Member Functions | |
| GranularBodySystem (Device *device=CpuDevice::instance()) | |
| void | _setGravityTask (Task *task) |
| void | addCollisionGroup (agx::UInt32 id, bool updateExistingParticles=true) |
Add the specified id to a vector of group id, this will make a all newly created particles part of the group id. More... | |
| void | addCollisionGroup (const agx::Name &id, bool updateExistingParticles=true) |
| void | addCollisionGroupParticle (agx::UInt32 id, agx::Physics::ParticlePtr ptr) |
Add the specified id to a vector of group id, this make the specific particle part of the group id. More... | |
| void | addCollisionGroupParticle (const agx::Name &id, agx::Physics::ParticlePtr ptr) |
| void | addCustomBufferInt (const agx::String &buffername) |
| Adds a custom attribute Int buffer for the particle system. More... | |
| void | addCustomBufferReal (const agx::String &buffername) |
| Adds a custom attribute Real buffer for the particle system. More... | |
| void | addCustomBufferReal32 (const agx::String &buffername) |
| Adds a custom attribute Real32 buffer for the particle system. More... | |
| void | addCustomBufferVec3 (const agx::String &buffername) |
| Adds a custom attribute Vec3 buffer for the particle system. More... | |
| void | addListener (EventListener *listener) |
| virtual void | addNotification (agxSDK::Simulation *simulation) |
| Triggers when particlesystem is added to the simulation. More... | |
| virtual void | addObject (agx::Object *object, bool assignContext=true) |
| Add an object to the component. More... | |
| AGX_DECLARE_VECTOR_TYPES (Event) | |
| void | applyAirForceDragSimple (agx::Real cd, agx::Real cr) |
| Apply air drag to the particles according to formula: cd * velocity^2 + cr * velocity. 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 |
| void | attach () |
| Binds relevant buffer pointers to objects after inserting the particle system into the simulation. More... | |
| virtual String | autoComplete (const String &partialName, StringVector &matchingNames) const |
| virtual void | buildNavigationTree (agxJson::Value &eNode) const override |
| agx::Real | calculateTotalParticleMass () const |
| Calculates the total particle mass in the particle system. More... | |
| agx::Real | calculateTotalParticleVolume () const |
| void | clearAllParticles () |
| Utility method for clearing all particles in the particle system. More... | |
| void | clearContactData () |
| void | colorParticlesWithLevelsInBound (const agx::Bound3 &bound, const agx::Vec4fVector &colors) |
| Colors particles with different levels in the vertical z-direction inside a specified bound. More... | |
| void | commitAllBuffers () |
| Executes the "commit" command all buffers in the particle system. More... | |
| void | commitColorBuffer () |
| Executes the "commit" command on the buffer so that particle rendering can be updated properly. More... | |
| virtual void | configure (TiXmlElement *eComponent) override |
| void | configure (Model *model) |
| Physics::GranularBodyPtr | createParticle () |
| Create a new particle in the particle system. More... | |
| agx::Physics::ParticleGeometryContactPtr | createParticleGeometryContact (agx::Physics::ParticlePtr particle, agx::Physics::GeometryPtr geometry) |
| agx::Physics::ParticlePairContactPtr | createParticlePairContact (agx::Physics::ParticlePtr p1, agx::Physics::ParticlePtr p2) |
| agxData::EntityRange | createParticles (size_t numParticles) |
| Create a set of particles in the particle system. More... | |
| void | destroyParticle (Physics::ParticlePtr particle) |
| Destroy a particle. More... | |
| void | destroyParticles (const Physics::ParticlePtrVector &particles) |
| Destroy a list of particles. More... | |
| void | destroyParticles (const agxData::EntityPtrVector &particles) |
| void | destroyParticles (agxData::EntityRange particles) |
| Destroy a range of particles. More... | |
| virtual void | destroySingleParticle (agx::Index particleId) |
| Destroy particle with specified id. More... | |
| void | detach () |
| Unbinds relevant buffer pointers from objects after removing the particle system into the simulation. More... | |
| void | evaluateParticleDefaultMass () |
| This should be called if the density of the bulk material is changed, so the particle default mass is updated accordingly. More... | |
| agx::String | fullName () const |
| agx::String | fullPath () const |
| agx::String | fullPath (const agx::Object *root) const |
| agx::Object * | getAutoScopedResource (const agx::Path &path, agx::Model *model=nullptr) |
| const agx::Object * | getAutoScopedResource (const agx::Path &path, agx::Model *model=nullptr) const |
| template<typename T > | |
| T * | getAutoScopedResource (const agx::Path &path) |
| template<typename T > | |
| const T * | getAutoScopedResource (const agx::Path &path) const |
| const char * | getClassName () const override |
| agx::Physics::CollisionGroupSetPtr | getCollisionGroupSet () const |
| agx::Object * | getContext () |
| const agx::Object * | getContext () const |
| template<typename T > | |
| T * | getContext () |
| template<typename T > | |
| const T * | getContext () const |
| agx::Int | getCustomBufferValueInt (agx::Index id, const agx::String &buffername) |
| Returns a custom Int buffer value from a particle. More... | |
| agx::Real | getCustomBufferValueReal (agx::Index id, const agx::String &buffername) |
| Returns a custom Real buffer value from a particle. More... | |
| agx::Real32 | getCustomBufferValueReal32 (agx::Index id, const agx::String &buffername) |
| Returns a custom Real32 buffer value from a particle. More... | |
| agx::Vec3 | getCustomBufferValueVec3 (agx::Index id, const agx::String &buffername) |
| Returns a custom Vec3 buffer value from a particle. More... | |
| agx::Device * | getDevice () |
| const agx::Device * | getDevice () const |
| template<typename T > | |
| T * | getDevice () |
| template<typename T > | |
| const T * | getDevice () const |
| const agxCollide::GeometryHashVector & | getDisabledCollisions () const |
| bool | getEnableCollisions (const agxCollide::Geometry *geometry) const |
| bool | getEnableSerialization () const |
| bool | getEnableUuidGeneration () |
| agxData::EntityStorage * | getGeometryParticleContactListStorage () |
| agx::Physics::GranularBodyPtrVector | getGranularBodyPtrVector () const |
| agx::Physics::GranularBodyPtrVector | getGranularBodyPtrVector () |
| agx::UInt32 | getId () const |
| const agx::Name & | getImplementationName () const |
| agx::UInt32 | getIndex () const |
| This index is given at creation of this object. More... | |
| Material * | getMaterial () |
| const Material * | getMaterial () const |
| agx::Model * | getModel () |
| const agx::Model * | getModel () const |
| MotionControl | getMotionControl (agx::Physics::GranularBodyPtr gptr) const |
| Get the motion control of a granular body. More... | |
| const agx::Name & | getName () const |
| agx::Object * | getNextSibling () |
| const agx::Object * | getNextSibling () const |
| size_t | getNumObjects (const agx::Name &name) const |
| size_t | getNumParticles () const |
| agx::Object * | getObject (const agx::Name &name, size_t index=0) |
| const agx::Object * | getObject (const agx::Name &name, size_t index=0) const |
| agx::Object * | getObject (const agx::Name &name, agx::Model *model, size_t index=0) |
| const agx::Object * | getObject (const agx::Name &name, agx::Model *model, size_t index=0) const |
| template<typename T > | |
| T * | getObject (const agx::Name &name, size_t index=0) |
| template<typename T > | |
| const T * | getObject (const agx::Name &name, size_t index=0) const |
| const agx::ObjectRefVector & | getObjects () const |
| template<typename T > | |
| void | getObjects (agx::ObjectPtrVector &result, bool recursive=false) const |
| void | getObjects (agx::ObjectPtrVector &result, const agx::Model *model, bool recursive=false) const |
| template<typename T > | |
| void | getObjects (ObjectPtrVector &result, bool recursive) const |
| Physics::ParticlePtr | getParticle (agx::Index particleId) |
| Returns a particle from the particle system given a particle id. More... | |
| const agx::Bound3 & | getParticleBound () |
| agx::Vector< agx::Physics::ParticleGeometryContactPtr > | getParticleGeometryContacts () |
| Returns the current ParticleGeometryContacts in the simulation. More... | |
| agxData::EntityStorage * | getParticleGeometryContactStorage () |
| agx::Index | getParticleIdFromIndex (agx::Index index) const |
| Return the particle id for the specified particle entity array index. More... | |
| Real | getParticleMass () const |
| agxData::EntityStorage * | getParticlePairContactStorage () |
| agx::Vector< agx::Physics::ParticlePairContactPtr > | getParticleParticleContacts () |
| Returns the current ParticleParticle contacts in the simulation. More... | |
| Real | getParticleRadius () const |
| const agx::Physics::GranularBodyPtrArray | getParticles () const |
| agx::Physics::GranularBodyPtrArray | getParticles () |
| agxData::EntityStorage * | getParticleStorage () |
| const agxData::EntityStorage * | getParticleStorage () const |
| agx::Path | getPath () const |
| agx::Path | getPath (const agx::Object *root) const |
| int | getReferenceCount () const |
| agx::Object * | getResource (const agx::Path &path, agx::Model *model=nullptr) |
| const agx::Object * | getResource (const agx::Path &path, agx::Model *model=nullptr) const |
| template<typename T > | |
| T * | getResource (const agx::Path &path) |
| template<typename T > | |
| const T * | getResource (const agx::Path &path) const |
| virtual Object * | getResourceImpl (const Path &path, agx::Model *model) override |
| agx::Object * | getRootContext () |
| const agx::Object * | getRootContext () const |
| agx::Vec3 | getSingleParticleAngularVelocity (agx::Index particleId) |
| Get angular velocity for a single particle. More... | |
| virtual agx::Vec4f | getSingleParticleColor (agx::Index particleId) |
| Get particle color with specified id. More... | |
| virtual agx::Vec3 | getSingleParticleForce (agx::Index particleId) |
| Get particle velocity with specified id. More... | |
| virtual agx::Real | getSingleParticleMass (agx::Index particleId) |
| Get particle radius with specified id. More... | |
| virtual agx::Vec3 | getSingleParticlePosition (agx::Index particleId) |
| Get particle position with specified id. More... | |
| virtual agx::Real | getSingleParticleRadius (agx::Index particleId) |
| Get particle radius with specified id. More... | |
| virtual agx::Vec3 | getSingleParticleVelocity (agx::Index particleId) |
| Get particle velocity with specified id. More... | |
| agxStream::StorageAgent * | getStorageAgent () const override |
| agx::Real | getTotalParticleGeometryContactForces () |
| agx::Real | getTotalParticleParticleContactForces () |
| Task * | getUpdateTask () |
| agx::Uuid | getUuid () const |
| bool | hasCollisionGroup (agx::UInt32 id) const |
| This is performing a linear search among the group id for this particle. More... | |
| bool | hasCollisionGroup (const agx::Name &id) const |
| bool | hasCollisionGroupParticle (agx::UInt32 id, agx::Physics::ParticlePtr ptr) const |
| This is performing a linear search among the group id for this particle. More... | |
| bool | hasCollisionGroupParticle (const agx::Name &id, agx::Physics::ParticlePtr ptr) const |
| bool | hasCustomBuffer (const agx::String &buffername, const agx::String &formatName) |
| Returns true if the particle system has a buffer with the specified name and format. More... | |
| bool | hasListener (EventListener *listener) |
| bool | hasParent (const agx::Object *node) const |
| template<typename T > | |
| bool | is () const |
| Subclass test. More... | |
| bool | isFinished () const |
| bool | isParticleGeometryContactValid (Physics::ParticleGeometryContactPtr contact) |
| bool | isParticlePairContactValid (Physics::ParticlePairContactPtr contact) |
| bool | isUnique () const |
| bool | isValid (Physics::ParticlePtr particle) const |
| bool | particleExistsWithId (agx::Index id) |
| Check if there is a particle with a specified id. More... | |
| virtual void | printSubtree () const override |
| void | printSubtree (std::ostream &stream, int depth=0) const |
| virtual void | rebind () override |
| void | reference (void *ptr=nullptr) const |
| Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. More... | |
| void | removeAllObjects () |
| Remove all components. More... | |
| void | removeCollisionGroup (agx::UInt32 id, bool updateExistingParticles=true) |
| Remove a group id from the vector of group ids. More... | |
| void | removeCollisionGroup (const agx::Name &id, bool updateExistingParticles=true) |
| void | removeCollisionGroupParticle (agx::UInt32 id, agx::Physics::ParticlePtr ptr) |
| Remove a group id from the vector of group ids. More... | |
| void | removeCollisionGroupParticle (const agx::Name &id, agx::Physics::ParticlePtr ptr) |
| void | removeListener (EventListener *listener) |
| virtual void | removeObject (agx::Object *object) |
| Remove an object from the component. More... | |
| void | removeObject (const agx::Name &name, size_t index=0) |
| Remove an object with a specified name (and optional index) from the component. More... | |
| void | removeParticle (Physics::ParticlePtr particle) |
| Tag a particle for removal at the end of the time step. More... | |
| virtual void | restore (agxStream::InputArchive &in) override |
| virtual void | save (TiXmlElement *) const |
| void | setContactMode (agx::UInt contactMode) |
| Set the contact mode of the GranularBodySystem. More... | |
| virtual void | setContext (agx::Object *context) |
| void | setCustomBufferValueInt (agx::Index id, const agx::String &buffername, agx::Int val) |
| Sets a custom Int buffer value to a particle. More... | |
| void | setCustomBufferValueReal (agx::Index id, const agx::String &buffername, agx::Real val) |
| Sets a custom Real buffer value to a particle. More... | |
| void | setCustomBufferValueReal32 (agx::Index id, const agx::String &buffername, agx::Real32 val) |
| Sets a custom Real32 buffer value to a particle. More... | |
| void | setCustomBufferValueVec3 (agx::Index id, const agx::String &buffername, agx::Vec3 val) |
| Sets a custom Vec3 buffer value to a particle. More... | |
| void | setEnableCollisions (const agxCollide::Geometry *geometry, bool flag) |
Specify whether otherGeometry is allowed to collide with this 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 | setId (UInt32 id) |
| void | setMaterial (Material *material, bool updateExistingParticles=false) |
| Set the default particle material. More... | |
| void | setModel (agx::Model *model) |
| Set the object model (handled automatically). More... | |
| void | setMotionControl (agx::Physics::GranularBodyPtr gptr, MotionControl motionControl) |
| Set motion control of the granular body. More... | |
| void | setName (const agx::Name &name) |
| Set the name of the object. More... | |
| virtual void | setParticleMass (Real mass, bool updateExistingParticles=false) override |
| Set granular body mass and inertia. More... | |
| void | setParticleRadius (Real radius, bool updateExistingParticles=false) |
| Set the default particle radius of created particles, with option of updating existing particles. More... | |
| void | setSingleParticleAngularVelocity (agx::Index particleId, const agx::Vec3 &angularVelocity) |
| Set angular velocity for a single particle. More... | |
| virtual void | setSingleParticleColor (agx::Index particleId, const agx::Vec4f &color) |
| Set particle color with specified id. More... | |
| virtual void | setSingleParticleForce (agx::Index particleId, const agx::Vec3 &force) |
| Set particle force with specified id. More... | |
| virtual void | setSingleParticleMass (agx::Index particleId, agx::Real mass) |
| Set particle radius with specified id. More... | |
| virtual void | setSingleParticleRadius (agx::Index particleId, agx::Real radius) override |
| Set single particle radius given a specified id. More... | |
| virtual void | setSingleParticleVelocity (agx::Index particleId, const agx::Vec3 &velocity) |
| Set particle velocity with specified id. More... | |
| void | setSpace (agxCollide::Space *space) |
| virtual bool | setUpdateTask (Task *updateTask) override |
| Set the task that will be executed whenever it is time to step the simulation. More... | |
| void | setUuid (const agx::Uuid &uuid) |
| Explicitly set a Uuid on a serializable object. More... | |
| virtual void | snapshot (TiXmlNode *eParent, const String &directory) const override |
| agxData::EntityRange | spawnParticles (const agx::Vec3Vector &positions) |
| Spawn particles with defined positions. More... | |
| agx::Physics::ParticlePtrVector | spawnParticlesInBound (const agx::Bound3 &bound, Real radius, const agx::Vec3 &spacing, agx::Real jitterFactor=agx::Real(0)) |
| Spawns particles in a specified bound. More... | |
| agx::Physics::ParticlePtrVector | spawnParticlesInBound (const agx::Bound3 &bound, agx::Emitter::DistributionTable *sourceTable, const agx::Vec3 &spacing, agx::Real jitterFactor=agx::Real(0)) |
| Spawns particles In a specified bound from a distribution table. More... | |
| agx::Physics::ParticlePtrVector | spawnParticlesInBoundHCP (const agx::Bound3 &bound, Real radius, const agx::Vec3 &spacing, agx::Real jitterFactor=agx::Real(0)) |
| Spawns particles In a specified bound using a Hexagonal-Close-Packing (HCP) lattice. More... | |
| agx::Physics::ParticlePtrVector | spawnParticlesInBoundHCP (const agx::Bound3 &bound, agx::Emitter::DistributionTable *sourceTable, const agx::Vec3 &spacing, agx::Real jitterFactor=agx::Real(0)) |
| Spawns particles in a specified bound from a distribution table using a Hexagonal-Close-Packing (HCP) lattice. More... | |
| agx::Physics::ParticlePtrVector | spawnParticlesInGeometry (agxCollide::Geometry *geometry, Real radius, const agx::Vec3 &spacing, agx::Real jitterFactor=agx::Real(0)) |
| Spawns particles In a specified geometry. More... | |
| agx::Physics::ParticlePtrVector | spawnParticlesInGeometry (agxCollide::Geometry *geometry, agx::Emitter::DistributionTable *sourceTable, const agx::Vec3 &spacing, agx::Real jitterFactor=agx::Real(0)) |
| Spawns particles In a specified geometry from a distribution table. More... | |
| agx::Physics::ParticlePtrVector | spawnParticlesInGeometryHCP (agxCollide::Geometry *geometry, Real radius, const agx::Vec3 &spacing, agx::Real jitterFactor=agx::Real(0)) |
| Spawns particles In a specified geometry using a Hexagonal-Close-Packing (HCP) lattice. More... | |
| agx::Physics::ParticlePtrVector | spawnParticlesInGeometryHCP (agxCollide::Geometry *geometry, agx::Emitter::DistributionTable *sourceTable, const agx::Vec3 &spacing, agx::Real jitterFactor=agx::Real(0)) |
| Spawns particles In a specified geometry from a distribution table using a Hexagonal-Close-Packing (HCP) lattice. More... | |
| virtual void | store (agxStream::OutputArchive &out) const override |
| Vec3 | sumForceMagnitudes (RigidBody *body) |
| Sums force magnitudes from particle system onto rigid body. More... | |
| void | traverse (const TraverseCallback &callback) |
| void | traverse (ComponentVisitor *) |
| 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... | |
| void | updateShouldRender () |
| Update the shouldRender variable in particles given renders states such as clipping and filtering. More... | |
Static Public Member Functions | |
| static Component * | _load (TiXmlElement *eComponent, Device *device) |
| static void | applyTransform (agx::Physics::GranularBodyPtr gptr, const agx::AffineMatrix4x4 &transform, bool includeVelocity=false) |
| Apply a 4x4 transform on a particle. More... | |
| static Model * | ClassModel () |
| static agx::RigidBody * | convertGranularBodyToRigidBody (agx::Physics::GranularBodyPtr gptr) |
| Convert a granular body to a rigid body. More... | |
| static void | copyGranularBodyData (agx::Physics::GranularBodyPtr target, agx::Physics::GranularBodyPtr source, bool copyMaterial=true) |
| Copy data from GranularBody source to target body. More... | |
| static agxStream::Serializable * | create () |
| static agxStream::Serializable * | create (agxStream::InputArchive &) |
| static agx::String | generateName (const agx::String &bindPath) |
| static const HashSet< Object * > & | getActiveObjects () |
| static const char * | getConstructClassId () |
| static bool | getEnableRebind () |
| Should rebinding be allowed? Right now a global setting. More... | |
| static bool | isGranularBodySystem (agx::ParticleSystem *system) |
| Checks if a particle system is a granular body system by either class or by internal models. More... | |
| static Component * | load (const String &path, const Path &_namespace=Path()) |
| static Component * | load (const String &path, Device *device, const Path &_namespace=Path()) |
| static Component * | load (const Path &path, const Name &implementation, Device *device, const Path &_namespace=Path()) |
| static Component * | load (TiXmlElement *eComponent, Device *device) |
| static Object * | load (const String &path, Device *device, const String &type="", size_t instance=0) |
| static Object * | load (const String &path, Device *device, const String &type, const String &attribute, const String &value) |
| static void | load (const String &path, Device *device, ObjectPtrVector &loadedObjects) |
| static TiXmlDocument | openDocument (const String &path) |
| static void | setEnableRebind (bool flag) |
| Sets if rebinding of objects should be allowed (Right now a global setting). 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... | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Public Attributes | |
| ObjectEvent | addObjectEvent |
| ObjectEvent | removeObjectEvent |
Protected Types | |
| typedef agx::observer_ptr< const MaterialUuidBufferListener > | MaterialUuidBufferListenerConstObserver |
| typedef agx::ref_ptr< const MaterialUuidBufferListener > | MaterialUuidBufferListenerConstRef |
| typedef agx::observer_ptr< MaterialUuidBufferListener > | MaterialUuidBufferListenerObserver |
| typedef agx::ref_ptr< MaterialUuidBufferListener > | MaterialUuidBufferListenerRef |
Protected Member Functions | |
| virtual | ~GranularBodySystem () |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
| String | expandAutoCompletionMatch (const String &query, const StringVector &matchingNames) const |
| void | generateUuid () |
| void | init () |
| void | init (bool createMaterial=true) |
| void | invalidLicenseCallback () |
| void | setCollisionGroupSet (agx::Physics::CollisionGroupSetPtr) |
| void | setDevice (Device *device) |
| void | setRadiusOnParticles (agxData::EntityRange &entityRange, agx::Real radius) |
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 | |
| Mutex | m_mutex |
| ObserverContainer | m_observers |
| agxData::EntityStorageRef | m_particleStorage |
| AtomicValue | m_refCount |
| TaskGroupRef | m_updateTask |
Definition at line 32 of file GranularBodySystem.h.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
protectedinherited |
Definition at line 667 of file ParticleSystem.h.
|
protectedinherited |
Definition at line 667 of file ParticleSystem.h.
|
protectedinherited |
Definition at line 667 of file ParticleSystem.h.
|
protectedinherited |
Definition at line 667 of file ParticleSystem.h.
|
inherited |
Event when adding removing child objects.
NOTE: Events are triggered recursively up the parent structure Example: B is added to root node A, one event is triggered (A.addObjectEvent(A, B)). Then when C is added to B two events are triggered (B.addObjectEvent(B, C), and A.addObjectEvent(B,C))
Definition at line 61 of file Component.h.
|
inherited |
Definition at line 141 of file Component.h.
The MotionControl enumeration indicates what makes a GranularBody in the GranularBodySystem move.
There are two forms of motion allowed:
Definition at line 42 of file GranularBodySystem.h.
| agx::Physics::GranularBodySystem::GranularBodySystem | ( | Device * | device = CpuDevice::instance() | ) |
|
protectedvirtual |
|
staticinherited |
|
inherited |
Add the specified id to a vector of group id, this will make a all newly created particles part of the group id.
Following has to be true to make this method return true.
This can be used to partition the simulation where some groups cannot collide with other groups. Which groups that can collide or not is determined by Space and can be set using the method agxCollide::Space::setEnablePair( id1, id2, enable );
|
inherited |
|
inherited |
Add the specified id to a vector of group id, this make the specific particle part of the group id.
By default the specific particle is not part of any group.
This can be used to partition the simulation where some groups cannot collide with other groups. Which groups that can collide or not is determined by Space and can be set using the method agxCollide::Space::setEnablePair( id1, id2, enable );
|
inherited |
|
inherited |
Adds a custom attribute Int buffer for the particle system.
Allows for setting custom properties of type Int for each particle in the particle system.
| buffername | The name of the attribute buffer |
Definition at line 757 of file ParticleSystem.h.
|
inherited |
Adds a custom attribute Real buffer for the particle system.
Allows for setting custom properties of type Real for each particle in the particle system.
| buffername | The name of the attribute buffer |
Definition at line 752 of file ParticleSystem.h.
|
inherited |
Adds a custom attribute Real32 buffer for the particle system.
Allows for setting custom properties of type Real32 for each particle in the particle system.
| buffername | The name of the attribute buffer |
Definition at line 762 of file ParticleSystem.h.
|
inherited |
Adds a custom attribute Vec3 buffer for the particle system.
Allows for setting custom properties of type Vec3 for each particle in the particle system.
| buffername | The name of the Vec3 attribute buffer to add |
Definition at line 767 of file ParticleSystem.h.
|
inherited |
|
virtualinherited |
Triggers when particlesystem is added to the simulation.
|
virtualinherited |
Add an object to the component.
| object | The object to be added |
| assignContext | True if the child get the component as the context, set to false to allow 'weak' coupled children |
Referenced by agxSDK::StatisticsListenerData< agx::Real >::StatisticsListenerData().
|
inherited |
|
protectedinherited |
Apply air drag to the particles according to formula: cd * velocity^2 + cr * velocity.
|
static |
Apply a 4x4 transform on a particle.
|
inherited |
Subclass casting.
Template type must match actual type, dynamic_cast assertion will fail otherwise.
Referenced by agx::InternalData::get(), agxVehicle::Track::getNode(), agx::InternalData::getOrCreate(), and agx::InternalData::hasData().
|
inherited |
|
inherited |
Safe subclass casting, return nullptr if template type does not match.
Referenced by agxUtil::CollectBodiesAndWiresVisitor::visit().
|
inherited |
|
inherited |
Binds relevant buffer pointers to objects after inserting the particle system into the simulation.
|
virtualinherited |
Reimplemented in agx::Namespace.
|
overridevirtualinherited |
Reimplemented from agx::Object.
Reimplemented in agxData::Buffer, and agx::Model.
|
inherited |
Calculates the total particle mass in the particle system.
|
inherited |
|
staticinherited |
|
inherited |
Utility method for clearing all particles in the particle system.
|
inherited |
|
inherited |
Colors particles with different levels in the vertical z-direction inside a specified bound.
| bound | The bound that is used to color the particles |
| colors | Vector containing the colors that will be used in the coloring |
|
inherited |
Executes the "commit" command all buffers in the particle system.
This is necessary if the raw data buffers been modified during a simulation where a journal is recorded.
|
inherited |
Executes the "commit" command on the buffer so that particle rendering can be updated properly.
|
overridevirtualinherited |
Reimplemented from agx::Object.
Reimplemented in agx::Clock, agx::Task, agx::Kernel, agx::UnresolvedTask, and agx::Clock.
|
static |
Convert a granular body to a rigid body.
|
static |
Copy data from GranularBody source to target body.
|
inlinestatic |
Definition at line 117 of file GranularBodySystem.h.
|
inlinestatic |
Definition at line 117 of file GranularBodySystem.h.
| Physics::GranularBodyPtr agx::Physics::GranularBodySystem::createParticle | ( | ) |
Create a new particle in the particle system.
Definition at line 129 of file GranularBodySystem.h.
References agx::ParticleSystem::createParticle().
|
inherited |
|
inherited |
|
inherited |
Create a set of particles in the particle system.
|
protectedinherited |
|
inherited |
Destroy a particle.
|
inherited |
Destroy a list of particles.
|
inherited |
|
inherited |
Destroy a range of particles.
|
virtualinherited |
Destroy particle with specified id.
|
inherited |
Unbinds relevant buffer pointers from objects after removing the particle system into the simulation.
|
inherited |
This should be called if the density of the bulk material is changed, so the particle default mass is updated accordingly.
|
protectedinherited |
|
inherited |
|
inherited |
|
inherited |
|
staticinherited |
|
protectedinherited |
|
inherited |
|
inherited |
|
inherited |
Definition at line 428 of file Object.h.
References agx::Referenced::is().
|
inherited |
|
inlineoverridevirtual |
Reimplemented from agxStream::Serializable.
Definition at line 117 of file GranularBodySystem.h.
|
inlineinherited |
Definition at line 749 of file ParticleSystem.h.
|
inlinestatic |
Definition at line 117 of file GranularBodySystem.h.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Returns a custom Int buffer value from a particle.
| id | Id of the particle |
| buffername | The name of the custom Int attribute buffer |
Definition at line 759 of file ParticleSystem.h.
|
inherited |
Returns a custom Real buffer value from a particle.
| id | Id of the particle |
| buffername | The name of the custom Real attribute buffer |
Definition at line 754 of file ParticleSystem.h.
|
inherited |
Returns a custom Real32 buffer value from a particle.
| id | Id of the particle |
| buffername | The name of the custom Real32 attribute buffer |
Definition at line 764 of file ParticleSystem.h.
|
inherited |
Returns a custom Vec3 buffer value from a particle.
| id | Id of the particle |
| buffername | The name of the custom Vec3 attribute buffer |
Definition at line 769 of file ParticleSystem.h.
|
staticprotectedinherited |
|
inherited |
Definition at line 222 of file Component.h.
|
inherited |
Definition at line 223 of file Component.h.
|
inherited |
Definition at line 226 of file Component.h.
References agxAssert.
|
inherited |
Definition at line 233 of file Component.h.
References agxAssert.
|
inherited |
Definition at line 747 of file ParticleSystem.h.
|
inherited |
geometry.
|
staticinherited |
Should rebinding be allowed? Right now a global setting.
|
inherited |
Definition at line 273 of file Serializable.h.
|
inherited |
|
inherited |
Definition at line 744 of file ParticleSystem.h.
| agx::Physics::GranularBodyPtrVector agx::Physics::GranularBodySystem::getGranularBodyPtrVector | ( | ) | const |
| agx::Physics::GranularBodyPtrVector agx::Physics::GranularBodySystem::getGranularBodyPtrVector | ( | ) |
|
inherited |
Definition at line 370 of file Object.h.
Referenced by agxData::EntityStorage::indexToId().
|
inherited |
|
inherited |
This index is given at creation of this object.
It is guaranteed to be unique for the lifetime of this library instance. As long as the application is running. This value is not serialized or restored. A new object will always get a new index no matter how it is created.
Definition at line 247 of file Serializable.h.
|
inherited |
|
inherited |
|
inherited |
| MotionControl agx::Physics::GranularBodySystem::getMotionControl | ( | agx::Physics::GranularBodyPtr | gptr | ) | const |
Get the motion control of a granular body.
|
inherited |
Definition at line 369 of file Object.h.
Referenced by agxData::EntityStorage::get(), agxData::FormatBinding< T >::getFormat(), and agxData::EntityPtr::operator()().
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Definition at line 194 of file Component.h.
|
inherited |
Definition at line 195 of file Component.h.
|
inherited |
Definition at line 197 of file Component.h.
|
inherited |
Definition at line 198 of file Component.h.
|
inherited |
Definition at line 202 of file Component.h.
|
inherited |
Definition at line 216 of file Component.h.
|
inherited |
Definition at line 192 of file Component.h.
Referenced by agx::Component::getObjects().
|
inherited |
|
inherited |
|
inherited |
Definition at line 241 of file Component.h.
References agx::Component::getObjects().
|
inherited |
Returns a particle from the particle system given a particle id.
|
inherited |
|
inherited |
Returns the current ParticleGeometryContacts in the simulation.
|
inherited |
Definition at line 743 of file ParticleSystem.h.
|
inherited |
Return the particle id for the specified particle entity array index.
| index | - specified entity array index. |
|
inherited |
|
inherited |
Definition at line 745 of file ParticleSystem.h.
|
inherited |
Returns the current ParticleParticle contacts in the simulation.
|
inherited |
| const agx::Physics::GranularBodyPtrArray agx::Physics::GranularBodySystem::getParticles | ( | ) | const |
Definition at line 131 of file GranularBodySystem.h.
| agx::Physics::GranularBodyPtrArray agx::Physics::GranularBodySystem::getParticles | ( | ) |
Definition at line 130 of file GranularBodySystem.h.
|
inherited |
Definition at line 741 of file ParticleSystem.h.
|
inherited |
Definition at line 742 of file ParticleSystem.h.
|
inherited |
Referenced by agxData::EntityStorage::dereferenceMultipliedAttribute(), and agxData::EntityInstance::verifyIndex().
|
inherited |
| root | A node along the parent path from this object. |
|
inherited |
|
inherited |
|
inherited |
|
inherited |
Definition at line 414 of file Object.h.
References agx::Referenced::is().
|
inherited |
|
overridevirtualinherited |
Reimplemented from agx::Object.
Reimplemented in agx::Task, and agxData::EntityStorage.
|
inherited |
|
inherited |
| agx::Vec3 agx::Physics::GranularBodySystem::getSingleParticleAngularVelocity | ( | agx::Index | particleId | ) |
Get angular velocity for a single particle.
|
virtualinherited |
Get particle color with specified id.
|
virtualinherited |
Get particle velocity with specified id.
|
virtualinherited |
Get particle radius with specified id.
|
virtualinherited |
Get particle position with specified id.
|
virtualinherited |
Get particle radius with specified id.
|
virtualinherited |
Get particle velocity with specified id.
|
inlineoverridevirtual |
Implements agxStream::Serializable.
Definition at line 117 of file GranularBodySystem.h.
|
inherited |
|
inherited |
|
inherited |
Definition at line 729 of file ParticleSystem.h.
|
inherited |
Definition at line 268 of file Serializable.h.
Referenced by agxSDK::UuidHashCollisionFilter::match().
|
inherited |
This is performing a linear search among the group id for this particle.
| id | - The group id we are looking for. |
id
|
inherited |
|
inherited |
This is performing a linear search among the group id for this particle.
| id | - The group id we are looking for. |
id
|
inherited |
|
inherited |
Returns true if the particle system has a buffer with the specified name and format.
|
inherited |
|
inherited |
|
protected |
|
protectedinherited |
|
protected |
|
inherited |
Subclass test.
Referenced by agx::Object::getAutoScopedResource(), agxData::EntityStorage::getInstances(), and agx::Object::getResource().
|
inherited |
Definition at line 252 of file Serializable.h.
References AGX_FORCE_INLINE.
|
static |
Checks if a particle system is a granular body system by either class or by internal models.
|
inherited |
|
inherited |
|
inherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
staticinherited |
|
inherited |
Check if there is a particle with a specified id.
|
overridevirtualinherited |
Reimplemented from agx::Object.
|
inherited |
|
overridevirtualinherited |
Reimplemented from agx::Object.
Reimplemented in agx::Task, and agx::Clock.
Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.
This method should be used with care, always balanced with the same number of calls to unreference.
|
inherited |
Remove all components.
|
inherited |
Remove a group id from the vector of group ids.
| id | - The group id to be removed |
|
inherited |
|
inherited |
Remove a group id from the vector of group ids.
| id | - The group id to be removed |
|
inherited |
|
inherited |
|
virtualinherited |
Remove an object from the component.
Remove an object with a specified name (and optional index) from the component.
|
inherited |
Tag a particle for removal at the end of the time step.
| particle | - the specified particlePtr to mark for removal. |
|
overridevirtual |
|
inlinevirtualinherited |
Reimplemented in agx::Clock.
|
protectedinherited |
Set the contact mode of the GranularBodySystem.
(Default is 4) 2 - Only friction and normal forces are calculated in the granular contacts. 3 - Normal, friction and rolling resistance forces are calculated in the granular contacts. 4 - Normal, friction, rolling resistance and twisting resistance forces are calculated in the granular contacts.
|
virtualinherited |
Reimplemented in agx::Task, and agxData::FunctionValue.
|
inherited |
Sets a custom Int buffer value to a particle.
| id | Id of the particle |
| buffername | The name of the custom Int attribute buffer |
| val | The Int value to be set on the particle |
Definition at line 758 of file ParticleSystem.h.
|
inherited |
Sets a custom Real buffer value to a particle.
| id | Id of the particle |
| buffername | The name of the custom Real attribute buffer |
| val | The Real value to be set on the particle |
Definition at line 753 of file ParticleSystem.h.
|
inherited |
Sets a custom Real32 buffer value to a particle.
| id | Id of the particle |
| buffername | The name of the custom Real attribute buffer |
| val | The Real32 value to be set on the particle |
Definition at line 763 of file ParticleSystem.h.
|
inherited |
Sets a custom Vec3 buffer value to a particle.
| id | Id of the particle |
| buffername | The name of the custom Vec3 attribute buffer |
| val | The Vec3 value to be set on the particle |
Definition at line 768 of file ParticleSystem.h.
|
staticprotectedinherited |
Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to.
|
inherited |
Specify whether otherGeometry is allowed to collide with this geometry.
|
staticinherited |
Sets if rebinding of objects should be allowed (Right now a global setting).
Allowing it when adding larger parts to the system tree might hit performance, so it might be smarter to disable it first, then add, and then enable again.
|
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.
|
inherited |
Set the default particle material.
The default particle mass is derived from the density of the default material.
| material | - the specific material to set as the default particle material. |
| updateExistingParticles | - true if existing particles should be updated, false otherwise. ( Default: false ) |
|
inherited |
Set the object model (handled automatically).
| void agx::Physics::GranularBodySystem::setMotionControl | ( | agx::Physics::GranularBodyPtr | gptr, |
| MotionControl | motionControl | ||
| ) |
Set motion control of the granular body.
|
overridevirtual |
Set granular body mass and inertia.
Note that the default mass is normally derived from the default material of the granular system when granular bodies are created. This function is used to set the default value of the mass and inertia buffers and also to manually set the mass and inertia on all granular bodies.
| mass | - the specified mass to set as default and to all existing granular bodies if that option is used. |
| updateExistingParticles | - true if the mass and inertia of all existing bodies should be updated, false otherwise. ( Default: false ) |
Reimplemented from agx::ParticleSystem.
|
inherited |
Set the default particle radius of created particles, with option of updating existing particles.
| radius | - the specified default radius to set to the particle system. |
| updateExistingParticles | - true if the existing particles should be updated, false otherwise. ( Default: false ) |
|
protectedinherited |
| void agx::Physics::GranularBodySystem::setSingleParticleAngularVelocity | ( | agx::Index | particleId, |
| const agx::Vec3 & | angularVelocity | ||
| ) |
Set angular velocity for a single particle.
|
virtualinherited |
Set particle color with specified id.
|
virtualinherited |
Set particle force with specified id.
|
virtualinherited |
Set particle radius with specified id.
|
overridevirtual |
Set single particle radius given a specified id.
Reimplemented from agx::ParticleSystem.
|
virtualinherited |
Set particle velocity with specified id.
|
inherited |
|
overridevirtual |
Set the task that will be executed whenever it is time to step the simulation.
Reimplemented from agx::ParticleSystem.
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!
|
overridevirtualinherited |
Reimplemented from agx::Object.
|
inherited |
Spawn particles with defined positions.
|
inherited |
Spawns particles in a specified bound.
| bound | the specified bound to spawn in |
| spacing | spacing between the particle center points that are spawned |
| jitterFactor | the factor of the distance that is used to randomize particle positions |
|
inherited |
Spawns particles In a specified bound from a distribution table.
| bound | The specified bound to spawn in |
| sourceTable | The particle model distribution table used to spawn particles |
| spacing | spacing between the particle center points that are spawned |
| jitterFactor | The factor of the distance that is used to randomize particle positions |
|
inherited |
Spawns particles In a specified bound using a Hexagonal-Close-Packing (HCP) lattice.
| bound | The specified bound to spawn in |
| radius | The radius for the new particles |
| spacing | Spacing between the particle center points that are spawned |
| jitterFactor | The factor of the distance that is used to randomize particle positions |
|
inherited |
Spawns particles in a specified bound from a distribution table using a Hexagonal-Close-Packing (HCP) lattice.
| bound | The specified bound to spawn in |
| sourceTable | The particle model distribution table used to spawn particles |
| spacing | Spacing between the particle center points that are spawned |
| jitterFactor | The factor of the distance that is used to randomize particle positions |
|
inherited |
Spawns particles In a specified geometry.
| geometry | The specified geometry to spawn particles in |
| spacing | Spacing between the particle center points that are spawned |
| jitterFactor | The factor of the distance that is used to randomize particle positions |
|
inherited |
Spawns particles In a specified geometry from a distribution table.
| geometry | The specified geometry to spawn particles in |
| sourceTable | The particle model distribution table used to spawn particles |
| spacing | Spacing between the particle center points that are spawned |
| jitterFactor | The factor of the distance that is used to randomize particle positions |
|
inherited |
Spawns particles In a specified geometry using a Hexagonal-Close-Packing (HCP) lattice.
| geometry | The specified geometry to spawn particles in |
| spacing | Spacing between the particle center points that are spawned |
| jitterFactor | The factor of the distance that is used to randomize particle positions |
|
inherited |
Spawns particles In a specified geometry from a distribution table using a Hexagonal-Close-Packing (HCP) lattice.
| geometry | The specified geometry to spawn particles in |
| sourceTable | The particle model distribution table used to spawn particles |
| spacing | Spacing between the particle center points that are spawned |
| jitterFactor | The factor of the distance that is used to randomize particle positions |
|
overridevirtual |
Sums force magnitudes from particle system onto rigid body.
Only valid for iterative solver.
| body | The rigid body. |
|
inherited |
|
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().
|
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.
|
inherited |
Update the shouldRender variable in particles given renders states such as clipping and filtering.
This determines if an individual particle should be rendered or not.
|
staticinherited |
|
inherited |
Definition at line 63 of file Component.h.
|
mutableprotectedinherited |
Definition at line 240 of file Referenced.h.
|
mutableprotectedinherited |
Definition at line 239 of file Referenced.h.
|
protectedinherited |
Definition at line 690 of file ParticleSystem.h.
|
mutableprotectedinherited |
Definition at line 241 of file Referenced.h.
|
protectedinherited |
Definition at line 657 of file ParticleSystem.h.
|
inherited |
Definition at line 64 of file Component.h.