AGXDynamics  2.31.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
agx::RigidParticleSystem Class Referenceabstract

A specialization of the particle system that simulates the particles as a set of hard core spheres. More...

#include <RigidParticleSystem.h>

+ Inheritance diagram for agx::RigidParticleSystem:

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
 
typedef Event2< Component
*, Object * > 
ObjectEvent
 Event when adding removing child objects. More...
 
typedef Callback1< Object * > TraverseCallback
 

Public Member Functions

 RigidParticleSystem (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::ParticlePtr 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
 
virtual const char * getClassName () const
 
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::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
 
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::ParticlePtrArray 
getParticles () const
 
agx::Physics::ParticlePtrArray 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
 
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...
 
virtual StorageAgent * getStorageAgent () const =0
 
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 save (TiXmlElement *) const
 
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 setName (const agx::Name &name)
 Set the name of the object. More...
 
virtual void setParticleMass (Real mass, bool updateExistingParticles=false)
 Set particle mass. More...
 
void setParticleRadius (Real radius, bool updateExistingParticles=false)
 Set the default particle radius of created particles, with option of updating existing particles. 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)
 Set particle radius with 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)
 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...
 
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 Model * ClassModel ()
 
static agx::String generateName (const agx::String &bindPath)
 
static const HashSet< Object * > & getActiveObjects ()
 
static bool getEnableRebind ()
 Should rebinding be allowed? Right now a global setting. 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

void allocateObserverVector () const
 
void deleteUsingDeleteHandler () const
 
String expandAutoCompletionMatch (const String &query, const StringVector &matchingNames) const
 
void generateUuid ()
 
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
 

Detailed Description

A specialization of the particle system that simulates the particles as a set of hard core spheres.

Definition at line 31 of file RigidParticleSystem.h.

Member Typedef Documentation

Definition at line 62 of file Object.h.

typedef agx::ref_ptr< const Event > agx::Object::EventConstRef
inherited

Definition at line 62 of file Object.h.

Definition at line 62 of file Object.h.

Definition at line 62 of file Object.h.

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.

Definition at line 141 of file Component.h.

Constructor & Destructor Documentation

agx::RigidParticleSystem::RigidParticleSystem ( Device *  device = CpuDevice::instance())

Member Function Documentation

static Component* agx::Component::_load ( TiXmlElement *  eComponent,
Device *  device 
)
staticinherited
void agx::ParticleSystem::_setGravityTask ( Task *  task)
inherited
void agx::ParticleSystem::addCollisionGroup ( agx::UInt32  id,
bool  updateExistingParticles = true 
)
inherited

Add the specified id to a vector of group id, this will make a all newly created particles part of the group id.

Returns
true if the ParticleSystem can collide with a specified geometry.

Following has to be true to make this method return true.

  • if they belong to a group pair that is not disabled
  • collisions for g1 is not disabled against g2 (g1->setEnableCollisions(g2, false) By default the particles are 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 );

void agx::ParticleSystem::addCollisionGroup ( const agx::Name &  id,
bool  updateExistingParticles = true 
)
inherited
void agx::ParticleSystem::addCollisionGroupParticle ( agx::UInt32  id,
agx::Physics::ParticlePtr  ptr 
)
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 );

void agx::ParticleSystem::addCollisionGroupParticle ( const agx::Name &  id,
agx::Physics::ParticlePtr  ptr 
)
inherited
void agx::ParticleSystem::addCustomBufferInt ( const agx::String &  buffername)
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.

Parameters
buffernameThe name of the attribute buffer

Definition at line 757 of file ParticleSystem.h.

void agx::ParticleSystem::addCustomBufferReal ( const agx::String &  buffername)
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.

Parameters
buffernameThe name of the attribute buffer

Definition at line 752 of file ParticleSystem.h.

void agx::ParticleSystem::addCustomBufferReal32 ( const agx::String &  buffername)
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.

Parameters
buffernameThe name of the attribute buffer

Definition at line 762 of file ParticleSystem.h.

void agx::ParticleSystem::addCustomBufferVec3 ( const agx::String &  buffername)
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.

Parameters
buffernameThe name of the Vec3 attribute buffer to add

Definition at line 767 of file ParticleSystem.h.

void agx::Object::addListener ( EventListener *  listener)
inherited
virtual void agx::ParticleSystem::addNotification ( agxSDK::Simulation *  simulation)
virtualinherited

Triggers when particlesystem is added to the simulation.

virtual void agx::Component::addObject ( agx::Object *  object,
bool  assignContext = true 
)
virtualinherited

Add an object to the component.

Parameters
objectThe object to be added
assignContextTrue if the child get the component as the context, set to false to allow 'weak' coupled children
agx::Object::AGX_DECLARE_VECTOR_TYPES ( Event  )
inherited
void agx::Referenced::allocateObserverVector ( ) const
protectedinherited
void agx::ParticleSystem::applyAirForceDragSimple ( agx::Real  cd,
agx::Real  cr 
)
inherited

Apply air drag to the particles according to formula: cd * velocity^2 + cr * velocity.

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

Subclass casting.

Template type must match actual type, dynamic_cast assertion will fail otherwise.

Referenced by agx::InternalData::get(), agxVehicle::Track::getNode(), and agx::InternalData::getOrCreate().

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

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

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

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

Binds relevant buffer pointers to objects after inserting the particle system into the simulation.

virtual String agx::Component::autoComplete ( const String &  partialName,
StringVector &  matchingNames 
) const
virtualinherited

Reimplemented in agx::Namespace.

virtual void agx::Component::buildNavigationTree ( agxJson::Value &  eNode) const
overridevirtualinherited

Reimplemented from agx::Object.

Reimplemented in agxData::Buffer, and agx::Model.

agx::Real agx::ParticleSystem::calculateTotalParticleMass ( ) const
inherited

Calculates the total particle mass in the particle system.

agx::Real agx::ParticleSystem::calculateTotalParticleVolume ( ) const
inherited
static Model* agx::ParticleSystem::ClassModel ( )
staticinherited
void agx::ParticleSystem::clearAllParticles ( )
inherited

Utility method for clearing all particles in the particle system.

void agx::ParticleSystem::clearContactData ( )
inherited
void agx::ParticleSystem::colorParticlesWithLevelsInBound ( const agx::Bound3 &  bound,
const agx::Vec4fVector &  colors 
)
inherited

Colors particles with different levels in the vertical z-direction inside a specified bound.

Parameters
boundThe bound that is used to color the particles
colorsVector containing the colors that will be used in the coloring
void agx::ParticleSystem::commitAllBuffers ( )
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.

void agx::ParticleSystem::commitColorBuffer ( )
inherited

Executes the "commit" command on the buffer so that particle rendering can be updated properly.

virtual void agx::Component::configure ( TiXmlElement *  eComponent)
overridevirtualinherited

Reimplemented from agx::Object.

Reimplemented in agx::Clock, agx::Task, agx::Kernel, agx::UnresolvedTask, and agx::Clock.

void agx::Component::configure ( Model *  model)
inherited
Physics::ParticlePtr agx::ParticleSystem::createParticle ( )
inherited

Create a new particle in the particle system.

Referenced by agx::Physics::GranularBodySystem::createParticle().

agx::Physics::ParticleGeometryContactPtr agx::ParticleSystem::createParticleGeometryContact ( agx::Physics::ParticlePtr  particle,
agx::Physics::GeometryPtr  geometry 
)
inherited
agx::Physics::ParticlePairContactPtr agx::ParticleSystem::createParticlePairContact ( agx::Physics::ParticlePtr  p1,
agx::Physics::ParticlePtr  p2 
)
inherited
agxData::EntityRange agx::ParticleSystem::createParticles ( size_t  numParticles)
inherited

