17 #ifndef AGXSDK_COLLISIONGROUPFILTER_H 18 #define AGXSDK_COLLISIONGROUPFILTER_H 83 void removeAllGroups();
127 if (m_geometry ==
nullptr || (geo0 == m_geometry || geo1 == m_geometry))
130 if (m_uintCollisiontGroups.size() <= 0 && m_namedCollisionGroups.size() <= 0)
133 if (m_geometry ==
nullptr)
135 if (hasMemberGroup( geo0 ))
return true;
136 if (hasMemberGroup( geo1 ))
return true;
141 if (hasMemberGroup( collider ))
return true;
150 for (
size_t i = 0; i < m_namedCollisionGroups.size(); i++)
152 if (geom->
hasGroup( m_namedCollisionGroups[i] ))
157 for (
size_t i = 0; i < m_uintCollisiontGroups.size(); i++)
159 if (geom->
hasGroup( m_uintCollisiontGroups[i] ))
agx::Vector< agx::UInt32 > m_uintCollisiontGroups
agx::Vector< agx::Name > getNamedGroups()
Returns the named groups that the filter listens to.
agx::Vector< agx::Name > m_namedCollisionGroups
bool hasMemberGroup(const agxCollide::Geometry *geom) const
Abstract base class that implements a filter that selects which events should trigger a Listener...
#define AGXPHYSICS_EXPORT
agxCollide::Geometry * m_geometry
bool match(const agxCollide::Geometry *geo0, const agxCollide::Geometry *geo1) const override
Called by the other two match functions if they are not overridden.
#define AGX_DECLARE_POINTER_TYPES(type)
Representation of a name string.
virtual bool match(const agxCollide::GeometryContact &gc) const
Called when narrow phase tests have determined overlap (when we have detailed intersection between th...
The geometry representation used by the collision detection engine.
AGXPHYSICS_EXPORT void addGroup(const agx::RigidBody *body, unsigned id)
For the specified body, add the collision group ID to its geometries.
agxCollide::Geometry * getGeometry()
Gets the geometry of the filter.
bool hasGroup(agx::UInt32 id) const
This is performing a linear search among the collision group id for this Geometry.
agx::Vector< agx::UInt32 > getUIntGroups()
Returns the uint groups that the filter listens to.
AGXPHYSICS_EXPORT void removeGroup(const agx::RigidBody *body, unsigned id)
For the specified body, remove the collision group ID to its geometries.
An ExecuteFilter that is used to filter out contacts matching a specified criteria based on Collision...
#define AGX_DECLARE_VECTOR_TYPES(type)
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...