17 #ifndef AGX_GRANULARIMPACTANALYSIS_H 18 #define AGX_GRANULARIMPACTANALYSIS_H 68 virtual void onParticleDestroyed(
agx::Index id) = 0;
70 virtual void onParticleCreated(
agx::Index id) = 0;
74 void clearDestroyedParticles();
85 class ParticleStorageListener :
public agxData::EntityStorage::EventListener,
public agx::Referenced 99 virtual ~ParticleStorageListener();
167 virtual void addNotification()
override;
172 virtual void removeNotification()
override;
224 size_t getNumParticlePairImpacts()
const;
227 size_t getNumParticleGeometryImpacts()
const;
229 ImpactDataSimulationWriter& operator=(
const ImpactDataSimulationWriter&) =
delete;
231 virtual ~ImpactDataSimulationWriter();
233 void initParticleBuffers();
IndexHashSet m_destroyedId
Pointer to a entity instance of type Physics.ParticleGeometryContact.
A std::pair, with both elements of the same type, and symmetric so (a, b) == (b, a) ...
agx::Physics::GranularBody::GranularGranularPair ParticlePairKey
Derive from this class to implement a listener for simulation step events.
agx::Physics::ParticleGeometryContactPtr contactPtr
Pointer to a entity instance of type Physics.ParticlePairContact.
agxSDK::Simulation::JournalAttachEvent::CallbackType m_journalAttachedCallback
static const char *const IMPACT_BUFFER
Data storage for a collection of entity instances of a specified EntityModel.
static const char *const ACCUMULATED_IMPACT_BUFFER
#define AGXPHYSICS_EXPORT
Accessor to a entity instance stored in a EntityStorage, to allow SOA (structure of arrays) data to b...
#define AGX_DECLARE_POINTER_TYPES(type)
IndexHashSet getDestroyedParticles() const
Returns the currently destroyed particles registered from the coupled GranularBodySystem.
std::pair< GranularBodyPtr, GeometryPtr > GranularGeometryPair
Type-specific Array used for fast access into the data held by a Buffer.
static const char *const PARTICLEGEOMETRYCONTACT_BUFFER
ParticleGeometryTimeTable m_activeParticleGeometryPairs
Base class providing referencing counted objects.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
agx::Real accumulatedEnergy
agx::Physics::GranularBodySystem * m_system
static const char *const PARTICLEPAIRCONTACT_BUFFER
agx::Physics::ParticlePairContactPtr contactPtr
Particle EventListener that can be inherited and overridden in order to listen to particle events...
ImpactDataSimulationWriterRef m_impactDataSimulationWriter
agxData::EntityStorageRef m_particleGeometryStorage
Templated callback with two arguments.
agxData::EntityStorageRef m_particlePairStorage
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
ParticlePairTimeTable m_activeParticlePairs
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
agxSDK::Simulation * m_simulation
agx::HashTable< agx::Physics::GranularBody::GranularGeometryPair, agx::TimeStamp > ParticleGeometryTimeTable
Inheritance with partial specialization due to bug with ref_ptr containers.
static const char *const CONTACTENERGY_BUFFER
agx::Physics::GranularBody::GranularGeometryPair ParticleGeometryKey
agx::RealVector RealContainer
agx::HashTable< agx::Physics::GranularBody::GranularGranularPair, agx::TimeStamp > ParticlePairTimeTable