Create a set of particles in the particle system.

void agx::Referenced::deleteUsingDeleteHandler ( ) const
protectedinherited
void agx::ParticleSystem::destroyParticle ( Physics::ParticlePtr  particle)
inherited

Destroy a particle.

void agx::ParticleSystem::destroyParticles ( const Physics::ParticlePtrVector &  particles)
inherited

Destroy a list of particles.

void agx::ParticleSystem::destroyParticles ( const agxData::EntityPtrVector &  particles)
inherited
void agx::ParticleSystem::destroyParticles ( agxData::EntityRange  particles)
inherited

Destroy a range of particles.

virtual void agx::ParticleSystem::destroySingleParticle ( agx::Index  particleId)
virtualinherited

Destroy particle with specified id.

void agx::ParticleSystem::detach ( )
inherited

Unbinds relevant buffer pointers from objects after removing the particle system into the simulation.

void agx::ParticleSystem::evaluateParticleDefaultMass ( )
inherited

This should be called if the density of the bulk material is changed, so the particle default mass is updated accordingly.

String agx::Component::expandAutoCompletionMatch ( const String &  query,
const StringVector &  matchingNames 
) const
protectedinherited
agx::String agx::Object::fullName ( ) const
inherited
agx::String agx::Object::fullPath ( ) const
inherited
Returns
path:implementation
agx::String agx::Object::fullPath ( const agx::Object *  root) const
inherited
static agx::String agx::Object::generateName ( const agx::String &  bindPath)
staticinherited
void agxStream::Serializable::generateUuid ( )
protectedinherited
static const HashSet<Object *>& agx::Object::getActiveObjects ( )
staticinherited
agx::Object* agx::Object::getAutoScopedResource ( const agx::Path &  path,
agx::Model *  model = nullptr 
)
inherited
Returns
The resource with the first matching subpath starting from this node and traversing upwards to the root.

Referenced by agx::Object::getAutoScopedResource().

const agx::Object* agx::Object::getAutoScopedResource ( const agx::Path &  path,
agx::Model *  model = nullptr 
) const
inherited
template<typename T >
T * agx::Object::getAutoScopedResource ( const agx::Path &  path)
inherited

Definition at line 428 of file Object.h.

References agx::Object::getAutoScopedResource(), and agx::Referenced::is().

template<typename T >
const T * agx::Object::getAutoScopedResource ( const agx::Path &  path) const
inherited

Definition at line 435 of file Object.h.

virtual const char* agxStream::Serializable::getClassName ( ) const
virtualinherited
Returns
the class name of this class.

