17 #ifndef AGX_PARTICLESYSTEM_H
18 #define AGX_PARTICLESYSTEM_H
75 virtual bool setUpdateTask(
Task* updateTask );
80 Task* getUpdateTask();
142 #if (!defined SWIG ) || ( defined SWIGCSHARP || defined SWIGJAVA)
240 size_t getNumParticles()
const;
245 Real getParticleRadius()
const;
250 Real getParticleMass()
const;
260 void setParticleRadius(
Real radius,
bool updateExistingParticles =
false );
270 virtual void setParticleMass(
Real mass,
bool updateExistingParticles =
false );
280 void setMaterial(
Material* material,
bool updateExistingParticles =
false );
286 const Material* getMaterial()
const;
291 void evaluateParticleDefaultMass();
331 size_t getNumParticleGeometryContacts();
336 size_t getNumParticleParticleContacts();
341 size_t getNumActiveParticleParticleContacts();
346 size_t getNumActiveParticleGeometryContacts();
355 agx::Real getTotalParticleParticleContactForces();
358 agx::Real getTotalParticleGeometryContactForces();
361 agx::Real calculateTotalParticleVolume()
const;
364 agx::Real calculateTotalParticleMass()
const;
402 void addCollisionGroup(
agx::UInt32 id,
bool updateExistingParticles =
true );
403 void addCollisionGroup(
const agx::Name&
id,
bool updateExistingParticles =
true );
409 void removeCollisionGroup(
agx::UInt32 id,
bool updateExistingParticles =
true );
410 void removeCollisionGroup(
const agx::Name&
id,
bool updateExistingParticles =
true );
446 bool hasCollisionGroup(
const agx::Name&
id )
const;
465 void addCustomBufferReal(
const agx::String& buffername );
488 void addCustomBufferInt(
const agx::String& buffername );
511 void addCustomBufferReal32(
const agx::String& buffername );
534 void addCustomBufferVec3(
const agx::String& buffername );
556 virtual void destroySingleParticle(
agx::Index particleId );
577 virtual void setSingleParticleVelocity(
agx::Index particleId,
const agx::Vec3& velocity );
608 void clearAllParticles();
614 void updateShouldRender();
619 void commitColorBuffer();
625 void commitAllBuffers();
639 void _setGravityTask(
Task* task );
641 void clearContactData();
676 void init(
bool createMaterial =
true );
678 void invalidLicenseCallback();
694 bool isJournalPlayback();
721 bool isJournalPlayback();