44 SQUARE_LATTICE_PACK = 0,
45 HEXAGONAL_CLOSE_PACK = 1
89#if (!defined SWIG ) || ( defined SWIGCSHARP || defined SWIGJAVA)
116 PACKING_TYPE packingType = PACKING_TYPE::SQUARE_LATTICE_PACK );
191 void onAddNotification();
192 void onRemoveNotification();
200 agx::Physics::GranularBodyPtr _createSoilParticle(
agx::Real radius, const
agx::Vec3& position, const
agx::Vec3& velocity,
agx::Material* material );
201 void initGranularBodySystem();
202 bool isLastTerrain();
203 bool isTerrainPagerActive();
207 agx::Physics::GranularBodySystemRef m_soilParticleSystem;
212 return m_soilParticleSystem !=
nullptr ? m_soilParticleSystem->
isValid(ptr) :
false;
#define AGX_DECLARE_POINTER_TYPES(type)
#define AGXTERRAIN_STORE_RESTORE_INTERFACE
#define AGXTERRAIN_EXPORT
The geometry representation used by the collision detection engine.
Type-specific Array used for fast access into the data held by a Buffer.
Interface class for accessing data and functions for the internal soil particle simulation used in ag...
void removeSoilParticle(agx::Physics::GranularBodyPtr ptr)
Tag a soil particle for removal at the last stages of the current time step.
agx::Physics::ParticlePtrVector spawnSoilParticlesInGeometry(agxCollide::Geometry *geometry, agx::Real radius, const agx::Vec3 &spacing, agx::Real jitterFactor=agx::Real(0), PACKING_TYPE packingType=PACKING_TYPE::SQUARE_LATTICE_PACK)
Spawns soil particles with the soil material from this terrain in a specified geometry.
void addCollisionGroup(agx::UInt32 id)
Add the specified id to a vector of group id, this will make the created soil particles part of the g...
size_t getNumSoilParticles() const
Get the number of soil particles active in the soil simulation.
void removeCollisionGroup(agx::UInt32 id)
Remove a group id from the vector of group ids.
agx::Physics::GranularBodySystem * getGranularBodySystem() const
Returns the internal GranularBodySystem used to simulate the soil particles.
void tagParticlesAsSoilParticles(agx::Physics::ParticlePtrVector &particles)
Tag specified particles as soil particles with material from this terrain.
agx::Bound3 getSoilParticleBound() const
Get the complete bound of the soil particle system active in the simulation.
void removeCollisionGroup(const agx::Name &name)
SoilSimulationInterface(Terrain *terrain)
Construct given terrain instance.
const agxCollide::ParticlePairContactVector & getParticleParticleContacts() const
Returns the particle-particle contacts in the internal soil simulation.
bool isParticleGeometryContactValid(agx::Physics::ParticleGeometryContactPtr contact)
void addCollisionGroup(const agx::Name &name)
SoilParticleArray getSoilParticles() const
Get the soil particles active in the simulation.
SoilSimulationInterface()
PACKING_TYPE
Packing type when generating.
agx::Real calculateSoilParticleBulkVolume() const
agx::Physics::GranularBodyPtr createSoilParticle(agx::Real radius, const agx::Vec3 &position=agx::Vec3(), const agx::Vec3 &velocity=agx::Vec3())
Create a soil particle with specified radius and material in the internal soil simulation.
agx::Real calculateSoilParticleSpecificVolume() const
agx::Physics::GranularBodyPtr createSoilParticle(const agx::Vec3 &position=agx::Vec3(), const agx::Vec3 &velocity=agx::Vec3())
Create a soil particle with nominal radius and material in the internal soil simulation.
bool isGeometryPtrValid(agx::Physics::GeometryPtr geometry) const
bool isValid(agx::Physics::GranularBodyPtr ptr) const
bool isParticlePairContactValid(agx::Physics::ParticlePairContactPtr contact)
const agxCollide::ParticleGeometryContactVector & getParticleGeometryContacts() const
Returns the particle-geometry contacts in the internal soil simulation.
A terrain model based a 3D grid model with overlapping height field that can be deformed by interacti...
Representation of a name string.
Pointer to a entity instance of type Physics.Geometry.
Pointer to a entity instance of type Physics.GranularBody.
Pointer to a entity instance of type Physics.ParticleGeometryContact.
Pointer to a entity instance of type Physics.ParticlePairContact.
Base class providing referencing counted objects.
Vector containing 'raw' data.
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()
The agxTerrain namespace contains a 3D model for a dynamic deformable Terrain and related classes.
agx::Physics::GranularBodyPtrArray SoilParticleArray
agx::Physics::GranularBodyPtrVector SoilParticleVector
The agx namespace contains the dynamics/math part of the AGX Dynamics API.