Reimplemented in agxWire::StopNode, agxWire::ConnectingNode, agxWire::EyeNode, agxWire::BodyFixedNode, agx::RigidBody, agx::Twist, agxWire::FreeNode, agx::ScrewController, agx::LockController, agxModel::WaterWrapper, agx::MergedBody, agx::MergedBody, agxModel::ConstantWindGenerator, agx::RangeController, agxModel::ConstantWaterFlowGenerator, agx::MergedBody, agx::ElectricMotorController, agx::MergedBody, agx::FrictionController, agx::MergedBody, agx::TargetSpeedController, agxModel::WindAndWaterController, agxSDK::Assembly, agx::QuatLock, agx::SphericalRel, agx::Spherical, agxWire::WireSimpleDrumController, agx::Dot2, agxModel::FractureAlgorithmBreakOnStress, agx::Swing, agxModel::FractureAlgorithmBreakOnContactForce, agx::Dot1, agxModel::FractureAlgorithmBreakOnContact, agx::Frame, agxPowerLine::detail::DimensionState3Dof< DimensionType >, agxUtil::ConstraintHolder, agxDriveTrain::PidControlledEngine, agxCable::CableDamage, agxControl::TeleportToSensorOperation, agxCollide::Geometry, agxDriveTrain::deprecated::Clutch, agxModel::Terrain, agxModel::TerrainDataInterface, agx::ObserverFrame, agxControl::StoreParticlesOperation, agxModel::SlidingNodeAttachment, agxDriveTrain::deprecated::GearBox, agxControl::EventSensor, agxPowerLine::Connection, agxModel::FractureGenerator, agxControl::LoadParticleAGXFileOperation, agxPowerLine::TranslationalConstraintImplementation, agxModel::RotatingNodeAttachment, agxModel::TwoBodyTire, agxPowerLine::detail::DimensionState1Dof< DimensionType >, agxModel::Deformable1DNodeRoute, agxPowerLine::ElementaryTranslationalConstraint, agxControl::SetVelocityOperation, agx::AddedMassInteraction, agxPowerLine::TranslationalActuator, agxDriveTrain::RpmController, agx::RigidBodyAttachment, agxVehicle::Track, agxModel::RigidNodeAttachment, agxControl::WriteParticleDataToAGXOperation, agxModel::TerrainIterativeProjectedConeFrictionModel, agxModel::Deformable1DSphereGeometryFactory, agxModel::DeformableParticleCreator, agxPowerLine::GearConstraintImplementation, agxControl::MakeParticleKinematicOperation, agxModel::ConvexSoil, agx::IterativeProjectedConeFriction, agxSDK::SimulationStatisticsListener, agxSDK::LinkedStructure, agx::ConstantNormalForceOrientedBoxFrictionModel, agxDriveTrain::deprecated::FixedGear, agxVehicle::TrackProperties, agxHydraulics::HydraulicPumpActuator, agxPowerLine::ElementaryGearConstraint, agxModel::Deformable1DPointRoute, agxModel::PointNodeAttachment, agx::PropertyContainer, agxModel::SoilParticle, agxSDK::MaterialManager::MaterialManagerSerializer, agxModel::Deformable1DCylinderGeometryFactory, agxDriveTrain::deprecated::HighLevelDifferential, agxPowerLine::TorqueGenerator, agxPowerLine::PowerLine, agx::ScaleBoxFrictionModel, agxHydraulics::PistonActuator, agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation, agx::SeparationAngle, agxWire::ConvexAreaDefinition, agxCollide::Trimesh, agxControl::LoadParticleJournalOperation, agxControl::ReplaceParticleMaterialOperation, agxWire::ShapeContactNode, agxModel::Deformable1DCapsuleGeometryFactory, agx::CubicSplineLookupTable, agxHydraulics::HydraulicMotorActuator, agxSDK::GeometryContactMergeSplitThresholds, agxDriveTrain::deprecated::TorqueConverterTable, agxDriveTrain::HolonomicGear, agxModel::Deformable1DNode, agx::BoxFrictionModel, agxPowerLine::RotationalConnector, agxWire::CircularAreaDefinition, agxPowerLine::ActuatorBodyUnit, agxPowerLine::RotationalActuator, agxModel::Deformable1DBulkProperties, agx::Attachment, agxModel::Deformable1D, agx::GranularImpactDataWriter, agxPowerLine::PowerTimeIntegralLookupTable, agx::WheelJoint, agx::OrientedIterativeProjectedConeFrictionModel, agxControl::ParticleContactDumper, agxDriveTrain::deprecated::TorqueConverter, agxCable::Route, agx::Hinge, agx::RotationalAngle, agx::CubicFunction2D, agxControl::RecordParticleShapshotJournalOperation, agxDriveTrain::deprecated::HighLevelGearBox, agxTerrain::TerrainRasterizer, agxVehicle::Wheel, agxControl::SensorOperation, agxHydraulics::FlowDimension, agxModel::HeightFieldDeformerJournalRecorder, agxModel::ParticleAttributes, agxDriveTrain::Engine, agxWire::EyeNodeArea, agxModel::SurfaceVelocityConveyorBelt, agxCable::PathRoute, agx::WorldFrameBallJoint, agx::OrientedScaleBoxFrictionModel, agxPowerLine::LinearLookupTable, agxCollide::Line, agxDriveTrain::Differential, agxVehicle::TrackRoute, agxCollide::RenderMaterial, agxControl::MeasurementSensor, agxModel::DeformableMineFace, agx::AutoSleepThreshold, agxCollide::CollisionGroupManager, agxControl::ColorParticles, agxHydraulics::NeedleValve, agxModel::DeformableParticleMesh, agxDriveTrain::ElectricMotor, agxDriveTrain::SlipGear, agxModel::OneBodyTire, agxPowerLine::ActuatorRotationalDimension, agxCable::SegmentingRoute, agx::LinearLookupTable, agx::MergeSplit, agxCollide::RenderData, agxControl::RecordParticleJournalOperation, agxPowerLine::RotationalTranslationalHolonomicConnector, agxUtil::RawMesh, agxPowerLine::RotationalDimension, agxModel::WindAndWaterController::WindGenerator, agx::Physics::GranularBodySystem, agx::Prismatic, agx::VirtualConstraintInertia, agx::OrientedBoxFrictionModel, agxModel::ThreeBodyTire, agxSDK::ConstraintMergeSplitThresholds, agx::RegularizationParameters, agxSDK::LinkedSegment, agxCollide::CollisionMeshData, agx::SphericalRelSlack, agx::SlackHingeJoint, agx::SlackLockJoint, agxDriveTrain::deprecated::HighLevelTorqueConverter, agxDriveTrain::GearBox, agxCollide::Plane, agxHydraulics::detail::GraphJoiningConnector, agxModel::Deformable1DBoxGeometryFactory, agx::CylindricalJoint, agxCable::CableDamageState, agxHydraulics::CheckValve, agxPowerLine::RotationalUnit, agx::BallJoint, agx::SlackPrismaticJoint, agx::Interaction, agx::DistanceJoint, agxPowerLine::SlotMapper, agxSDK::EventListener, agx::JournalCustomDataRecorder, agxControl::SensorEvent, agxSDK::StepEventListener, agxControl::TagOperation, agx::PrismaticUniversalJoint, agx::UniversalJoint, agxCollide::Convex, agx::SlackCylindricalJoint, agxCable::IdentityRoute, agxHydraulics::deprecated::PumpUnit, agxDriveTrain::Clutch, agxHydraulics::deprecated::MotorUnit, agxModel::HeightController, agxSDK::WireMergeSplitThresholds, agxModel::WindAndWaterController::WaterFlowGenerator, agxVehicle::TrackNode, agx::ContactTangent, agxDriveTrain::ElectricMotorConstraint, agx::LockJoint, agx::SwingTwistLock, agxCollide::WireShape, agxHydraulics::detail::SpoolValveConnector, agx::SleepThreshold, agxSDK::ConstraintMergeSplitAlgorithm, agxSDK::GeometryContactMergeSplitAlgorithm, agx::Dot2Slack, agxDriveTrain::Gear, agxPowerLine::RotationalTranslationalConnector, agxPowerLine::WireWinchActuator, agxSDK::WireMergeSplitAlgorithm, agxHydraulics::Accumulator, agxHydraulics::detail::GraphJoiningConstraintImplementation, agxModel::HeightFieldDeformer, agxDriveTrain::EnginePowerGenerator, agx::AngularLockJoint, agx::PointGravityField, agx::SplineJoint, agxControl::BaseRecordParticleJournalOperation, agx::Dot1Joint, agxPowerLine::detail::RigidBodyRotationalAttachmentSentry, agxControl::RemoveParticles, agxSDK::LinkedStructureComponent, agxDriveTrain::DifferentialLockConnector, agxDriveTrain::Shaft, agx::UniformGravityField, agxLua::LuaScriptOperation, agx::ParticleContactSensor, agxCollide::MeshData, agxDriveTrain::deprecated::TorqueConverterSpeedRatioLookup, agxSDK::Collection, agx::ContactNormal, agxHydraulics::detail::ElementaryGraphJoiningConstraint, agxPowerLine::detail::WireWinchConnectorConstraintImplementation, agx::MergeSplitBodyStorage, agx::StrongInteractionConstraint, agxSDK::EnergyManager, agx::PlaneJoint, agx::ParticleSink, agx::Dot1Slack, agxDriveTrain::ElectricMotorConstraintImplementation, agxSDK::GranularContactMergeSplitAlgorithm, agxControl::SplitSensorOperation, agxDriveTrain::EngineDampingUpdater, agxControl::RemoveRigidBody, agxPowerLine::detail::WireWinchConnector, agxPowerLine::detail::ElementaryWireWinchConnectorConstraint, agxPowerLine::detail::RigidBodyTranslationalAttachmentSentry, agxSDK::MergedBodyMergeSplitAlgorithm, agxCable::RoutingNode, agxCable::CablePlasticity, agxHydraulics::detail::SpoolValveStaticFlowUnit, agxModel::PlasticityComponent, and agxCable::GeometryFactory.

Referenced by agxStream::InputArchive::readRef().

agx::Physics::CollisionGroupSetPtr agx::ParticleSystem::getCollisionGroupSet ( ) const
inlineinherited
Returns
a GroupSet with all the group id:s for the particle system

Definition at line 749 of file ParticleSystem.h.

T * agx::Object::getContext ( )
inherited
Returns
The parent node in the system tree.

Definition at line 373 of file Object.h.

Referenced by agxData::Value::get(), and agx::Model::getNamespace().

const T * agx::Object::getContext ( ) const
inherited

Definition at line 374 of file Object.h.

template<typename T >
T* agx::Object::getContext ( )
inherited
template<typename T >
const T* agx::Object::getContext ( ) const
inherited
agx::Int agx::ParticleSystem::getCustomBufferValueInt ( agx::Index  id,
const agx::String &  buffername 
)
inherited

Returns a custom Int buffer value from a particle.

Parameters
idId of the particle
buffernameThe name of the custom Int attribute buffer
Returns
The custom Int value of the particle.

Definition at line 759 of file ParticleSystem.h.

agx::Real agx::ParticleSystem::getCustomBufferValueReal ( agx::Index  id,
const agx::String &  buffername 
)
inherited

Returns a custom Real buffer value from a particle.

Parameters
idId of the particle
buffernameThe name of the custom Real attribute buffer
Returns
The custom Real value of the particle.

Definition at line 754 of file ParticleSystem.h.

agx::Real32 agx::ParticleSystem::getCustomBufferValueReal32 ( agx::Index  id,
const agx::String &  buffername 
)
inherited

Returns a custom Real32 buffer value from a particle.

Parameters
idId of the particle
buffernameThe name of the custom Real32 attribute buffer
Returns
The custom Real value of the particle.

Definition at line 764 of file ParticleSystem.h.

agx::Vec3 agx::ParticleSystem::getCustomBufferValueVec3 ( agx::Index  id,
const agx::String &  buffername 
)
inherited

Returns a custom Vec3 buffer value from a particle.

Parameters
idId of the particle
buffernameThe name of the custom Vec3 attribute buffer
Returns
The custom Vec3 value of the particle.

Definition at line 769 of file ParticleSystem.h.

static DeleteHandler* agx::Referenced::getDeleteHandler ( )
staticprotectedinherited
Returns
a DeleteHandler.
T * agx::Component::getDevice ( )
inherited
Returns
The device which the component stored on.

Definition at line 222 of file Component.h.

Referenced by agx::Component::getDevice().

