AGXDynamics  2.35.0.2
ParticleSystem.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2022. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 #ifndef AGX_PARTICLESYSTEM_H
18 #define AGX_PARTICLESYSTEM_H
19 
20 #include <agx/Referenced.h>
21 #include <agx/Component.h>
22 #include <agx/Bound.h>
26 #include <agx/Material.h>
27 #include <agx/Emitter.h>
28 #include <agxStream/Serializable.h>
29 #include <agx/Task.h>
30 #include <agxCollide/Geometry.h>
31 #include <agxCollide/Space.h>
32 #include <typeinfo>
33 #include <agx/Logger.h>
34 
35 namespace agxData
36 {
38 }
39 
40 namespace agxIO
41 {
42  class Image;
43 }
44 
45 namespace agxSDK
46 {
47  class Simulation;
48 }
49 
50 AGX_TYPE_BINDING( agxData::ParticlePair, "ParticlePair" )
51 
52 namespace agx
53 {
57 
58 
68  {
69  public:
70  static Model* ClassModel();
71 
75  virtual bool setUpdateTask( Task* updateTask );
76 
80  Task* getUpdateTask();
81 
85  virtual void addNotification( agxSDK::Simulation* simulation );
86 
90  Physics::ParticlePtr createParticle();
91 
95  agxData::EntityRange createParticles( size_t numParticles );
96 
100  Physics::ParticlePtr getParticle( agx::Index particleId );
101 
105  void destroyParticle( Physics::ParticlePtr particle );
106 
110  void destroyParticles( const Physics::ParticlePtrVector& particles );
111  void destroyParticles( const agxData::EntityPtrVector& particles );
112 
116  void destroyParticles( agxData::EntityRange particles );
117 
125  void removeParticle( Physics::ParticlePtr particle );
126 
130  bool isValid( Physics::ParticlePtr particle ) const;
131 
135  bool isParticleGeometryContactValid( Physics::ParticleGeometryContactPtr contact );
136 
140  bool isParticlePairContactValid( Physics::ParticlePairContactPtr contact );
141 
142 #if (!defined SWIG ) || ( defined SWIGCSHARP || defined SWIGJAVA)
143 
146  const agx::Physics::ParticlePtrArray getParticles() const;
147  agx::Physics::ParticlePtrArray getParticles();
148 #endif
149 
151  agxData::EntityRange spawnParticles( const agx::Vec3Vector& positions );
152 
160  agx::Physics::ParticlePtrVector spawnParticlesInBound( const agx::Bound3& bound, Real radius, const agx::Vec3& spacing, agx::Real jitterFactor = agx::Real( 0 ) );
161 
170  agx::Physics::ParticlePtrVector spawnParticlesInBound( const agx::Bound3& bound, agx::Emitter::DistributionTable* sourceTable, const agx::Vec3& spacing, agx::Real jitterFactor = agx::Real( 0 ) );
171 
180  agx::Physics::ParticlePtrVector spawnParticlesInBoundHCP( const agx::Bound3& bound, Real radius, const agx::Vec3& spacing, agx::Real jitterFactor = agx::Real( 0 ) );
181 
190  agx::Physics::ParticlePtrVector spawnParticlesInBoundHCP( const agx::Bound3& bound, agx::Emitter::DistributionTable* sourceTable, const agx::Vec3& spacing, agx::Real jitterFactor = agx::Real( 0 ) );
191 
199  agx::Physics::ParticlePtrVector spawnParticlesInGeometry( agxCollide::Geometry* geometry, Real radius, const agx::Vec3& spacing, agx::Real jitterFactor = agx::Real( 0 ) );
200 
208  agx::Physics::ParticlePtrVector spawnParticlesInGeometryHCP( agxCollide::Geometry* geometry, Real radius, const agx::Vec3& spacing, agx::Real jitterFactor = agx::Real( 0 ) );
209 
218  agx::Physics::ParticlePtrVector spawnParticlesInGeometry( agxCollide::Geometry* geometry, agx::Emitter::DistributionTable* sourceTable, const agx::Vec3& spacing, agx::Real jitterFactor = agx::Real( 0 ) );
219 
228  agx::Physics::ParticlePtrVector spawnParticlesInGeometryHCP( agxCollide::Geometry* geometry, agx::Emitter::DistributionTable* sourceTable, const agx::Vec3& spacing, agx::Real jitterFactor = agx::Real( 0 ) );
229 
235  void colorParticlesWithLevelsInBound( const agx::Bound3& bound, const agx::Vec4fVector& colors );
236 
240  size_t getNumParticles() const;
241 
245  Real getParticleRadius() const;
246 
250  Real getParticleMass() const;
251 
260  void setParticleRadius( Real radius, bool updateExistingParticles = false );
261 
270  virtual void setParticleMass( Real mass, bool updateExistingParticles = false );
271 
280  void setMaterial( Material* material, bool updateExistingParticles = false );
281 
285  Material* getMaterial();
286  const Material* getMaterial() const;
287 
291  void evaluateParticleDefaultMass();
292 
296  agxData::EntityStorage* getParticleStorage();
297 
301  const agxData::EntityStorage* getParticleStorage() const;
302 
306  agxData::EntityStorage* getParticlePairContactStorage();
307 
311  agxData::EntityStorage* getGeometryParticleContactListStorage();
312 
316  agxData::EntityStorage* getParticleGeometryContactStorage();
317 
321  agx::Vector<agx::Physics::ParticleGeometryContactPtr> getParticleGeometryContacts();
322 
326  agx::Vector<agx::Physics::ParticlePairContactPtr> getParticleParticleContacts();
327 
331  size_t getNumParticleGeometryContacts();
332 
336  size_t getNumParticleParticleContacts();
337 
341  size_t getNumActiveParticleParticleContacts();
342 
346  size_t getNumActiveParticleGeometryContacts();
347 
352  Vec3 sumForceMagnitudes( RigidBody* body );
353 
354  // Returns the total contact forces between the particles in the system
355  agx::Real getTotalParticleParticleContactForces();
356 
357  // Returns the total particle-geometry contact forces in the system.
358  agx::Real getTotalParticleGeometryContactForces();
359 
360  // Calculates the total particle volume in the particle system
361  agx::Real calculateTotalParticleVolume() const;
362 
364  agx::Real calculateTotalParticleMass() const;
365 
367 
371  void setEnableCollisions( const agxCollide::Geometry* geometry, bool flag );
372 
376  bool getEnableCollisions( const agxCollide::Geometry* geometry ) const;
377 
381  const agxCollide::GeometryHashVector& getDisabledCollisions() const;
382 
383 
392  // bool canCollide( const agxCollide::Geometry* geometry ) const;
393 
402  void addCollisionGroup( agx::UInt32 id, bool updateExistingParticles = true );
403  void addCollisionGroup( const agx::Name& id, bool updateExistingParticles = true );
404 
409  void removeCollisionGroup( agx::UInt32 id, bool updateExistingParticles = true );
410  void removeCollisionGroup( const agx::Name& id, bool updateExistingParticles = true );
411 
420  void addCollisionGroupParticle( agx::UInt32 id, agx::Physics::ParticlePtr ptr );
421  void addCollisionGroupParticle( const agx::Name& id, agx::Physics::ParticlePtr ptr );
422 
427  void removeCollisionGroupParticle( agx::UInt32 id, agx::Physics::ParticlePtr ptr );
428  void removeCollisionGroupParticle( const agx::Name& id, agx::Physics::ParticlePtr ptr );
429 
436  bool hasCollisionGroupParticle( agx::UInt32 id, agx::Physics::ParticlePtr ptr ) const;
437  bool hasCollisionGroupParticle( const agx::Name& id, agx::Physics::ParticlePtr ptr ) const;
438 
445  bool hasCollisionGroup( agx::UInt32 id ) const;
446  bool hasCollisionGroup( const agx::Name& id ) const;
447 
451  agx::Physics::CollisionGroupSetPtr getCollisionGroupSet() const;
452 
453  const agx::Bound3& getParticleBound();
454 
458  bool hasCustomBuffer( const agx::String& buffername, const agx::String& formatName );
459 
465  void addCustomBufferReal( const agx::String& buffername );
466 
473  void setCustomBufferValueReal( agx::Index id, const agx::String& buffername, agx::Real val );
474 
481  agx::Real getCustomBufferValueReal( agx::Index id, const agx::String& buffername );
482 
488  void addCustomBufferInt( const agx::String& buffername );
489 
496  void setCustomBufferValueInt( agx::Index id, const agx::String& buffername, agx::Int val );
497 
504  agx::Int getCustomBufferValueInt( agx::Index id, const agx::String& buffername );
505 
511  void addCustomBufferReal32( const agx::String& buffername );
512 
519  void setCustomBufferValueReal32( agx::Index id, const agx::String& buffername, agx::Real32 val );
520 
527  agx::Real32 getCustomBufferValueReal32( agx::Index id, const agx::String& buffername );
528 
534  void addCustomBufferVec3( const agx::String& buffername );
535 
542  void setCustomBufferValueVec3( agx::Index id, const agx::String& buffername, agx::Vec3 val );
543 
550  agx::Vec3 getCustomBufferValueVec3( agx::Index id, const agx::String& buffername );
551 
553  agx::Physics::ParticleGeometryContactPtr createParticleGeometryContact( agx::Physics::ParticlePtr particle, agx::Physics::GeometryPtr geometry );
554 
556  virtual void destroySingleParticle( agx::Index particleId );
557 
559  virtual void setSingleParticleRadius( agx::Index particleId, agx::Real radius );
560 
562  virtual agx::Real getSingleParticleRadius( agx::Index particleId );
563 
565  virtual void setSingleParticleMass( agx::Index particleId, agx::Real mass );
566 
568  virtual agx::Real getSingleParticleMass( agx::Index particleId );
569 
571  virtual void setSingleParticleColor( agx::Index particleId, const agx::Vec4f& color );
572 
574  virtual agx::Vec4f getSingleParticleColor( agx::Index particleId );
575 
577  virtual void setSingleParticleVelocity( agx::Index particleId, const agx::Vec3& velocity );
578 
580  virtual agx::Vec3 getSingleParticleVelocity( agx::Index particleId );
581 
583  virtual agx::Vec3 getSingleParticlePosition( agx::Index particleId );
584 
586  virtual void setSingleParticleForce( agx::Index particleId, const agx::Vec3& force );
587 
589  virtual agx::Vec3 getSingleParticleForce( agx::Index particleId );
590 
592  void applyAirForceDragSimple( agx::Real cd, agx::Real cr );
593 
595  bool particleExistsWithId( agx::Index id );
596 
603  agx::Index getParticleIdFromIndex( agx::Index index ) const;
604 
608  void clearAllParticles();
609 
614  void updateShouldRender();
615 
619  void commitColorBuffer();
620 
625  void commitAllBuffers();
626 
630  void attach();
631 
636  void detach();
637 
638  // private
639  void _setGravityTask( Task* task );
640  void setSpace( agxCollide::Space* space );
641  void clearContactData();
642 
644 
645  agx::Vector<agx::Physics::ParticlePtr> createParticlesFromImage( agxIO::Image* image, agx::Real particleRadius, const agx::Vec3& center, agx::Real radiusJitter );
646 
648  static Vec3u calculateFilledBoundPacking( agx::Vec3Vector& result, agx::Bound3 bound, const agx::Vec3& spacing, agx::Real boundarySpacing = agx::Real( 0 ), agx::Real jitterFactor = agx::Real( 0 ) );
649  static size_t calculateFilledBoundPackingHCP( agx::Vec3Vector& result, agx::Bound3 bound, const agx::Vec3& distance, agx::Real boundarySpacing = agx::Real( 0 ), agx::Real jitterFactor = agx::Real( 0 ) );
650  static void calculateFilledGeometryPacking( agx::Vec3Vector& result, agxCollide::Geometry* geometry, const agx::Vec3& spacing, agx::Real boundarySpacing = agx::Real( 0 ), agx::Real jitterFactor = agx::Real( 0 ) );
651  static void calculateFilledGeometryPackingHCP( agx::Vec3Vector& result, agxCollide::Geometry* geometry, const agx::Vec3& spacing, agx::Real boundarySpacing = agx::Real( 0 ), agx::Real jitterFactor = agx::Real( 0 ) );
652 
653  template<typename T>
654  void addCustomBufferT( const agx::String& name );
655 
656  template<typename T>
657  void setCustomBufferValueT( agx::Index id, const agx::String& buffername, const T valueT );
658 
659  template<typename T>
660  T getCustomBufferValueT( agx::Index id, const agx::String& buffername );
661 
662  agxSDK::Simulation* getSimulation() const;
663 
664  agx::Physics::ParticlePtrVector convertRangeToParticlePtrVector( agxData::EntityRange& entityRange );
665 
667 
669 
670  protected:
671  ParticleSystem( const String& model, Device* device = CpuDevice::instance() );
672  ParticleSystem(); // Only used for restoring from serialization
673 
674  virtual ~ParticleSystem();
675 
676  void init( bool createMaterial = true );
677  void setCollisionGroupSet( agx::Physics::CollisionGroupSetPtr );
678  void invalidLicenseCallback();
680  void setRadiusOnParticles( agxData::EntityRange& entityRange, agx::Real radius );
681 
682  protected:
690  class AGXPHYSICS_EXPORT MaterialUuidBufferListener : public agxData::Buffer::EventListener, public agx::Referenced
691  {
692  public:
694  bool isJournalPlayback();
695  void setSimulation( agxSDK::Simulation* sim );
696  virtual void updateCallback( agxData::Buffer* buffer ) override;
697  virtual void updateCallback( agxData::Buffer* buffer, agx::Index index ) override;
698  virtual void updateCallback( agxData::Buffer* buffer, agx::IndexRange range ) override;
699  virtual void updateCallback( agxData::Buffer* buffer, agxData::Array< agx::Index > indexSet ) override;
700 
701  protected:
702  virtual ~MaterialUuidBufferListener();
704  // Variables
706  private:
708  agxSDK::Simulation* m_simulation;
709  };
710 
717  class AGXPHYSICS_EXPORT UpdateRenderingListener : public agxData::Buffer::EventListener, public agx::Referenced
718  {
719  public:
721  bool isJournalPlayback();
722  void setSimulation( agxSDK::Simulation* sim );
723  virtual void updateCallback( agxData::Buffer* buffer ) override;
724  virtual void updateCallback( agxData::Buffer* buffer, agx::Index index ) override;
725  virtual void updateCallback( agxData::Buffer* buffer, agx::IndexRange range ) override;
726  virtual void updateCallback( agxData::Buffer* buffer, agxData::Array< agx::Index > indexSet ) override;
727 
728  protected:
729  virtual ~UpdateRenderingListener();
731  // Variables
733  private:
735  agxSDK::Simulation* m_simulation;
736  };
737 
738  protected:
740  private:
741  agxData::EntityStorageRef m_particleCellStorage;
742  agxData::EntityStorageRef m_cellBlockStorage;
743  agxData::EntityStorageRef m_particleZoneStorage;
744  agxData::EntityStorageRef m_collisionParticleStorage;
745  agxData::EntityStorageRef m_particleGeometryContactStorage;
746  agxData::EntityStorageRef m_particlePairContactStorage;
747  agxData::EntityStorageRef m_geometryParticleContactListStorage;
748 
749  agxData::BufferRef m_materialUuidBuffer;
750  agxData::BufferRef m_stateBuffer;
751  agxData::BufferRef m_cellBlockPermutation;
752  agxData::BufferRef m_deadCellBlocks;
753  agxData::BufferRef m_particlesWithMissingTargetCell;
754  agxData::BufferRef m_cellBlockOverlapPairs;
755  agxData::ValueRef m_particleBound;
756  agxData::ValueRef m_collisionGroupSet;
757  agxData::ValueRef m_defaultRadius;
758  agxData::ValueRef m_defaultMass;
759  agxData::ValueRef m_defaultMaterial;
760 
761  MaterialRef m_material;
762  TaskRef m_gravityTask;
763  bool m_initialized;
764  bool m_dirtyBound;
765 
766  agx::TaskRef m_updateBoundTask;
767 
768  agxCollide::GeometryHashVector m_disabledCollisionsHash;
769  agxCollide::SpaceRef m_space;
770 
771  MaterialUuidBufferListenerRef m_uuidMaterialListenerRef;
772  UpdateRenderingListenerRef m_updateRenderingListenerRef;
773 
774  agxData::ValueObserver m_invMassValue;
775  void massChanged( agxData::Value* massValue );
776  agxData::Value::Event::CallbackType m_massChangedCallback;
777  };
778 
779  /* Implementation */
780  AGX_FORCE_INLINE Task* ParticleSystem::getUpdateTask() { return m_updateTask; }
781 
782  AGX_FORCE_INLINE const agx::Physics::ParticlePtrArray ParticleSystem::getParticles() const
783  {
784  return m_particleStorage->getInstances<Physics::ParticlePtr>();
785  }
786 
787  AGX_FORCE_INLINE agx::Physics::ParticlePtrArray ParticleSystem::getParticles()
788  {
789  return m_particleStorage->getInstances<Physics::ParticlePtr>();
790  }
791 
792  AGX_FORCE_INLINE agxData::EntityStorage* ParticleSystem::getParticleStorage() { return m_particleStorage; }
793  AGX_FORCE_INLINE const agxData::EntityStorage* ParticleSystem::getParticleStorage() const { return m_particleStorage; }
794  AGX_FORCE_INLINE agxData::EntityStorage* ParticleSystem::getParticleGeometryContactStorage() { return m_particleGeometryContactStorage; }
795  AGX_FORCE_INLINE agxData::EntityStorage* ParticleSystem::getGeometryParticleContactListStorage() { return m_geometryParticleContactListStorage; }
796  AGX_FORCE_INLINE agxData::EntityStorage* ParticleSystem::getParticlePairContactStorage() { return m_particlePairContactStorage; }
797 
798  AGX_FORCE_INLINE const agxCollide::GeometryHashVector& ParticleSystem::getDisabledCollisions() const { return m_disabledCollisionsHash; }
799  // AGX_FORCE_INLINE bool ParticleSystem::hasCollisionGroup( agx::UInt32 id ) const { return m_collisionGroups.contains(id); }
800  inline agx::Physics::CollisionGroupSetPtr ParticleSystem::getCollisionGroupSet() const { return m_collisionGroupSet->get<Physics::CollisionGroupSetPtr>(); }
801 
802  // Real
803  AGX_FORCE_INLINE void ParticleSystem::addCustomBufferReal( const agx::String& buffername ) { addCustomBufferT<agx::Real>( buffername ); }
804  AGX_FORCE_INLINE void ParticleSystem::setCustomBufferValueReal( agx::Index id, const agx::String& buffername, agx::Real val ) { setCustomBufferValueT<agx::Real>( id, buffername, val ); }
805  AGX_FORCE_INLINE agx::Real ParticleSystem::getCustomBufferValueReal( agx::Index id, const agx::String& buffername ) { return getCustomBufferValueT<agx::Real>( id, buffername ); }
806 
807  // Int
808  AGX_FORCE_INLINE void ParticleSystem::addCustomBufferInt( const agx::String& buffername ) { addCustomBufferT<agx::Int>( buffername ); }
809  AGX_FORCE_INLINE void ParticleSystem::setCustomBufferValueInt( agx::Index id, const agx::String& buffername, agx::Int val ) { setCustomBufferValueT<agx::Int>( id, buffername, val ); }
810  AGX_FORCE_INLINE agx::Int ParticleSystem::getCustomBufferValueInt( agx::Index id, const agx::String& buffername ) { return getCustomBufferValueT<agx::Int>( id, buffername ); }
811 
812  // Real32
813  AGX_FORCE_INLINE void ParticleSystem::addCustomBufferReal32( const agx::String& buffername ) { addCustomBufferT<agx::Real32>( buffername ); }
814  AGX_FORCE_INLINE void ParticleSystem::setCustomBufferValueReal32( agx::Index id, const agx::String& buffername, agx::Real32 val ) { setCustomBufferValueT<agx::Real32>( id, buffername, val ); }
815  AGX_FORCE_INLINE agx::Real32 ParticleSystem::getCustomBufferValueReal32( agx::Index id, const agx::String& buffername ) { return getCustomBufferValueT<agx::Real32>( id, buffername ); }
816 
817  // Vec3
818  AGX_FORCE_INLINE void ParticleSystem::addCustomBufferVec3( const agx::String& buffername ) { addCustomBufferT<agx::Vec3>( buffername ); }
819  AGX_FORCE_INLINE void ParticleSystem::setCustomBufferValueVec3( agx::Index id, const agx::String& buffername, agx::Vec3 val ) { setCustomBufferValueT<agx::Vec3>( id, buffername, val ); }
820  AGX_FORCE_INLINE agx::Vec3 ParticleSystem::getCustomBufferValueVec3( agx::Index id, const agx::String& buffername ) { return getCustomBufferValueT<agx::Vec3>( id, buffername ); }
821 }
822 
823 // AGX_PARTICLESYSTEM_H
824 #endif
agx::SymmetricPair
A std::pair, with both elements of the same type, and symmetric so (a, b) == (b, a)
Definition: SymmetricPair.h:31
Referenced.h
agxData::Value
Abstract representation of a value.
Definition: Value.h:42
agx::Real
double Real
Definition: Real.h:42
agx::ParticleSystem::MaterialUuidBufferListener
Definition: ParticleSystem.h:690
agx::Vector< agx::Physics::ParticleGeometryContactPtr >
agx::RigidBody
The rigid body class, combining a geometric model and a frame of reference.
Definition: RigidBody.h:54
agxStream::Serializable
This class is an abstract base class for all classes that can be stored and retrieved from an Archive...
Definition: Serializable.h:44
Task.h
DOXYGEN_END_INTERNAL_BLOCK
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: macros.h:97
agx::Emitter::DistributionTable
friend class DistributionTable
Definition: Emitter.h:388
Geometry.h
DOXYGEN_START_INTERNAL_BLOCK
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:96
agx::Int
int32_t Int
Definition: Integer.h:35
ParticleGeometryContactEntity.h
agx::Real32
float Real32
Definition: Real.h:44
agx::Physics::ParticlePairContactPtr
Pointer to a entity instance of type Physics.ParticlePairContact.
Definition: ParticlePairContactEntity.h:240
agx::Vec4T
A class holding 4 dimensional vectors and providing basic arithmetic.
Definition: Vec4Template.h:34
agxData::EntityStorage
Data storage for a collection of entity instances of a specified EntityModel.
Definition: EntityStorage.h:72
agx::ParticleSystem::UpdateRenderingListener
Definition: ParticleSystem.h:717
agx::Component::ClassModel
static agx::Model * ClassModel()
AGXSTREAM_DECLARE_SERIALIZABLE
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
Definition: Serializable.h:207
agx::VectorPOD< ParticlePtr >
agx::observer_ptr< agx::ParticleSystem >
agx
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Definition: AddedMassInteraction.h:22
AGXPHYSICS_EXPORT
#define AGXPHYSICS_EXPORT
agx::BoundT< Vec3 >
agxData
Contains classes for low level data storage for AGX.
Definition: Container.h:23
ParticleEntity.h
agx::Model
A model is an abstract representation of the class of an agx::Object.
Definition: Model.h:40
Space.h
agxData::Array
Type-specific Array used for fast access into the data held by a Buffer.
Definition: agxData.h:30
agx::IndexRangeT< agx::UInt >
AGX_DECLARE_VECTOR_TYPES
#define AGX_DECLARE_VECTOR_TYPES(type)
Definition: Vector.h:34
agx::Task
A representation of a generic task.
Definition: Task.h:57
agx::Physics::ParticlePtr
Pointer to a entity instance of type Physics.Particle.
Definition: ParticleEntity.h:292
agx::ParticleSystem
A basic particle system that contains all the storages and buffers required for basic operation and a...
Definition: ParticleSystem.h:67
agx::ref_ptr< TaskGroup >
agxSDK::Simulation
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition: Simulation.h:126
agx::SetVector
This class is a combined container which has the find complexity of a HashTable, deterministic iterat...
Definition: SetVector.h:37
Logger.h
agx::Physics::ParticleGeometryContactPtr
Pointer to a entity instance of type Physics.ParticleGeometryContact.
Definition: ParticleGeometryContactEntity.h:267
agxData::ParticlePair
agx::SymmetricPair< agx::Physics::ParticlePtr > ParticlePair
Definition: ParticleSystem.h:37
agx::Index
UInt32 Index
Definition: Integer.h:52
agxUtil::setEnableCollisions
AGXPHYSICS_EXPORT bool setEnableCollisions(agx::RigidBody *rb1, agx::RigidBody *rb2, bool enable)
Enable or disable the collision between all geometries in RigidBody rb1 and RigidBody rb2.
agxData::Buffer
Abstract representation of a data buffer.
Definition: Buffer.h:55
agxCollide::Geometry
The geometry representation used by the collision detection engine.
Definition: Geometry.h:92
Component.h
Bound.h
agxIO::Image
Class to represent Images.
Definition: Image.h:32
agx::Name
Representation of a name string.
Definition: Name.h:32
Serializable.h
agxCollide::Space
This class contains all Geometries and performs Broad Phase and Narrow Phase collision detection to c...
Definition: Space.h:81
agx::Component
A component is an object containing other objects, enabling hierarchical structuring.
Definition: Component.h:38
agx::Physics::GeometryPtr
Pointer to a entity instance of type Physics.Geometry.
Definition: GeometryEntity.h:269
agx::Callback1
Templated callback with one argument.
Definition: Callback.h:100
ParticlePairContactEntity.h
agx::Referenced
Base class providing referencing counted objects.
Definition: Referenced.h:113
AGX_DECLARE_POINTER_TYPES
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:248
Emitter.h
agx::ParticleSystem::m_updateTask
TaskGroupRef m_updateTask
Definition: ParticleSystem.h:679
agx::Device
An agx::Device is an abstract representation of a device on which data can be stored and processed.
Definition: Device.h:57
agx::AgXString< std::string >
AGX_TYPE_BINDING
#define AGX_TYPE_BINDING(_Type, _Name)
Definition: Type.h:179
agxSDK
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition: Constraint.h:30
agx::init
void AGXPHYSICS_EXPORT init()
Initialize agx.
agx::ParticleSystem::m_particleStorage
agxData::EntityStorageRef m_particleStorage
Definition: ParticleSystem.h:739
agx::Material
Main material class which acts as a holder of a Surface Material and a Bulk material.
Definition: Material.h:387
agx::Vec3T< Real >
agx::UInt32
uint32_t UInt32
Definition: Integer.h:40
agx::ParticleSystemRefSetVector
agx::SetVector< agx::ref_ptr< agx::ParticleSystem > > ParticleSystemRefSetVector
Definition: ParticleSystem.h:56
agx::HashVector< const Geometry *, agx::observer_ptr< const Geometry > >
agxIO
The agxIO namespace contains classes for reading, writing and finding files.
Definition: Material.h:41
agx::Physics::CollisionGroupSetPtr
Pointer to a entity instance of type Physics.CollisionGroupSet.
Definition: CollisionGroupSetEntity.h:175
AGX_FORCE_INLINE
#define AGX_FORCE_INLINE
Definition: macros.h:58
Material.h
agxData::EntityRange
Definition: EntityPtr.h:247