17 #ifndef AGXMODEL_SOIL_PARTICLE_MERGER_H
18 #define AGXMODEL_SOIL_PARTICLE_MERGER_H
20 #define USE_SOIL_PARTICLE_SIMULATION 0
22 #if defined(USE_SOIL_PARTICLE_SIMULATION) && USE_SOIL_PARTICLE_SIMULATION == 1
38 SoilParticleSimulation();
50 void updatePositionsAfterOrdinarySolve();
54 bool isActive( ) {
return !m_geometriesToStaticGeometriesTable.empty(); }
56 void updateTransforms( )
58 GeometryPtrGeometryRefTable::iterator it = m_geometriesToStaticGeometriesTable.begin();
60 while ( it != m_geometriesToStaticGeometriesTable.end() )
62 updateTransform((*it).first);
68 friend class SoilParticle;
72 void addChild( SoilParticle* parent, SoilParticle* child );
74 void mergeParentToParent( SoilParticle* parent1, SoilParticle* parent2,
SoilParticlePtrVector& parentVector );
76 void mergeToParent( SoilParticle* parent, SoilParticle* child );
80 void restoreParticles();
84 AGX_FORCE_INLINE void updateTransform( GeometryPtrGeometryRefTable::iterator it )
86 if ( it == m_geometriesToStaticGeometriesTable.end() )
89 (*it).second->setTransform( (*it).first->getTransform() );
94 #if TERRAIN_USE_PARTICLE_SYSTEM == 0
96 children.push_back(child);
101 GeometryPtrGeometryRefTable m_geometriesToStaticGeometriesTable;
103 SoilParticlePtrSoilParticlePtrVectorTable m_parents;
104 SoilParticlePtrSoilParticlePtrVectorTable m_seedParents;
The geometry representation used by the collision detection engine.
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Inheritance with partial specialization due to bug with ref_ptr containers.
The rigid body class, combining a geometric model and a frame of reference.
Vector containing 'raw' data.
Smart pointer for handling referenced counted objects.
Contain classes for higher level modeling primitives, such as Tree, Terrain etc.
agx::Vector< SoilParticle * > SoilParticlePtrVector