const T * agx::Component::getDevice ( ) const
inherited

Definition at line 223 of file Component.h.

References agx::Component::getDevice().

template<typename T >
T* agx::Component::getDevice ( )
inherited
template<typename T >
const T* agx::Component::getDevice ( ) const
inherited
const agxCollide::GeometryHashVector & agx::ParticleSystem::getDisabledCollisions ( ) const
inherited
Returns
The set of disabled geometry collisions.

Definition at line 747 of file ParticleSystem.h.

bool agx::ParticleSystem::getEnableCollisions ( const agxCollide::Geometry *  geometry) const
inherited
Returns
true if this geometry is allowed to collide with geometry.
static bool agx::Object::getEnableRebind ( )
staticinherited

Should rebinding be allowed? Right now a global setting.

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

Definition at line 273 of file Serializable.h.

bool agxStream::Serializable::getEnableUuidGeneration ( )
inherited
Returns
true if Uuid:s should be generated for each new Serializable object
agxData::EntityStorage * agx::ParticleSystem::getGeometryParticleContactListStorage ( )
inherited
Returns
The storage for Geometry-Particle contact lists.

Definition at line 744 of file ParticleSystem.h.

UInt32 agx::Object::getId ( ) const
inherited
Returns
The global object id.

Definition at line 370 of file Object.h.

Referenced by agxData::EntityStorage::indexToId().

const agx::Name& agx::Object::getImplementationName ( ) const
inherited
Returns
The implementation name of the model. Alias for getModel()->getImplementationName()
agx::UInt32 agxStream::Serializable::getIndex ( ) const
inherited

This index is given at creation of this object.

It is guaranteed to be unique for the lifetime of this library instance. As long as the application is running. This value is not serialized or restored. A new object will always get a new index no matter how it is created.

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

Definition at line 247 of file Serializable.h.

Material* agx::ParticleSystem::getMaterial ( )
inherited
Returns
The default particle material of created particles.
const Material* agx::ParticleSystem::getMaterial ( ) const
inherited
Model * agx::Object::getModel ( )
inherited
Returns
The object model.

Definition at line 371 of file Object.h.

const Model * agx::Object::getModel ( ) const
inherited

Definition at line 372 of file Object.h.

const Name & agx::Object::getName ( ) const
inherited
Returns
Then name of the object.

Definition at line 369 of file Object.h.

Referenced by agxData::Value::get(), agxData::EntityStorage::get(), agxData::FormatBinding< T >::getFormat(), and agxData::EntityPtr::operator()().

agx::Object* agx::Object::getNextSibling ( )
inherited
Returns
The next sibling with identical name.
const agx::Object* agx::Object::getNextSibling ( ) const
inherited
size_t agx::Component::getNumObjects ( const agx::Name &  name) const
inherited
Returns
The number of child objects with a specified name.
size_t agx::ParticleSystem::getNumParticles ( ) const
inherited
Returns
The current number of particles in the system.
T * agx::Component::getObject ( const agx::Name &  name,
size_t  index = 0 
)
inherited
Returns
The child object with specified name (and optional index).

Definition at line 194 of file Component.h.

Referenced by agxData::EntityPtr::operator()().

const T * agx::Component::getObject ( const agx::Name &  name,
size_t  index = 0 
) const
inherited

Definition at line 195 of file Component.h.

Object * agx::Component::getObject ( const agx::Name &  name,
agx::Model *  model,
size_t  index = 0 
)
inherited

Definition at line 197 of file Component.h.

const Object * agx::Component::getObject ( const agx::Name &  name,
agx::Model *  model,
size_t  index = 0 
) const
inherited

Definition at line 198 of file Component.h.

template<typename T >
T* agx::Component::getObject ( const agx::Name &  name,
size_t  index = 0 
)
inherited
template<typename T >
const T* agx::Component::getObject ( const agx::Name &  name,
size_t  index = 0 
) const
inherited
const ObjectRefVector & agx::Component::getObjects ( ) const
inherited
Returns
All child objects.

Definition at line 192 of file Component.h.

Referenced by agx::Component::getObjects().

template<typename T >
void agx::Component::getObjects ( agx::ObjectPtrVector &  result,
bool  recursive = false 
) const
inherited
Returns
All child objects of a specified type.
void agx::Component::getObjects ( agx::ObjectPtrVector &  result,
const agx::Model *  model,
bool  recursive = false 
) const
inherited
template<typename T >
void agx::Component::getObjects ( ObjectPtrVector &  result,
bool  recursive 
) const
inherited

Definition at line 241 of file Component.h.

References agx::Component::getObjects().

Physics::ParticlePtr agx::ParticleSystem::getParticle ( agx::Index  particleId)
inherited

Returns a particle from the particle system given a particle id.

const agx::Bound3& agx::ParticleSystem::getParticleBound ( )
inherited
agx::Vector<agx::Physics::ParticleGeometryContactPtr> agx::ParticleSystem::getParticleGeometryContacts ( )
inherited

Returns the current ParticleGeometryContacts in the simulation.

agxData::EntityStorage * agx::ParticleSystem::getParticleGeometryContactStorage ( )
inherited
Returns
The storage for Particle-Geometry contacts.

Definition at line 743 of file ParticleSystem.h.

agx::Index agx::ParticleSystem::getParticleIdFromIndex ( agx::Index  index) const
inherited

Return the particle id for the specified particle entity array index.

Parameters
index- specified entity array index.
Returns
the particle id given a specified entity array index. Will return InvalidIndex if index is outside array range.
Real agx::ParticleSystem::getParticleMass ( ) const
inherited
Returns
The default particle mass. By default, the mass is derived from the assigned default agx::Material of the system.
agxData::EntityStorage * agx::ParticleSystem::getParticlePairContactStorage ( )
inherited
Returns
The storage for the particle pair contacts.

Definition at line 745 of file ParticleSystem.h.

agx::Vector<agx::Physics::ParticlePairContactPtr> agx::ParticleSystem::getParticleParticleContacts ( )
inherited

Returns the current ParticleParticle contacts in the simulation.

Real agx::ParticleSystem::getParticleRadius ( ) const
inherited
Returns
The default particle radius of created particles.
const agx::Physics::ParticlePtrArray agx::ParticleSystem::getParticles ( ) const
inherited
Returns
All active particles in the particle system (only valid until storage is modified, e.g. by deleting a particle).

Definition at line 731 of file ParticleSystem.h.

agx::Physics::ParticlePtrArray agx::ParticleSystem::getParticles ( )
inherited

Definition at line 736 of file ParticleSystem.h.

agxData::EntityStorage * agx::ParticleSystem::getParticleStorage ( )
inherited
Returns
The storage where the particle data is stored.

Definition at line 741 of file ParticleSystem.h.

Referenced by agx::Physics::GranularBodySystem::getParticles().

const agxData::EntityStorage * agx::ParticleSystem::getParticleStorage ( ) const
inherited
Returns
The storage where the particle data is stored.

Definition at line 742 of file ParticleSystem.h.

agx::Path agx::Object::getPath ( const agx::Object *  root) const
inherited
Returns
A relative path from a specified root
Parameters
rootA node along the parent path from this object.
int agx::Referenced::getReferenceCount ( ) const
inherited
Returns
the number pointers currently referencing this object.
agx::Object* agx::Object::getResource ( const agx::Path &  path,
agx::Model *  model = nullptr 
)
inherited
Returns
A resource in the subtree below this object.

Referenced by agx::Object::getResource().

const agx::Object* agx::Object::getResource ( const agx::Path &  path,
agx::Model *  model = nullptr 
) const
inherited
template<typename T >
T * agx::Object::getResource ( const agx::Path &  path)
inherited

