51 class ParticleStorageListener :
public agxData::EntityStorage::EventListener
55 ParticleStorageListener(SimulationAddEventListener& listener);
70 SimulationAddEventListener& m_listener;
78 SimulationAddEventListener();
83 size_t getNumberOfCreatedNss()
const;
89 size_t getNumberOfCreatedParticles()
const;
95 size_t getNumberOfActiveNss()
const;
101 size_t getNumberOfActiveParticles()
const;
106 bool getEnableParticleCreation();
116 bool hasReachedActiveNssLimit()
const;
121 bool hasReachedEmittedNssLimit()
const;
126 bool hasReachedActiveParticlesLimit()
const;
131 bool hasReachedEmittedParticlesLimit()
const;
137 bool isGranularBlocked();
142 size_t getMaxNumberOfActiveParticles()
const;
147 size_t getMaxNumberOfEmittedParticles()
const;
152 size_t getMaxNumberOfActiveNss()
const;
157 size_t getMaxNumberOfEmittedNss()
const;
162 void setMaxNumberOfActiveParticles(
size_t max);
167 void setMaxNumberOfEmittedParticles(
size_t max);
172 void setMaxNumberOfActiveNss(
size_t max);
177 void setMaxNumberOfEmittedNss(
size_t max);
179 virtual void addNotification()
override;
181 virtual void removeNotification()
override;
187 static agxSDK::SimulationAddEventListener* getListener(
agxSDK::Simulation* simulation);
206 virtual ~SimulationAddEventListener();
214 void removeGranularParticle();
227 bool updateLicenseLimit();
229 bool hasLicenseLimitations();
231 void setLicenseLimit(
size_t max,
const std::string& limitName,
size_t& limitValue);
233 void resetCounters();
237 size_t m_numberEmittedBodies;
238 size_t m_numberActiveBodies;
239 size_t m_numberEmittedGranularParticles;
240 size_t m_numberActiveGranularParticles;
242 size_t m_maxEmittedPartcles;
243 size_t m_maxActivePartcles;
244 size_t m_maxEmittedNss;
245 size_t m_maxActiveNss;
259 ParticleStorageListener m_particleStorageListener;
263 bool m_doResetCounters;
268 return !getEnableNss() || !getEnableParticleCreation();
271 AGX_FORCE_INLINE size_t SimulationAddEventListener::getNumberOfCreatedNss()
const 273 return m_numberEmittedBodies;
276 AGX_FORCE_INLINE size_t SimulationAddEventListener::getNumberOfCreatedParticles()
const 278 return m_numberEmittedGranularParticles;
281 AGX_FORCE_INLINE size_t SimulationAddEventListener::getNumberOfActiveNss()
const 283 return m_numberActiveBodies;
286 AGX_FORCE_INLINE size_t SimulationAddEventListener::getNumberOfActiveParticles()
const 288 return m_numberActiveGranularParticles;
291 AGX_FORCE_INLINE size_t SimulationAddEventListener::getMaxNumberOfActiveParticles()
const 293 return m_maxActivePartcles;
296 AGX_FORCE_INLINE size_t SimulationAddEventListener::getMaxNumberOfEmittedParticles()
const 298 return m_maxEmittedPartcles;
301 AGX_FORCE_INLINE size_t SimulationAddEventListener::getMaxNumberOfActiveNss()
const 303 return m_maxActiveNss;
306 AGX_FORCE_INLINE size_t SimulationAddEventListener::getMaxNumberOfEmittedNss()
const 308 return m_maxEmittedNss;
Vec3T< T > max(const Vec3T< T > &lhs, const Vec3T< T > &rhs)
Data storage for a collection of entity instances of a specified EntityModel.
A component is an object containing other objects, enabling hierarchical structuring.
#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)
Type-specific Array used for fast access into the data held by a Buffer.
A basic particle system that contains all the storages and buffers required for basic operation and a...
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Templated callback with one argument.
The rigid body class, combining a geometric model and a frame of reference.
Templated callback with two arguments.
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
#define DOXYGEN_END_INTERNAL_BLOCK()
#define DOXYGEN_START_INTERNAL_BLOCK()
agx::Object is a refcounted object with a name.