AGX Dynamics 2.38.0.2
Loading...
Searching...
No Matches
GranularModelReductionOperations.h
Go to the documentation of this file.
1/*
2Copyright 2007-2024. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17#ifndef AGXCONTROL_GRANULARMODELREDUCTIONOPERATIONS_H
18#define AGXCONTROL_GRANULARMODELREDUCTIONOPERATIONS_H
19
22
23/*
24This file defines some operations used in conjunction with the granular model reduction
25*/
26namespace agxControl
27{
29 {
30 public:
32
34
36 agxSDK::Simulation* /*simulation*/,
37 agx::Physics::ParticleGeometryContactInstance contact,
38 agx::Physics::ParticleData& particleData,
39 agx::Physics::GeometryData& /*geometryData*/,
40 agxControl::EventSensor* /*sensor*/) override;
41
42 void postContactHandling(agxSDK::Simulation *simulation, EventSensor * sensor) override;
43
45
46 protected:
47 class ParticleStorageListener : public agxData::EntityStorage::EventListener
48 {
50 public:
52
53 virtual void destroyInstanceCallback(agxData::EntityStorage* storage, agxData::EntityPtr instance) override;
55 virtual void destroyInstancesCallback(agxData::EntityStorage* storage, agxData::EntityRange instance) override;
56
58 // Variables
60 protected:
62 };
64
65 protected:
67
69
71
73 // Variables
75 protected:
79 };
80}
81
82#endif
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
#define AGXPHYSICS_EXPORT
A contact between two geometries.
Definition Contacts.h:271
This is a sensor class that can be attached to an geometry in the simulation.
Definition EventSensor.h:48
A specific type of sensor event that triggers a change in the simulation when activated by a contact.
virtual void destroyInstancesCallback(agxData::EntityStorage *storage, agxData::Array< agxData::EntityPtr > instances) override
virtual void destroyInstancesCallback(agxData::EntityStorage *storage, agxData::EntityRange instance) override
virtual void destroyInstanceCallback(agxData::EntityStorage *storage, agxData::EntityPtr instance) override
void postContactHandling(agxSDK::Simulation *simulation, EventSensor *sensor) override
Post function that will be triggered for the event after all the contacts have handled in the operati...
void triggerEvent(const agx::TimeStamp &, agxSDK::Simulation *simulation, agxCollide::GeometryContact *cd, agxControl::EventSensor *sensor) override
Triggers the sensor event by passing contact information.
void triggerParticleEvent(const agx::TimeStamp &, agxSDK::Simulation *, agx::Physics::ParticleGeometryContactInstance contact, agx::Physics::ParticleData &particleData, agx::Physics::GeometryData &, agxControl::EventSensor *) override
Triggers the sensor event by passing particle contact information.
void connectToParticleStorage(agx::ParticleSystem *system)
void singalParticleDestroyed(agx::Index id)
agx::HashSet< agx::Index > m_previousParticleIdsInSensor
SplitSensorOperation(const agx::Name &name=agx::Name())
Accessor to a entity instance stored in a EntityStorage, to allow SOA (structure of arrays) data to b...
Definition EntityPtr.h:52
Data storage for a collection of entity instances of a specified EntityModel.
Only use as member allocated variable.
Definition Value.h:285
Simulation is a class that bridges the collision space agxCollide::Space and the dynamic simulation s...
Definition Simulation.h:126
Inheritance with partial specialization due to bug with ref_ptr containers.
Representation of a name string.
Definition Name.h:33
A basic particle system that contains all the storages and buffers required for basic operation and a...
This namespace contains general operation and action classes which can be used to control a agxSDK::S...
agx::Real TimeStamp
Definition TimeStamp.h:26
UInt32 Index
Definition Integer.h:44