Definition at line 414 of file Object.h.

References agx::Object::getResource(), and agx::Referenced::is().

template<typename T >
const T * agx::Object::getResource ( const agx::Path &  path) const
inherited

Definition at line 421 of file Object.h.

virtual Object* agx::Component::getResourceImpl ( const Path &  path,
agx::Model *  model 
)
overridevirtualinherited

Reimplemented from agx::Object.

Reimplemented in agx::Task, and agxData::EntityStorage.

agx::Object* agx::Object::getRootContext ( )
inherited
Returns
The root context.
const agx::Object* agx::Object::getRootContext ( ) const
inherited
virtual agx::Vec4f agx::ParticleSystem::getSingleParticleColor ( agx::Index  particleId)
virtualinherited

Get particle color with specified id.

virtual agx::Vec3 agx::ParticleSystem::getSingleParticleForce ( agx::Index  particleId)
virtualinherited

Get particle velocity with specified id.

virtual agx::Real agx::ParticleSystem::getSingleParticleMass ( agx::Index  particleId)
virtualinherited

Get particle radius with specified id.

virtual agx::Vec3 agx::ParticleSystem::getSingleParticlePosition ( agx::Index  particleId)
virtualinherited

Get particle position with specified id.

virtual agx::Real agx::ParticleSystem::getSingleParticleRadius ( agx::Index  particleId)
virtualinherited

Get particle radius with specified id.

virtual agx::Vec3 agx::ParticleSystem::getSingleParticleVelocity ( agx::Index  particleId)
virtualinherited

Get particle velocity with specified id.

virtual StorageAgent* agxStream::Serializable::getStorageAgent ( ) const
pure virtualinherited
Returns
the storage agent

Implemented in agxWire::StopNode, agxWire::ConnectingNode, agxWire::EyeNode, agxWire::BodyFixedNode, agx::RigidBody, agx::Twist, agxWire::FreeNode, agx::ScrewController, agx::LockController, agxModel::WaterWrapper, agx::MergedBody, agx::MergedBody, agxModel::ConstantWindGenerator, agx::RangeController, agxModel::ConstantWaterFlowGenerator, agx::MergedBody, agx::ElectricMotorController, agx::MergedBody, agx::FrictionController, agx::MergedBody, agx::TargetSpeedController, agxModel::WindAndWaterController, agxSDK::Assembly, agx::QuatLock, agx::SphericalRel, agx::Spherical, agxWire::WireSimpleDrumController, agx::Dot2, agxModel::FractureAlgorithmBreakOnStress, agx::Swing, agxModel::FractureAlgorithmBreakOnContactForce, agx::Dot1, agxModel::FractureAlgorithmBreakOnContact, agx::Frame, agxPowerLine::detail::DimensionState3Dof< DimensionType >, agxUtil::ConstraintHolder, agxDriveTrain::PidControlledEngine, agxCable::CableDamage, agxControl::TeleportToSensorOperation, agxCollide::Geometry, agxDriveTrain::deprecated::Clutch, agxModel::Terrain, agxModel::TerrainDataInterface, agx::ObserverFrame, agxControl::StoreParticlesOperation, agxModel::SlidingNodeAttachment, agxDriveTrain::deprecated::GearBox, agxControl::EventSensor, agxPowerLine::Connection, agxModel::FractureGenerator, agxControl::LoadParticleAGXFileOperation, agxPowerLine::TranslationalConstraintImplementation, agxModel::RotatingNodeAttachment, agxModel::TwoBodyTire, agxModel::Deformable1DNodeRoute, agxPowerLine::detail::DimensionState1Dof< DimensionType >, agxPowerLine::ElementaryTranslationalConstraint, agxControl::SetVelocityOperation, agx::AddedMassInteraction, agxPowerLine::TranslationalActuator, agxDriveTrain::RpmController, agx::RigidBodyAttachment, agxVehicle::Track, agxModel::RigidNodeAttachment, agxControl::WriteParticleDataToAGXOperation, agxModel::TerrainIterativeProjectedConeFrictionModel, agxModel::Deformable1DSphereGeometryFactory, agxModel::DeformableParticleCreator, agxPowerLine::GearConstraintImplementation, agxControl::MakeParticleKinematicOperation, agxModel::ConvexSoil, agx::IterativeProjectedConeFriction, agxSDK::SimulationStatisticsListener, agxSDK::LinkedStructure, agx::ConstantNormalForceOrientedBoxFrictionModel, agxDriveTrain::deprecated::FixedGear, agxVehicle::TrackProperties, agxHydraulics::HydraulicPumpActuator, agxPowerLine::ElementaryGearConstraint, agxModel::Deformable1DPointRoute, agxModel::PointNodeAttachment, agx::PropertyContainer, agxModel::SoilParticle, agxSDK::MaterialManager::MaterialManagerSerializer, agxModel::Deformable1DCylinderGeometryFactory, agxDriveTrain::deprecated::HighLevelDifferential, agxPowerLine::TorqueGenerator, agxPowerLine::PowerLine, agx::ScaleBoxFrictionModel, agxHydraulics::PistonActuator, agxPowerLine::PhysicalDimensionMultiBodyConstraintImplementation, agx::SeparationAngle, agxWire::ConvexAreaDefinition, agxCollide::Trimesh, agxControl::LoadParticleJournalOperation, agxControl::ReplaceParticleMaterialOperation, agxWire::ShapeContactNode, agxModel::Deformable1DCapsuleGeometryFactory, agx::CubicSplineLookupTable, agxHydraulics::HydraulicMotorActuator, agxSDK::GeometryContactMergeSplitThresholds, agxDriveTrain::deprecated::TorqueConverterTable, agxDriveTrain::HolonomicGear, agxModel::Deformable1DNode, agx::BoxFrictionModel, agxPowerLine::RotationalConnector, agxWire::CircularAreaDefinition, agxPowerLine::ActuatorBodyUnit, agxPowerLine::RotationalActuator, agxModel::Deformable1DBulkProperties, agx::Attachment, agxModel::Deformable1D, agx::GranularImpactDataWriter, agxPowerLine::PowerTimeIntegralLookupTable, agx::WheelJoint, agx::OrientedIterativeProjectedConeFrictionModel, agxControl::ParticleContactDumper, agxDriveTrain::deprecated::TorqueConverter, agxCable::Route, agx::Hinge, agx::RotationalAngle, agx::CubicFunction2D, agxControl::RecordParticleShapshotJournalOperation, agxDriveTrain::deprecated::HighLevelGearBox, agxTerrain::TerrainRasterizer, agxVehicle::Wheel, agxControl::SensorOperation, agxHydraulics::FlowDimension, agxModel::HeightFieldDeformerJournalRecorder, agxModel::ParticleAttributes, agxDriveTrain::Engine, agxWire::EyeNodeArea, agxModel::SurfaceVelocityConveyorBelt, agxCable::PathRoute, agx::WorldFrameBallJoint, agx::OrientedScaleBoxFrictionModel, agxPowerLine::LinearLookupTable, agxCollide::Line, agxDriveTrain::Differential, agxVehicle::TrackRoute, agxCollide::RenderMaterial, agxControl::MeasurementSensor, agxModel::DeformableMineFace, agx::AutoSleepThreshold, agxCollide::CollisionGroupManager, agxControl::ColorParticles, agxHydraulics::NeedleValve, agxModel::DeformableParticleMesh, agxDriveTrain::ElectricMotor, agxDriveTrain::SlipGear, agxModel::OneBodyTire, agxPowerLine::ActuatorRotationalDimension, agxCable::SegmentingRoute, agx::LinearLookupTable, agx::MergeSplit, agxCollide::RenderData, agxControl::RecordParticleJournalOperation, agxPowerLine::RotationalTranslationalHolonomicConnector, agxUtil::RawMesh, agxPowerLine::RotationalDimension, agxModel::WindAndWaterController::WindGenerator, agx::Physics::GranularBodySystem, agx::Prismatic, agx::VirtualConstraintInertia, agx::OrientedBoxFrictionModel, agxModel::ThreeBodyTire, agxSDK::ConstraintMergeSplitThresholds, agx::RegularizationParameters, agxSDK::LinkedSegment, agxCollide::CollisionMeshData, agx::SphericalRelSlack, agx::SlackHingeJoint, agx::SlackLockJoint, agxDriveTrain::deprecated::HighLevelTorqueConverter, agxDriveTrain::GearBox, agxCollide::Plane, agxHydraulics::detail::GraphJoiningConnector, agxModel::Deformable1DBoxGeometryFactory, agx::CylindricalJoint, agxCable::CableDamageState, agxHydraulics::CheckValve, agxPowerLine::RotationalUnit, agx::BallJoint, agx::SlackPrismaticJoint, agx::Interaction, agx::DistanceJoint, agxPowerLine::SlotMapper, agxSDK::EventListener, agx::JournalCustomDataRecorder, agxControl::SensorEvent, agxSDK::StepEventListener, agxControl::TagOperation, agx::PrismaticUniversalJoint, agx::UniversalJoint, agxCollide::Convex, agx::SlackCylindricalJoint, agxCable::IdentityRoute, agxHydraulics::deprecated::PumpUnit, agxDriveTrain::Clutch, agxHydraulics::deprecated::MotorUnit, agxModel::HeightController, agxSDK::WireMergeSplitThresholds, agxModel::WindAndWaterController::WaterFlowGenerator, agxVehicle::TrackNode, agx::ContactTangent, agxDriveTrain::ElectricMotorConstraint, agx::LockJoint, agx::SwingTwistLock, agxCollide::WireShape, agxHydraulics::detail::SpoolValveConnector, agx::SleepThreshold, agxSDK::ConstraintMergeSplitAlgorithm, agxSDK::GeometryContactMergeSplitAlgorithm, agx::Dot2Slack, agxDriveTrain::Gear, agxPowerLine::RotationalTranslationalConnector, agxPowerLine::WireWinchActuator, agxSDK::WireMergeSplitAlgorithm, agxHydraulics::Accumulator, agxHydraulics::detail::GraphJoiningConstraintImplementation, agxModel::HeightFieldDeformer, agxDriveTrain::EnginePowerGenerator, agx::AngularLockJoint, agx::PointGravityField, agx::SplineJoint, agxControl::BaseRecordParticleJournalOperation, agx::Dot1Joint, agxControl::RemoveParticles, agxSDK::LinkedStructureComponent, agxDriveTrain::DifferentialLockConnector, agxDriveTrain::Shaft, agxPowerLine::detail::RigidBodyRotationalAttachmentSentry, agx::UniformGravityField, agxLua::LuaScriptOperation, agx::ParticleContactSensor, agxCollide::MeshData, agxDriveTrain::deprecated::TorqueConverterSpeedRatioLookup, agxSDK::Collection, agx::ContactNormal, agxHydraulics::detail::ElementaryGraphJoiningConstraint, agxPowerLine::detail::WireWinchConnectorConstraintImplementation, agx::MergeSplitBodyStorage, agx::StrongInteractionConstraint, agxSDK::EnergyManager, agx::PlaneJoint, agx::ParticleSink, agx::Dot1Slack, agxDriveTrain::ElectricMotorConstraintImplementation, agxSDK::GranularContactMergeSplitAlgorithm, agxControl::SplitSensorOperation, agxDriveTrain::EngineDampingUpdater, agxControl::RemoveRigidBody, agxPowerLine::detail::WireWinchConnector, agxPowerLine::detail::ElementaryWireWinchConnectorConstraint, agxSDK::MergedBodyMergeSplitAlgorithm, agxCable::RoutingNode, agxCable::CablePlasticity, agxHydraulics::detail::SpoolValveStaticFlowUnit, agxPowerLine::detail::RigidBodyTranslationalAttachmentSentry, agxModel::PlasticityComponent, and agxCable::GeometryFactory.

