17 #ifndef AGXSDK_PROPERTYFILTERS_H 18 #define AGXSDK_PROPERTYFILTERS_H 30 class PropertyContainer;
59 using ExecuteFilter::match;
66 std::string m_property_id[2];
75 #define MATCH_IMPLEMENTATION( TYPENAME, TYPE ) \ 76 int checkMatch( const agx::PropertyContainer* c, size_t numMatch) const \ 85 if ( m_is_set[i] && c && c->getProperty ## TYPENAME ( m_property_id[i], data )) \ 87 match1 = (m_property_data[i] == data) ? ( i ? 1 : -1) : 0; \ 90 } while( !match1 && i < numMatch); \ 94 bool matches(const agx::PropertyContainer* c1, const agx::PropertyContainer* c2) const \ 96 size_t n1 = c1 ? c1->getNumberOfProperties ## TYPENAME () : 0; \ 97 size_t n2 = c2 ? c2->getNumberOfProperties ## TYPENAME () : 0; \ 99 size_t numRequiredMatches = (m_is_set[0] ? 1 : 0) + (m_is_set[1] ? 1 : 0); \ 105 int match1 = 0, match2 = 0; \ 106 match1 = checkMatch( c1, numRequiredMatches ); \ 107 match2 = checkMatch( c2, numRequiredMatches ); \ 109 bool result = (numRequiredMatches == 1 && (match1 || match2) ) || \ 110 (numRequiredMatches == 2 && (match1 && match2) && (match1 != match2) ); \ 122 const std::string& property_id1,
const int64_t& data1);
131 int64_t m_property_data[2];
142 const std::string& property_id1,
const int32_t& data1);
151 int32_t m_property_data[2];
161 const std::string& property_id1,
const float& data1);
171 float m_property_data[2];
182 const std::string& property_id1,
const double& data1);
191 double m_property_data[2];
202 const std::string& property_id1,
const bool& data1);
212 bool m_property_data[2];
222 const std::string& property_id1,
const std::string& data1);
231 std::string m_property_data[2];
239 return matches(c0, c1);
Abstract base class that implements a filter that selects which events should trigger a Listener...
Class for matching bool properties.
Class for matching float properties.
#define AGXPHYSICS_EXPORT
AgXString< std::string > String
bool hasPropertyContainer() const
Class for matching bool properties.
#define MATCH_IMPLEMENTATION(TYPENAME, TYPE)
The geometry representation used by the collision detection engine.
Class that is a container of named properties.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Smart pointer for handling referenced counted objects.
Class for matching Long int properties.
agx::ref_ptr< PropertyFilter > PropertyFilterRef
Class for matching double properties.
agx::PropertyContainer * getPropertyContainer()
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
A class for filtering contacts based on the geometries' properties (as in: their property container)...
Class for matching int properties.