|
AGX Dynamics 2.41.1.2
|
This is a sensor class that can be attached to an geometry in the simulation. More...
#include <EventSensor.h>
Inheritance diagram for agxControl::EventSensor:Classes | |
| struct | ContactInformation |
| class | EventPrioHolder |
| class | GeometryContactEventListener |
| struct | ParticleContactInformation |
| Placeholder for information regarding the particle contacts. More... | |
| class | ParticleContactListener |
Public Member Functions | |
| EventSensor () | |
| Default constructor. | |
| EventSensor (agxCollide::Geometry *geometry) | |
| Constructor that takes the geometry to couple the sensor too. | |
| EventSensor (agxCollide::Geometry *geometry, int priority) | |
| Constructor that takes the geometry to couple the sensor too. | |
| EventSensor (int priority) | |
| This constructor takes the priority of the internal contact sensors. | |
| void | addGroup (agx::UInt32 group) |
| void | addGroup (const agx::Name &group) |
| Functions for adding and removing collision groups. | |
| virtual void | addNotification () override |
| This will execute when the sensor is inserted in the simulation. | |
| bool | addSensorEvent (SensorEvent *sEvent, int priority=0) |
| Sets a sensor event to the sensor with a priority. | |
| AGXSTREAM_DECLARE_SERIALIZABLE_BASE (agxControl::EventSensor) | |
| bool | containsSensorEvent (SensorEvent *sEvent) |
| Checks if a sensor event already exists in the sensor. | |
| int | getCollisionMask () |
| agx::UInt32Vector | getContactingParticleIds () |
| bool | getEnableBlocker () |
| agxCollide::Geometry * | getGeometry () |
| Get the geometry of the sensor. | |
| agxCollide::Geometry * | getGeometry () const |
| agx::Real | getNumParticleParticleContactsInSensor () |
| agx::Real | getNumParticlesInSensor () const |
| agx::UInt | getNumRemovedBodies () const |
| agx::UInt | getNumRemovedParticles () const |
| const ParticlePairContactVector & | getParticlePairContactsInSensor () |
| Returns the current particle-particle contacts in the sensor geometry. | |
| agx::UInt32Vector | getParticlesInsideSensor () |
| agx::Real | getRemovedBodyMass () const |
| agx::Real | getRemovedParticleMass () const |
| agx::UInt32Vector | getRemovedParticles () |
| Get the particles removed by this sensor during the last timestep. | |
| agx::RigidBodyPtrVector | getRigidBodiesInsideSensor (bool onlyRigidBodyDEM=false) |
| SensorEvent * | getSensorEvent (const agx::Uuid &uuid) |
| Returns a sensor event with the given uuid if there exists one in the sensor. | |
| SensorEventVector | getSensorEvents () |
| Returns the SensorEvents currently active in the Sensor in the order of execution priority. | |
| agx::Real | getTotalRemovedMass () const |
| int | getTriggerFlag () |
| bool | hasGroup (agx::UInt32 group) |
| bool | hasGroup (const agx::Name &group) |
| bool | hasOnlyReference () |
| Checks if the sensor keeps the only reference to its internal contact listener. Used in unittest. | |
| bool | isForbiddenGeometry (agxCollide::Geometry *geom) |
| Check if the geometry is marked as forbidden by a sensor in this time step. | |
| bool | isForbiddenParticle (agx::UInt32 particle) |
| Check if the particle is marked as forbidden by a sensor in this time step. | |
| virtual void | post (const agx::TimeStamp &time) override |
| Called after a step is taken in the simulation Implement this method in the derived class to get callbacks. | |
| virtual void | pre (const agx::TimeStamp &time) override |
| Called before a step is taken in the simulation Implement this method in the derived class to get callbacks. | |
| virtual void | preCollide (const agx::TimeStamp &time) override |
| Called before collision detection is performed in the simulation Implement this method in the derived class to get callbacks. | |
| void | removeAllGroups () |
| void | removeGroup (agx::UInt32 group) |
| void | removeGroup (const agx::Name &group) |
| virtual void | removeNotification () override |
| This function will execute when the sensor is removed form the simulation. | |
| bool | removeSensorEvent (SensorEvent *sEvent) |
| Removes a sensor event in the sensor. | |
| void | setCollisionMask (int mask) |
| Set/get the collision mask for the sensor. | |
| void | setEnableBlocker (bool isBlocker) |
| Set the sensor to block the contact from other sensors. | |
| void | setGeometry (agxCollide::Geometry *geometry) |
| Sets the geometry of the sensor. | |
| void | setTriggerFlag (int flag) |
| Set/get the trigger flag to control when the events will be executed during the time-step of contact detection. | |
| bool | wasParticleRemovedBySensor (agx::UInt32 particle) |
| Check if the particle has been marked as removed by any of the sensor's operations. | |
| bool | wasRigidBodyRemovedBySensor (agx::UInt32 rigidBody) |
| Check if the particle has been marked as removed by any of the sensor's operations. | |
Public Member Functions inherited from agxSDK::StepEventListener | |
| StepEventListener (int mask=DEFAULT) | |
| Default constructor, sets the default activation mask to all (POST_STEP and PRE_STEP) events. | |
| AGXSTREAM_DECLARE_SERIALIZABLE_BASE (agxSDK::StepEventListener) | |
| virtual void | last (const agx::TimeStamp &time) |
| Called after a step is taken in the simulation Implement this method in the derived class to get callbacks. | |
| virtual void | post (const agx::TimeStamp &time) |
| Called after a step is taken in the simulation Implement this method in the derived class to get callbacks. | |
| virtual void | pre (const agx::TimeStamp &time) |
| Called before a step is taken in the simulation Implement this method in the derived class to get callbacks. | |
| virtual void | preCollide (const agx::TimeStamp &time) |
| Called before collision detection is performed in the simulation Implement this method in the derived class to get callbacks. | |
| virtual void | setMask (int mask) override |
| Specifies a bitmask which determines which event types will activate this listener. | |
Public Member Functions inherited from agxSDK::EventListener | |
| virtual void | addNotification () |
| Called when this listener is added to the simulation. | |
| AGXSTREAM_DECLARE_SERIALIZABLE_BASE (agxSDK::EventListener) | |
| int | getMask () const |
| agx::UInt32 | getPriority () const |
| Simulation * | getSimulation () |
| const Simulation * | getSimulation () const |
| Type | getType () const |
| bool | isEnabled () const |
| virtual void | removeNotification () |
| Called when this listener is removed from the simulation. | |
| void | setEnable (bool enable) |
| Specify whether the listener should react at all at events. | |
| virtual void | setMask (int f) |
| Specifies a bit mask which determines which event types that will activate this listener. | |
Public Member Functions inherited from agx::Component | |
| Component (const agx::Name &name=agx::Name(), agx::Model *model=agx::Component::ClassModel(), agx::Device *device=nullptr) | |
| virtual void | addObject (agx::Object *object, bool assignContext=true) |
| Add an object to the component. | |
| virtual String | autoComplete (const String &partialName, StringVector &matchingNames) const |
| virtual void | buildNavigationTree (agxJson::Value &eNode) const override |
| void | configure (Model *model) |
| virtual void | configure (TiXmlElement *eComponent) override |
| agx::Device * | getDevice () |
| template<typename T > | |
| T * | getDevice () |
| const agx::Device * | getDevice () const |
| template<typename T > | |
| const T * | getDevice () const |
| size_t | getNumObjects (const agx::Name &name) const |
| agx::Object * | getObject (const agx::Name &name, agx::Model *model, size_t index=0) |
| const agx::Object * | getObject (const agx::Name &name, agx::Model *model, size_t index=0) const |
| agx::Object * | getObject (const agx::Name &name, size_t index=0) |
| template<typename T > | |
| T * | getObject (const agx::Name &name, size_t index=0) |
| const agx::Object * | getObject (const agx::Name &name, size_t index=0) const |
| template<typename T > | |
| const T * | getObject (const agx::Name &name, size_t index=0) const |
| const agx::ObjectRefVector & | getObjects () const |
| template<typename T > | |
| void | getObjects (agx::ObjectPtrVector &result, bool recursive=false) const |
| void | getObjects (agx::ObjectPtrVector &result, const agx::Model *model, bool recursive=false) const |
| virtual Object * | getResourceImpl (const Path &path, agx::Model *model) override |
| virtual void | printSubtree () const override |
| void | printSubtree (std::ostream &stream, int depth=0) const |
| virtual void | rebind () override |
| void | removeAllObjects () |
| Remove all components. | |
| virtual void | removeObject (agx::Object *object) |
| Remove an object from the component. | |
| void | removeObject (const agx::Name &name, size_t index=0) |
| Remove an object with a specified name (and optional index) from the component. | |
| virtual void | snapshot (TiXmlNode *eParent, const String &directory) const override |
| void | traverse (ComponentVisitor *) |
| void | traverse (const TraverseCallback &callback) |
Public Member Functions inherited from agx::Object | |
| Object (const Name &name=Name(), Model *model=Object::ClassModel()) | |
| void | addListener (EventListener *listener) |
| virtual void | buildNavigationTree (agxJson::Value &eNode) const |
| virtual void | configure (TiXmlElement *) |
| agx::String | fullName () const |
| agx::String | fullPath () const |
| agx::String | fullPath (const agx::Object *root) const |
| template<typename T > | |
| T * | getAutoScopedResource (const agx::Path &path) |
| template<typename T > | |
| const T * | getAutoScopedResource (const agx::Path &path) const |
| agx::Object * | getAutoScopedResource (const agx::Path &path, agx::Model *model=nullptr) |
| const agx::Object * | getAutoScopedResource (const agx::Path &path, agx::Model *model=nullptr) const |
| agx::Object * | getContext () |
| template<typename T > | |
| T * | getContext () |
| const agx::Object * | getContext () const |
| template<typename T > | |
| const T * | getContext () const |
| agx::UInt32 | getId () const |
| const agx::Name & | getImplementationName () const |
| agx::Model * | getModel () |
| const agx::Model * | getModel () const |
| const agx::Name & | getName () const |
| agx::Object * | getNextSibling () |
| const agx::Object * | getNextSibling () const |
| agx::Path | getPath () const |
| agx::Path | getPath (const agx::Object *root) const |
| template<typename T > | |
| T * | getResource (const agx::Path &path) |
| template<typename T > | |
| const T * | getResource (const agx::Path &path) const |
| agx::Object * | getResource (const agx::Path &path, agx::Model *model=nullptr) |
| const agx::Object * | getResource (const agx::Path &path, agx::Model *model=nullptr) const |
| virtual agx::Object * | getResourceImpl (const agx::Path &path, agx::Model *model) |
| agx::Object * | getRootContext () |
| const agx::Object * | getRootContext () const |
| bool | hasListener (EventListener *listener) |
| bool | hasParent (const agx::Object *node) const |
| bool | isUnique () const |
| virtual void | printSubtree () const |
| virtual void | rebind () |
| void | removeListener (EventListener *listener) |
| virtual void | save (TiXmlElement *) const |
| virtual void | setContext (agx::Object *context) |
| void | setId (UInt32 id) |
| void | setModel (agx::Model *model) |
| Set the object model (handled automatically). | |
| void | setName (const agx::Name &name) |
| Set the name of the object. | |
| virtual void | snapshot (TiXmlNode *, const String &) const |
Public Member Functions inherited from agx::Referenced | |
| Referenced () | |
| Default constructor. | |
| Referenced (const Referenced &) | |
| template<typename T > | |
| T * | as () |
| Subclass casting. | |
| template<typename T > | |
| const T * | as () const |
| template<typename T > | |
| T * | asSafe () |
| Safe subclass casting, return nullptr if template type does not match. | |
| template<typename T > | |
| const T * | asSafe () const |
| int | getReferenceCount () const |
| template<typename T > | |
| bool | is () const |
| Subclass test. | |
| Referenced & | operator= (const Referenced &) |
| Assignment operator. Will increment the number of references to the referenced object. | |
| void | reference (void *ptr=nullptr) const |
| Explicitly increment the reference count by one, indicating that this object has another pointer which is referencing it. | |
| void | unreference (void *ptr=nullptr) const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. | |
| void | unreference_nodelete () const |
| Decrement the reference count by one, indicating that a pointer to this object is referencing it. | |
Public Member Functions inherited from agxStream::Serializable | |
| virtual | ~Serializable () |
| Destructor for normal C++ use but hidden from SWIG bindings. | |
| virtual const char * | getClassName () const |
| bool | getEnableSerialization () const |
| bool | getEnableUuidGeneration () |
| agx::UInt32 | getIndex () const |
| This index is given at creation of this object. | |
| virtual StorageAgent * | getStorageAgent () const =0 |
| agx::Uuid | getUuid () const |
| bool | isFinished () const |
| void | setEnableSerialization (bool flag) |
| Set to false to disable serialization of this object. | |
| void | setFinished () |
| Tells this class that it is restored correctly and should not be deleted during destruction of an Archive. | |
| void | setUuid (const agx::Uuid &uuid) |
| Explicitly set a Uuid on a serializable object. | |
Static Public Member Functions | |
| static agxStream::Serializable * | create (agxStream::InputArchive &) |
Static Public Member Functions inherited from agxSDK::StepEventListener | |
| static agxStream::Serializable * | create (agxStream::InputArchive &) |
Static Public Member Functions inherited from agxSDK::EventListener | |
| static agxStream::Serializable * | create (agxStream::InputArchive &) |
Static Public Member Functions inherited from agx::Component | |
| static Component * | _load (TiXmlElement *eComponent, Device *device) |
| static agx::Model * | ClassModel () |
| static Component * | load (const Path &path, const Name &implementation, Device *device, const Path &_namespace=Path()) |
| static Component * | load (const String &path, const Path &_namespace=Path()) |
| static Component * | load (const String &path, Device *device, const Path &_namespace=Path()) |
| static Component * | load (TiXmlElement *eComponent, Device *device) |
Static Public Member Functions inherited from agx::Object | |
| static agx::Model * | ClassModel () |
| static agx::String | generateName (const agx::String &bindPath) |
| static const HashSet< Object * > & | getActiveObjects () |
| static bool | getEnableRebind () |
| Should rebinding be allowed? Right now a global setting. | |
| static Object * | load (const String &path, Device *device, const String &type, const String &attribute, const String &value) |
| template<typename T > | |
| static T * | load (const String &path, Device *device, const String &type, const String &attribute, const String &value) |
| static Object * | load (const String &path, Device *device, const String &type="", size_t instance=0) |
| template<typename T > | |
| static T * | load (const String &path, Device *device, const String &type="", size_t instance=0) |
| static void | load (const String &path, Device *device, ObjectPtrVector &loadedObjects) |
| static Object * | load (TiXmlElement *eObject, Device *device) |
| template<typename T > | |
| static T * | load (TiXmlElement *eObject, Device *device) |
| static TiXmlDocument | openDocument (const String &path) |
| static void | setEnableRebind (bool flag) |
| Sets if rebinding of objects should be allowed (Right now a global setting). | |
Static Public Member Functions inherited from agx::Referenced | |
| template<typename T > | |
| static bool | ValidateCast (const Referenced *object) |
Static Public Member Functions inherited from agxStream::Serializable | |
| static void | setEnableUuidGeneration (bool flag) |
| Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled. | |
Public Attributes | |
| SensorEventList | m_sensorEventList |
| SensorEvents | m_sensorEvents |
Public Attributes inherited from agx::Component | |
| ObjectEvent | addObjectEvent |
| ObjectEvent | removeObjectEvent |
Protected Member Functions | |
| virtual | ~EventSensor () |
| Destructor. | |
| void | clearContactInformation () |
| void | constructSortedEventList () |
| bool | contactIsValid (agxCollide::GeometryContact *cd) |
| void | executeSensorEvents (const agx::TimeStamp &t) |
| agx::RigidBody * | getContactingRigidBody (agxCollide::GeometryContact *cd) const |
| SensorEvent * | getSensorEventFromName (const agx::Name &name) |
| void | init () |
| bool | particleContactIsValid (const agx::TimeStamp &t, agx::Physics::ParticleGeometryContactInstance contact, agx::Physics::ParticleData &particleData, agx::Physics::GeometryData &geometryData) |
| void | refreshParticlesInsideSensorData () |
| void | refreshRigidBodiesInsideSensorData () |
| void | signalGeometryContact (const agx::TimeStamp &t, agxCollide::GeometryContact *cd) |
| void | signalParticleContact (const agx::TimeStamp &t, agx::Physics::ParticleGeometryContactInstance contact, agx::Physics::ParticleData &particleData, agx::Physics::GeometryData &geometryData) |
| void | triggerContactEvents () |
| void | triggerEventAddNotification () |
| void | triggerEvents () |
| void | triggerEventsOnContact (const agx::TimeStamp &t, agxCollide::GeometryContact *cd) |
| void | triggerParticleEvents () |
| void | triggerParticleEventsOnContact (const agx::TimeStamp &t, agx::Physics::ParticleGeometryContactInstance contact, agx::Physics::ParticleData &particleData, agx::Physics::GeometryData &geometryData) |
| void | triggerPostContactHandling () |
| void | tryTriggerEventsOnContact (const agx::TimeStamp &t, agxCollide::GeometryContact *cd) |
| void | tryTriggerParticleEventsOnContact (const agx::TimeStamp &t, agx::Physics::ParticleGeometryContactInstance contact, agx::Physics::ParticleData &particleData, agx::Physics::GeometryData &geometryData) |
| void | updateSensorEvents (const agx::TimeStamp &t) |
Protected Member Functions inherited from agxSDK::StepEventListener | |
| virtual | ~StepEventListener () |
| Destructor. | |
Protected Member Functions inherited from agxSDK::EventListener | |
| EventListener (Type type=UNDEFINED_TYPE) | |
| Default constructor. | |
| virtual | ~EventListener () |
| Destructor. | |
| void | setSimulation (Simulation *simulation) |
| Set the associated simulation for this EventListener. | |
Protected Member Functions inherited from agx::Component | |
| virtual | ~Component () |
| String | expandAutoCompletionMatch (const String &query, const StringVector &matchingNames) const |
| void | setDevice (Device *device) |
Protected Member Functions inherited from agx::Object | |
| virtual | ~Object () |
Protected Member Functions inherited from agx::Referenced | |
| virtual | ~Referenced () |
| Destructor. | |
| void | allocateObserverVector () const |
| void | deleteUsingDeleteHandler () const |
Protected Member Functions inherited from agxStream::Serializable | |
| Serializable () | |
| Default constructor. | |
| Serializable (const Serializable &other) | |
| Copy constructor. | |
| void | generateUuid () |
Protected Attributes | |
| bool | hasComputedParticlePairContactsInSensor |
| Vector that stores particle pair contacts. Will only be computed if the user asks for it (getParticlePairContactsInSensor) | |
| int | m_collisionMask |
| Get the collision mask for the sensor. | |
| GeometryContactEventListenerRef | m_contactListener |
| Listeners that are coupled with the sensor. | |
| agxSDK::CollisionGroupFilterRef | m_filter |
| The collision group filter coupled with the ContactEventListener. | |
| GeometryContactQueue | m_geomContactQueue |
| Queues for the contacts. | |
| agxCollide::Geometry * | m_geometry |
| The coupled geometry of the sensor. | |
| bool | m_geometryCollision |
| bool | m_isBlocker |
| True if the sensor should block the contact from other sensors in the scene under the same timestep. | |
| agx::UInt | m_numRemovedBodies |
| agx::UInt | m_numRemovedParticles |
| bool | m_particleCollision |
| Flags for doing when there is a collision for a particle or geometry. | |
| ParticleContactListenerRef | m_particleContactListener |
| ParticleContactQueue | m_particleContactQueue |
| ParticlePairContactVector | m_particlePairContacts |
| agx::HashSet< agx::UInt32 > | m_particlesInSensor |
| Holds a set of the current particle id:s that are present in the sensor. | |
| agx::HashSet< agx::UInt32 > | m_particlesInsideSensor |
| Holds a set of the current particle id:s whose midpoint is inside the sensor. | |
| int | m_priority |
| Priority of the sensor over all the other sensors. | |
| agx::HashSet< agx::UInt32 > | m_removedBodies |
| Holds a set of the current particles and bodies that have been marked as removed by an Operation during the time step. | |
| agx::Real | m_removedBodyMass |
| agx::Real | m_removedParticleMass |
| agx::HashSet< agx::UInt32 > | m_removedParticles |
| agx::HashSet< agx::RigidBody * > | m_rigidBodiesContactingSensor |
| Holds pointers to the current rigid bodies (DEM Objects) in the sensor. | |
| agx::HashSet< agx::RigidBody * > | m_rigidBodiesInsideSensor |
| Holds pointers to the current rigid bodies (DEM Objects) where the midpoint is INSIDE the sensor. | |
| int | m_triggerFlag |
| Flag for when the events are supposed to be executed during the time-step. | |
Protected Attributes inherited from agxSDK::EventListener | |
| bool | m_enabled |
| int | m_mask |
| agx::UInt32 | m_priority |
| Type | m_type |
Protected Attributes inherited from agx::Referenced | |
| Mutex | m_mutex |
| ObserverContainer | m_observers |
| AtomicValue | m_refCount |
Static Protected Attributes | |
| static agxCollide::GeometryPtrVector | g_forbiddenGeometries |
| static agx::UInt32Vector | g_forbiddenParticles |
Additional Inherited Members | |
Static Protected Member Functions inherited from agx::Referenced | |
| static DeleteHandler * | getDeleteHandler () |
| static void | setDeleteHandler (DeleteHandler *handler) |
| Internal: Set a DeleteHandler to which deletion of all referenced counted objects will be delegated to. | |
This is a sensor class that can be attached to an geometry in the simulation.
When a collision is detected, according to the set rules of activation for the sensor, it will start to execute SensorEvents in a prioritized order. These sensor events can either modify the simulation or record data.
Definition at line 47 of file EventSensor.h.
|
protected |
Definition at line 70 of file EventSensor.h.
|
protected |
Definition at line 70 of file EventSensor.h.
|
protected |
Definition at line 70 of file EventSensor.h.
|
protected |
Definition at line 71 of file EventSensor.h.
|
protected |
Definition at line 71 of file EventSensor.h.
|
protected |
Definition at line 70 of file EventSensor.h.
|
protected |
Definition at line 71 of file EventSensor.h.
|
protected |
Definition at line 442 of file EventSensor.h.
|
protected |
Definition at line 93 of file EventSensor.h.
|
protected |
Definition at line 93 of file EventSensor.h.
|
protected |
Definition at line 93 of file EventSensor.h.
|
protected |
Definition at line 94 of file EventSensor.h.
|
protected |
Definition at line 94 of file EventSensor.h.
|
protected |
Definition at line 93 of file EventSensor.h.
|
protected |
Definition at line 94 of file EventSensor.h.
|
protected |
Definition at line 441 of file EventSensor.h.
| typedef agx::Vector< agx::Physics::ParticlePairContactPtr > agxControl::EventSensor::ParticlePairContactVector |
Definition at line 50 of file EventSensor.h.
Definition at line 400 of file EventSensor.h.
| typedef std::map<agx::Uuid, EventPrioHolder<SensorEventRef> > agxControl::EventSensor::SensorEvents |
Definition at line 397 of file EventSensor.h.
Definition at line 51 of file EventSensor.h.
Defines the event execution states when the SensorEvents are executed during the timestep of the detected collision with the sensor.
| Enumerator | |
|---|---|
| SENSOR_PRE_STEP | Triggered in a PRE solve/integration step. |
| SENSOR_POST_STEP | Triggered in a POST solve/integration step. |
Definition at line 62 of file EventSensor.h.
| agxControl::EventSensor::EventSensor | ( | ) |
Default constructor.
| agxControl::EventSensor::EventSensor | ( | int | priority | ) |
This constructor takes the priority of the internal contact sensors.
| priority | - Priority of the internal contact listeners |
| agxControl::EventSensor::EventSensor | ( | agxCollide::Geometry * | geometry | ) |
Constructor that takes the geometry to couple the sensor too.
| geometry | The geometry that the sensor will register all the contacts from |
| agxControl::EventSensor::EventSensor | ( | agxCollide::Geometry * | geometry, |
| int | priority | ||
| ) |
Constructor that takes the geometry to couple the sensor too.
All collision on the geometry will be registered by the sensor.
| geometry | The geometry that the sensor will register all the contacts from |
| priority | - Priority of the internal contact listeners |
|
protectedvirtual |
Destructor.
| void agxControl::EventSensor::addGroup | ( | agx::UInt32 | group | ) |
| void agxControl::EventSensor::addGroup | ( | const agx::Name & | group | ) |
Functions for adding and removing collision groups.
|
overridevirtual |
This will execute when the sensor is inserted in the simulation.
It will add its contactListeners for particles and geometries.
Reimplemented from agxSDK::EventListener.
| bool agxControl::EventSensor::addSensorEvent | ( | SensorEvent * | sEvent, |
| int | priority = 0 |
||
| ) |
Sets a sensor event to the sensor with a priority.
| sEvent | The SensorEvent |
| priority | The priority of the SensorEvent |
| agxControl::EventSensor::AGXSTREAM_DECLARE_SERIALIZABLE_BASE | ( | agxControl::EventSensor | ) |
|
protected |
|
protected |
|
protected |
| bool agxControl::EventSensor::containsSensorEvent | ( | SensorEvent * | sEvent | ) |
Checks if a sensor event already exists in the sensor.
| sEvent | The SensorEvent to be checked |
|
inlinestatic |
Definition at line 348 of file EventSensor.h.
|
protected |
| int agxControl::EventSensor::getCollisionMask | ( | ) |
| agx::UInt32Vector agxControl::EventSensor::getContactingParticleIds | ( | ) |
|
protected |
| bool agxControl::EventSensor::getEnableBlocker | ( | ) |
| agxCollide::Geometry * agxControl::EventSensor::getGeometry | ( | ) |
Get the geometry of the sensor.
| agxCollide::Geometry * agxControl::EventSensor::getGeometry | ( | ) | const |
| agx::Real agxControl::EventSensor::getNumParticleParticleContactsInSensor | ( | ) |
| agx::Real agxControl::EventSensor::getNumParticlesInSensor | ( | ) | const |
| agx::UInt agxControl::EventSensor::getNumRemovedBodies | ( | ) | const |
| agx::UInt agxControl::EventSensor::getNumRemovedParticles | ( | ) | const |
| const ParticlePairContactVector & agxControl::EventSensor::getParticlePairContactsInSensor | ( | ) |
Returns the current particle-particle contacts in the sensor geometry.
| agx::UInt32Vector agxControl::EventSensor::getParticlesInsideSensor | ( | ) |
| agx::Real agxControl::EventSensor::getRemovedBodyMass | ( | ) | const |
| agx::Real agxControl::EventSensor::getRemovedParticleMass | ( | ) | const |
| agx::UInt32Vector agxControl::EventSensor::getRemovedParticles | ( | ) |
Get the particles removed by this sensor during the last timestep.
| agx::RigidBodyPtrVector agxControl::EventSensor::getRigidBodiesInsideSensor | ( | bool | onlyRigidBodyDEM = false | ) |
| SensorEvent * agxControl::EventSensor::getSensorEvent | ( | const agx::Uuid & | uuid | ) |
Returns a sensor event with the given uuid if there exists one in the sensor.
|
protected |
| SensorEventVector agxControl::EventSensor::getSensorEvents | ( | ) |
Returns the SensorEvents currently active in the Sensor in the order of execution priority.
| agx::Real agxControl::EventSensor::getTotalRemovedMass | ( | ) | const |
| int agxControl::EventSensor::getTriggerFlag | ( | ) |
| bool agxControl::EventSensor::hasGroup | ( | agx::UInt32 | group | ) |
| bool agxControl::EventSensor::hasGroup | ( | const agx::Name & | group | ) |
| bool agxControl::EventSensor::hasOnlyReference | ( | ) |
Checks if the sensor keeps the only reference to its internal contact listener. Used in unittest.
|
protected |
| bool agxControl::EventSensor::isForbiddenGeometry | ( | agxCollide::Geometry * | geom | ) |
Check if the geometry is marked as forbidden by a sensor in this time step.
| bool agxControl::EventSensor::isForbiddenParticle | ( | agx::UInt32 | particle | ) |
Check if the particle is marked as forbidden by a sensor in this time step.
|
protected |
|
overridevirtual |
Called after a step is taken in the simulation Implement this method in the derived class to get callbacks.
| time | - the current simulation time |
Reimplemented from agxSDK::StepEventListener.
|
overridevirtual |
Called before a step is taken in the simulation Implement this method in the derived class to get callbacks.
| time | - the current simulation time |
Reimplemented from agxSDK::StepEventListener.
|
overridevirtual |
Called before collision detection is performed in the simulation Implement this method in the derived class to get callbacks.
| time | - the current simulation time |
Reimplemented from agxSDK::StepEventListener.
|
protected |
|
protected |
| void agxControl::EventSensor::removeAllGroups | ( | ) |
| void agxControl::EventSensor::removeGroup | ( | agx::UInt32 | group | ) |
| void agxControl::EventSensor::removeGroup | ( | const agx::Name & | group | ) |
|
overridevirtual |
This function will execute when the sensor is removed form the simulation.
It removes the sensor's contact event listeners from the simulation.
Reimplemented from agxSDK::EventListener.
| bool agxControl::EventSensor::removeSensorEvent | ( | SensorEvent * | sEvent | ) |
Removes a sensor event in the sensor.
| sEvent | The SensorEvent to be removed |
| void agxControl::EventSensor::setCollisionMask | ( | int | mask | ) |
Set/get the collision mask for the sensor.
This will determine what type of contacts that it will listen to
| void agxControl::EventSensor::setEnableBlocker | ( | bool | isBlocker | ) |
Set the sensor to block the contact from other sensors.
This will block the other sensors in the scene from detecting and responding to this contact under the rest of the time-step
| void agxControl::EventSensor::setGeometry | ( | agxCollide::Geometry * | geometry | ) |
Sets the geometry of the sensor.
| void agxControl::EventSensor::setTriggerFlag | ( | int | flag | ) |
Set/get the trigger flag to control when the events will be executed during the time-step of contact detection.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| bool agxControl::EventSensor::wasParticleRemovedBySensor | ( | agx::UInt32 | particle | ) |
Check if the particle has been marked as removed by any of the sensor's operations.
| bool agxControl::EventSensor::wasRigidBodyRemovedBySensor | ( | agx::UInt32 | rigidBody | ) |
Check if the particle has been marked as removed by any of the sensor's operations.
|
staticprotected |
Definition at line 57 of file EventSensor.h.
|
staticprotected |
Definition at line 58 of file EventSensor.h.
|
protected |
Vector that stores particle pair contacts. Will only be computed if the user asks for it (getParticlePairContactsInSensor)
Definition at line 555 of file EventSensor.h.
|
protected |
Get the collision mask for the sensor.
Definition at line 511 of file EventSensor.h.
|
protected |
Listeners that are coupled with the sensor.
Definition at line 524 of file EventSensor.h.
|
protected |
The collision group filter coupled with the ContactEventListener.
Definition at line 517 of file EventSensor.h.
|
protected |
Queues for the contacts.
Definition at line 520 of file EventSensor.h.
|
protected |
The coupled geometry of the sensor.
Definition at line 514 of file EventSensor.h.
|
protected |
Definition at line 552 of file EventSensor.h.
|
protected |
True if the sensor should block the contact from other sensors in the scene under the same timestep.
Definition at line 548 of file EventSensor.h.
|
protected |
Definition at line 545 of file EventSensor.h.
|
protected |
Definition at line 544 of file EventSensor.h.
|
protected |
Flags for doing when there is a collision for a particle or geometry.
Definition at line 551 of file EventSensor.h.
|
protected |
Definition at line 525 of file EventSensor.h.
|
protected |
Definition at line 521 of file EventSensor.h.
|
protected |
Definition at line 556 of file EventSensor.h.
|
protected |
Holds a set of the current particle id:s that are present in the sensor.
Definition at line 528 of file EventSensor.h.
|
protected |
Holds a set of the current particle id:s whose midpoint is inside the sensor.
Definition at line 531 of file EventSensor.h.
|
protected |
Priority of the sensor over all the other sensors.
Definition at line 508 of file EventSensor.h.
|
protected |
Holds a set of the current particles and bodies that have been marked as removed by an Operation during the time step.
Definition at line 540 of file EventSensor.h.
|
protected |
Definition at line 543 of file EventSensor.h.
|
protected |
Definition at line 542 of file EventSensor.h.
|
protected |
Definition at line 541 of file EventSensor.h.
|
protected |
Holds pointers to the current rigid bodies (DEM Objects) in the sensor.
Definition at line 534 of file EventSensor.h.
|
protected |
Holds pointers to the current rigid bodies (DEM Objects) where the midpoint is INSIDE the sensor.
Definition at line 537 of file EventSensor.h.
| SensorEventList agxControl::EventSensor::m_sensorEventList |
Definition at line 401 of file EventSensor.h.
| SensorEvents agxControl::EventSensor::m_sensorEvents |
Definition at line 398 of file EventSensor.h.
|
protected |
Flag for when the events are supposed to be executed during the time-step.
Definition at line 505 of file EventSensor.h.