agx::Real agx::ParticleSystem::getTotalParticleGeometryContactForces ( )
inherited
agx::Real agx::ParticleSystem::getTotalParticleParticleContactForces ( )
inherited
Task * agx::ParticleSystem::getUpdateTask ( )
inherited
Returns
The current update task.

Definition at line 729 of file ParticleSystem.h.

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

Definition at line 268 of file Serializable.h.

bool agx::ParticleSystem::hasCollisionGroup ( agx::UInt32  id) const
inherited

This is performing a linear search among the group id for this particle.

Parameters
id- The group id we are looking for.
Returns
true if the Geometry is part of the group id
bool agx::ParticleSystem::hasCollisionGroup ( const agx::Name &  id) const
inherited
bool agx::ParticleSystem::hasCollisionGroupParticle ( agx::UInt32  id,
agx::Physics::ParticlePtr  ptr 
) const
inherited

This is performing a linear search among the group id for this particle.

Parameters
id- The group id we are looking for.
Returns
true if the Geometry is part of the group id
bool agx::ParticleSystem::hasCollisionGroupParticle ( const agx::Name &  id,
agx::Physics::ParticlePtr  ptr 
) const
inherited
bool agx::ParticleSystem::hasCustomBuffer ( const agx::String &  buffername,
const agx::String &  formatName 
)
inherited

Returns true if the particle system has a buffer with the specified name and format.

bool agx::Object::hasListener ( EventListener *  listener)
inherited
bool agx::Object::hasParent ( const agx::Object *  node) const
inherited
Returns
True if the specified node is located somewhere in the path above the object.
void agx::ParticleSystem::init ( bool  createMaterial = true)
protectedinherited
void agx::ParticleSystem::invalidLicenseCallback ( )
protectedinherited
template<typename T >
bool agx::Referenced::is ( ) const
inherited
bool agxStream::Serializable::isFinished ( ) const
inherited
Returns
true if this class is restored correctly and should not be deleted during destruction of an Archive.

Definition at line 252 of file Serializable.h.

bool agx::ParticleSystem::isParticleGeometryContactValid ( Physics::ParticleGeometryContactPtr  contact)
inherited
Returns
true if particle geometry contact is valid
bool agx::ParticleSystem::isParticlePairContactValid ( Physics::ParticlePairContactPtr  contact)
inherited
Returns
true if particle-particle contact is valid
bool agx::Object::isUnique ( ) const
inherited

Definition at line 375 of file Object.h.

bool agx::ParticleSystem::isValid ( Physics::ParticlePtr  particle) const
inherited
Returns
true if particle is not destroyed or marked to be removed
static Component* agx::Component::load ( const String &  path,
const Path &  _namespace = Path() 
)
staticinherited
static Component* agx::Component::load ( const String &  path,
Device *  device,
const Path &  _namespace = Path() 
)
staticinherited
static Component* agx::Component::load ( const Path &  path,
const Name &  implementation,
Device *  device,
const Path &  _namespace = Path() 
)
staticinherited
static Component* agx::Component::load ( TiXmlElement *  eComponent,
Device *  device 
)
staticinherited
T * agx::Object::load ( const String &  path,
Device *  device,
const String &  type = "",
size_t  instance = 0 
)
staticinherited

Definition at line 379 of file Object.h.

References agx::Object::load().

T * agx::Object::load ( const String &  path,
Device *  device,
const String &  type,
const String &  attribute,
const String &  value 
)
staticinherited

