ContactFilter class
class ContactFilter { ContactFilter(); /** * Return true if contact calculations should be performed between these two * shapes. */ bool shouldCollide(Fixture fixtureA, Fixture fixtureB) { final Filter filterA = fixtureA.filter; final Filter filterB = fixtureB.filter; if (filterA.groupIndex != 0 && filterA.groupIndex == filterB.groupIndex) return filterA.groupIndex > 0; return (filterA.maskBits & filterB.categoryBits) != 0 && (filterA.categoryBits & filterB.maskBits) != 0; } }
Constructors
new ContactFilter() #
ContactFilter();
Methods
bool shouldCollide(Fixture fixtureA, Fixture fixtureB) #
Return true if contact calculations should be performed between these two shapes.
bool shouldCollide(Fixture fixtureA, Fixture fixtureB) { final Filter filterA = fixtureA.filter; final Filter filterB = fixtureB.filter; if (filterA.groupIndex != 0 && filterA.groupIndex == filterB.groupIndex) return filterA.groupIndex > 0; return (filterA.maskBits & filterB.categoryBits) != 0 && (filterA.categoryBits & filterB.maskBits) != 0; }