17 #ifndef AGXCONTROL_SENSOROPERATIONS_H 18 #define AGXCONTROL_SENSOROPERATIONS_H 60 agx::Physics::ParticleGeometryContactInstance contact,
61 agx::Physics::ParticleData& particleData,
62 agx::Physics::GeometryData& ,
87 agx::Physics::ParticleGeometryContactInstance ,
88 agx::Physics::ParticleData& ,
89 agx::Physics::GeometryData& ,
123 agx::Physics::ParticleGeometryContactInstance contact,
124 agx::Physics::ParticleData& particleData,
125 agx::Physics::GeometryData& geometryData,
153 void createFileName(
const agx::Name& filePath);
160 agx::Physics::ParticleGeometryContactInstance contact,
161 agx::Physics::ParticleData& particleData,
162 agx::Physics::GeometryData& ,
199 agx::Physics::ParticleGeometryContactInstance contact,
200 agx::Physics::ParticleData& particleData,
201 agx::Physics::GeometryData& geometryData,
227 m_materialName = material;
232 return m_materialName;
256 agx::Physics::ParticleGeometryContactInstance contact,
257 agx::Physics::ParticleData& particleData,
258 agx::Physics::GeometryData& geometryData,
289 bool colorOnSleep =
false,
294 agx::Physics::ParticleGeometryContactInstance contact,
295 agx::Physics::ParticleData& particleData,
296 agx::Physics::GeometryData& geometryData,
324 agx::Physics::ParticleGeometryContactInstance contact,
325 agx::Physics::ParticleData& particleData,
326 agx::Physics::GeometryData& geometryData,
334 void setVelocity(
const agx::Vec3& velocity);
337 void setAngularVelocity(
const agx::Vec3& angularVelocity);
338 const agx::Vec3& getAngularVelocity()
const;
357 m_velocity = velocity;
367 m_angularVelocity = angularVelocity;
372 return m_angularVelocity;
386 agx::Physics::ParticleGeometryContactInstance contact,
387 agx::Physics::ParticleData& particleData,
388 agx::Physics::GeometryData& geometryData,
424 bool cloneTeleportation =
false,
428 void addNotification(
EventSensor * sensor)
override;
437 agx::Physics::ParticleGeometryContactInstance contact,
438 agx::Physics::ParticleData& particleData,
439 agx::Physics::GeometryData& ,
agx::Physics::ParticlePtrVector getParticlesInContact() const
void AGXPHYSICS_EXPORT init()
Initialize AGX Dynamics API including thread resources and must be executed before using the AGX API...
This operation can be used to know when a sensor has been activated by a contact. ...
agx::UInt32 m_samplingStride
This operations removes all the particles in the contact supplied by the sensor.
agx::Name m_completeFilePath
agx::HashTable< agx::Index, agx::Bool > m_handledParticleIds
agx::Vec3 m_angularVelocity
std::ofstream m_outStream
bool m_onlyRemoveEmittedBodies
const agx::Vec3 & getAngularVelocity() const
A class holding 4 dimensional vectors and providing basic arithmetic.
This operation applies a "kinematic state" to particles that collide with the sensor.
agx::Name getMaterialName()
#define AGXPHYSICS_EXPORT
agx::FrameRef m_sourceOffsetFrame
agx::Name & getFilePath()
agx::Physics::ParticlePtrVector m_particlesInContact
virtual void triggerEvent(const agx::TimeStamp &, agxSDK::Simulation *, agxCollide::GeometryContact *, agxControl::EventSensor *) override
Triggers the sensor event by passing contact information.
Representation of a name string.
void setIsExecuted(bool executed)
This is a sensor class that can be attached to an geometry in the simulation.
This sensor operation class sets a speed to the object that collides with the sensor, in both linear and angular direction.
bool m_shouldCloneTeleport
const agx::Vec3 & getVelocity() const
This sensor operation class store particle id's of particles that are in contact with the sensor...
void setMaterialName(const agx::String &material)
agx::UInt32 m_framesSinceLastSampling
agxData::EntityStorageRef m_particleTeleportStorage
ParticleTeleportQueue m_particleSpawnQueue
agx::FrameRef m_targetOffsetFrame
This sensor operation can teleport contacting particles to a target sensor geometry with arbitrary ti...
agx::Real m_sleepSpeedThreshold
void setAngularVelocity(const agx::Vec3 &angularVelocity)
ParticleFreezeMode
Enum describing what mode the operation should be in. If it should freeze or unfreeze particles...
static agxRender::Color Yellow()
agx::FrameRef m_localFrame
agxControl::EventSensor * m_targetSensor
This namespace contains general operation and action classes which can be used to control a agxSDK::S...
This operation dumps particle contact information to a file.
std::pair< agx::TimeStamp, agx::Index > TimeParticleIdPair
The object defining a frame of reference and providing transformations operations.
#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...
This operation removes the rigid body given by the geometry in the contact supplied by the sensor...
agx::Real m_teleportTimeDilation
void setEnableMixColors(bool mixColors)
void setVelocity(const agx::Vec3 &velocity)
virtual void triggerParticleEvent(const agx::TimeStamp &, agxSDK::Simulation *, agx::Physics::ParticleGeometryContactInstance, agx::Physics::ParticleData &, agx::Physics::GeometryData &, agxControl::EventSensor *) override
Triggers the sensor event by passing particle contact information.
A specific type of sensor event that triggers a change in the simulation when activated by a contact...
agx::List< TimeParticleIdPair > ParticleTeleportQueue
bool getEnableMixColors()
Inheritance with partial specialization due to bug with ref_ptr containers.
agx::HashSet< agx::UInt32 > m_previousContactingParticleIds
This operation applies a kinematic "sleep state" to particles inside the sensor that are under a spec...
This operation changes the color of the particles given in the contact.