Definition at line 386 of file Object.h.

References agx::Object::load().

static void agx::Object::load ( const String &  path,
Device *  device,
ObjectPtrVector &  loadedObjects 
)
staticinherited
static TiXmlDocument agx::Object::openDocument ( const String &  path)
staticinherited
bool agx::ParticleSystem::particleExistsWithId ( agx::Index  id)
inherited

Check if there is a particle with a specified id.

virtual void agx::Component::printSubtree ( ) const
overridevirtualinherited

Reimplemented from agx::Object.

void agx::Component::printSubtree ( std::ostream &  stream,
int  depth = 0 
) const
inherited
virtual void agx::Component::rebind ( )
overridevirtualinherited

Reimplemented from agx::Object.

Reimplemented in agx::Task, and agx::Clock.

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

Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it.

This method should be used with care, always balanced with the same number of calls to unreference.

Referenced by agxData::Val< UInt >::Val().

void agx::Component::removeAllObjects ( )
inherited

Remove all components.

void agx::ParticleSystem::removeCollisionGroup ( agx::UInt32  id,
bool  updateExistingParticles = true 
)
inherited

Remove a group id from the vector of group ids.

Parameters
id- The group id to be removed
void agx::ParticleSystem::removeCollisionGroup ( const agx::Name &  id,
bool  updateExistingParticles = true 
)
inherited
void agx::ParticleSystem::removeCollisionGroupParticle ( agx::UInt32  id,
agx::Physics::ParticlePtr  ptr 
)
inherited

Remove a group id from the vector of group ids.

Parameters
id- The group id to be removed
void agx::ParticleSystem::removeCollisionGroupParticle ( const agx::Name &  id,
agx::Physics::ParticlePtr  ptr 
)
inherited
void agx::Object::removeListener ( EventListener *  listener)
inherited
virtual void agx::Component::removeObject ( agx::Object *  object)
virtualinherited

Remove an object from the component.

void agx::Component::removeObject ( const agx::Name &  name,
size_t  index = 0 
)
inherited

Remove an object with a specified name (and optional index) from the component.

void agx::ParticleSystem::removeParticle ( Physics::ParticlePtr  particle)
inherited

Tag a particle for removal at the end of the time step.

Parameters
particle- the specified particlePtr to mark for removal.
Note
- This is a more preferable way to remove particles than destroyParticle since it will not change the internal particle data structure during the time step
virtual void agx::Object::save ( TiXmlElement *  ) const
inlinevirtualinherited

Reimplemented in agx::Clock.

Definition at line 105 of file Object.h.

void agx::ParticleSystem::setCollisionGroupSet ( agx::Physics::CollisionGroupSetPtr  )
protectedinherited
virtual void agx::Object::setContext ( agx::Object *  context)
virtualinherited

Reimplemented in agx::Task, and agxData::FunctionValue.

void agx::ParticleSystem::setCustomBufferValueInt ( agx::Index  id,
const agx::String &  buffername,
agx::Int  val 
)
inherited

Sets a custom Int buffer value to a particle.

Parameters
idId of the particle
buffernameThe name of the custom Int attribute buffer
valThe Int value to be set on the particle

Definition at line 758 of file ParticleSystem.h.

void agx::ParticleSystem::setCustomBufferValueReal ( agx::Index  id,
const agx::String &  buffername,
agx::Real  val 
)
inherited

Sets a custom Real buffer value to a particle.

Parameters
idId of the particle
buffernameThe name of the custom Real attribute buffer
valThe Real value to be set on the particle

Definition at line 753 of file ParticleSystem.h.

void agx::ParticleSystem::setCustomBufferValueReal32 ( agx::Index  id,
const agx::String &  buffername,
agx::Real32  val 
)
inherited

Sets a custom Real32 buffer value to a particle.

Parameters
idId of the particle
buffernameThe name of the custom Real attribute buffer
valThe Real32 value to be set on the particle

Definition at line 763 of file ParticleSystem.h.

void agx::ParticleSystem::setCustomBufferValueVec3 ( agx::Index  id,
const agx::String &  buffername,
agx::Vec3  val 
)
inherited

Sets a custom Vec3 buffer value to a particle.

Parameters
idId of the particle
buffernameThe name of the custom Vec3 attribute buffer
valThe Vec3 value to be set on the particle

Definition at line 768 of file ParticleSystem.h.

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

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

void agx::Component::setDevice ( Device *  device)
protectedinherited
void agx::ParticleSystem::setEnableCollisions ( const agxCollide::Geometry *  geometry,
bool  flag 
)
inherited

Specify whether otherGeometry is allowed to collide with this geometry.

static void agx::Object::setEnableRebind ( bool  flag)
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.

void agxStream::Serializable::setEnableSerialization ( bool  flag)
inherited

Set to false to disable serialization of this object.

It will just be ignored during serialization (writing). It is still possible to restore TO this object.

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

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

void agxStream::Serializable::setFinished ( )
inherited

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

void agx::Object::setId ( UInt32  id)
inherited
void agx::ParticleSystem::setMaterial ( Material *  material,
bool  updateExistingParticles = false 
)
inherited

Set the default particle material.

The default particle mass is derived from the density of the default material.

Note
- When updating the material of existing particles, their mass properties will be updated according to the radius of each individual particle. This will override any manual mass value that has been set to the particles.
Parameters
material- the specific material to set as the default particle material.
updateExistingParticles- true if existing particles should be updated, false otherwise. ( Default: false )
void agx::Object::setModel ( agx::Model *  model)
inherited

Set the object model (handled automatically).

void agx::Object::setName ( const agx::Name &  name)
inherited

Set the name of the object.

virtual void agx::ParticleSystem::setParticleMass ( Real  mass,
bool  updateExistingParticles = false 
)
virtualinherited

Set particle mass.

Note that the default particle mass is normally derived from the default material of the particle system when particles are created. This function is used to set the default value of the mass buffer and also to manually set the mass on all particles.

Note
- Setting a material on either the particle system or an individual particle will override this mass value.
Parameters
mass- the specified mass to set as default and to all particles if that option is used.
updateExistingParticles- true if the mass of all existing particles should be updated, false otherwise. ( Default: false )

Reimplemented in agx::Physics::GranularBodySystem.

void agx::ParticleSystem::setParticleRadius ( Real  radius,
bool  updateExistingParticles = false 
)
inherited

Set the default particle radius of created particles, with option of updating existing particles.

Note
- When updating the radius of existing particles, their mass properties will be updated according to the density of each individual particle material. This will override any manual mass value that has been set to the particles.
Parameters
radius- the specified default radius to set to the particle system.
updateExistingParticles- true if the existing particles should be updated, false otherwise. ( Default: false )
void agx::ParticleSystem::setRadiusOnParticles ( agxData::EntityRange &  entityRange,
agx::Real  radius 
)
protectedinherited
virtual void agx::ParticleSystem::setSingleParticleColor ( agx::Index  particleId,
const agx::Vec4f &  color 
)
virtualinherited

Set particle color with specified id.

virtual void agx::ParticleSystem::setSingleParticleForce ( agx::Index  particleId,
const agx::Vec3 &  force 
)
virtualinherited

Set particle force with specified id.

virtual void agx::ParticleSystem::setSingleParticleMass ( agx::Index  particleId,
agx::Real  mass 
)
virtualinherited

Set particle radius with specified id.

virtual void agx::ParticleSystem::setSingleParticleRadius ( agx::Index  particleId,
agx::Real  radius 
)
virtualinherited

Set particle radius with specified id.

Reimplemented in agx::Physics::GranularBodySystem.

virtual void agx::ParticleSystem::setSingleParticleVelocity ( agx::Index  particleId,
const agx::Vec3 &  velocity 
)
virtualinherited

Set particle velocity with specified id.

void agx::ParticleSystem::setSpace ( agxCollide::Space *  space)
inherited
virtual bool agx::ParticleSystem::setUpdateTask ( Task *  updateTask)
virtualinherited

Set the task that will be executed whenever it is time to step the simulation.

Reimplemented in agx::Physics::GranularBodySystem.

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

Explicitly set a Uuid on a serializable object.

Use this method with great care, as it can result in non-unique identifiers in the system!

virtual void agx::Component::snapshot ( TiXmlNode *  eParent,
const String &  directory 
) const
overridevirtualinherited

Reimplemented from agx::Object.

agxData::EntityRange agx::ParticleSystem::spawnParticles ( const agx::Vec3Vector &  positions)
inherited

Spawn particles with defined positions.

agx::Physics::ParticlePtrVector agx::ParticleSystem::spawnParticlesInBound ( const agx::Bound3 &  bound,
Real  radius,
const agx::Vec3 &  spacing,
agx::Real  jitterFactor = agx::Real(0) 
)
inherited

Spawns particles in a specified bound.

Parameters
boundthe specified bound to spawn in
spacingspacing between the particle center points that are spawned
jitterFactorthe factor of the distance that is used to randomize particle positions
Returns
A vector containing the created particles.
agx::Physics::ParticlePtrVector agx::ParticleSystem::spawnParticlesInBound ( const agx::Bound3 &  bound,
agx::Emitter::DistributionTable *  sourceTable,
const agx::Vec3 &  spacing,
agx::Real  jitterFactor = agx::Real(0) 
)
inherited

Spawns particles In a specified bound from a distribution table.

Parameters
boundThe specified bound to spawn in
sourceTableThe particle model distribution table used to spawn particles
spacingspacing between the particle center points that are spawned
jitterFactorThe factor of the distance that is used to randomize particle positions
Returns
A vector containing the created particles.
agx::Physics::ParticlePtrVector agx::ParticleSystem::spawnParticlesInBoundHCP ( const agx::Bound3 &  bound,
Real  radius,
const agx::Vec3 &  spacing,
agx::Real  jitterFactor = agx::Real(0) 
)
inherited

Spawns particles In a specified bound using a Hexagonal-Close-Packing (HCP) lattice.

Parameters
boundThe specified bound to spawn in
radiusThe radius for the new particles
spacingSpacing between the particle center points that are spawned
jitterFactorThe factor of the distance that is used to randomize particle positions
Returns
A vector containing the created particles.
agx::Physics::ParticlePtrVector agx::ParticleSystem::spawnParticlesInBoundHCP ( const agx::Bound3 &  bound,
agx::Emitter::DistributionTable *  sourceTable,
const agx::Vec3 &  spacing,
agx::Real  jitterFactor = agx::Real(0) 
)
inherited

Spawns particles in a specified bound from a distribution table using a Hexagonal-Close-Packing (HCP) lattice.

Parameters
boundThe specified bound to spawn in
sourceTableThe particle model distribution table used to spawn particles
spacingSpacing between the particle center points that are spawned
jitterFactorThe factor of the distance that is used to randomize particle positions
Returns
A vector containing the created particles.
agx::Physics::ParticlePtrVector agx::ParticleSystem::spawnParticlesInGeometry ( agxCollide::Geometry *  geometry,
Real  radius,
const agx::Vec3 &  spacing,
agx::Real  jitterFactor = agx::Real(0) 
)
inherited

Spawns particles In a specified geometry.

Parameters
geometryThe specified geometry to spawn particles in
spacingSpacing between the particle center points that are spawned
jitterFactorThe factor of the distance that is used to randomize particle positions
Returns
A vector containing the created particles.
agx::Physics::ParticlePtrVector agx::ParticleSystem::spawnParticlesInGeometry ( agxCollide::Geometry *  geometry,
agx::Emitter::DistributionTable *  sourceTable,
const agx::Vec3 &  spacing,
agx::Real  jitterFactor = agx::Real(0) 
)
inherited

Spawns particles In a specified geometry from a distribution table.

Parameters
geometryThe specified geometry to spawn particles in
sourceTableThe particle model distribution table used to spawn particles
spacingSpacing between the particle center points that are spawned
jitterFactorThe factor of the distance that is used to randomize particle positions
Returns
A vector containing the created particles.
agx::Physics::ParticlePtrVector agx::ParticleSystem::spawnParticlesInGeometryHCP ( agxCollide::Geometry *  geometry,
Real  radius,
const agx::Vec3 &  spacing,
agx::Real  jitterFactor = agx::Real(0) 
)
inherited

Spawns particles In a specified geometry using a Hexagonal-Close-Packing (HCP) lattice.

Parameters
geometryThe specified geometry to spawn particles in
spacingSpacing between the particle center points that are spawned
jitterFactorThe factor of the distance that is used to randomize particle positions
Returns
A vector containing the created particles.
agx::Physics::ParticlePtrVector agx::ParticleSystem::spawnParticlesInGeometryHCP ( agxCollide::Geometry *  geometry,
agx::Emitter::DistributionTable *  sourceTable,
const agx::Vec3 &  spacing,
agx::Real  jitterFactor = agx::Real(0) 
)
inherited

Spawns particles In a specified geometry from a distribution table using a Hexagonal-Close-Packing (HCP) lattice.

Parameters
geometryThe specified geometry to spawn particles in
sourceTableThe particle model distribution table used to spawn particles
spacingSpacing between the particle center points that are spawned
jitterFactorThe factor of the distance that is used to randomize particle positions
Returns
A vector containing the created particles.
Vec3 agx::ParticleSystem::sumForceMagnitudes ( RigidBody *  body)
inherited

Sums force magnitudes from particle system onto rigid body.

Only valid for iterative solver.

Parameters
bodyThe rigid body.
void agx::Component::traverse ( const TraverseCallback &  callback)
inherited
void agx::Component::traverse ( ComponentVisitor *  )
inherited
void agx::Referenced::unreference ( void *  ptr = nullptr) const
inherited

Decrement the reference count by one, indicating that a pointer to this object is referencing it.

If the reference count goes to zero, it is assumed that this object is no longer referenced and is automatically deleted.

This method should be used with care, always balanced with the same number of calls to reference.

void agx::Referenced::unreference_nodelete ( ) const
inherited

Decrement the reference count by one, indicating that a pointer to this object is referencing it.

However, do not delete it, even if ref count goes to 0. Warning, unref_nodelete() should only be called if the user knows exactly who will be responsible for, one should prefer unref() over unref_nodelete() as the later can lead to memory leaks.

void agx::ParticleSystem::updateShouldRender ( )
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.

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

Member Data Documentation

ObjectEvent agx::Component::addObjectEvent
inherited

Definition at line 63 of file Component.h.

Mutex agx::Referenced::m_mutex
mutableprotectedinherited

Definition at line 240 of file Referenced.h.

ObserverContainer agx::Referenced::m_observers
mutableprotectedinherited

Definition at line 239 of file Referenced.h.

agxData::EntityStorageRef agx::ParticleSystem::m_particleStorage
protectedinherited

Definition at line 690 of file ParticleSystem.h.

AtomicValue agx::Referenced::m_refCount
mutableprotectedinherited

Definition at line 241 of file Referenced.h.

TaskGroupRef agx::ParticleSystem::m_updateTask
protectedinherited

Definition at line 657 of file ParticleSystem.h.

ObjectEvent agx::Component::removeObjectEvent
inherited

Definition at line 64 of file Component.h.


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