To my mind, it makes sense that contactTest should include filtering, but that contactTestPair should not: it seems to me that calling contactTestPair implies that the objects should be allowed to collide, and thus that filtering is not called for; one assumes that if the pair should not collide (as in the case in which they are filtered out) then the user would simply not call contactTestPair.
The only situation that occurs to me that provides a counter-argument is the case in which pairs are produced procedurally, as in an iterative situation, and thus in which pairs may come up that haven’t been specifically considered. In this case, however, I think that I’m content for filtering to be the responsibility of the user, since the business of producing pairs to test is already being handled by the user.
In the case of contactTest, however, the object in question is tested against everything else, and so it makes more sense to me that filtering be included–or, better yet, be optional, as you suggest.
On another matter (and my apologies if I’m starting to become a pest with regards to Bullet ^^; ), am I correct in believing that calling “setGravity” on a RigidBodyNode should override the effect of the gravity vector set in BulletWorld? That, in other words, I could call “world.setGravity(Vec3(0, 0, -9))”, then “someRigidBody.setGravity(Vec3(0, 0, 0))” and then have all objects except that last one fall? If so, then something odd is happening on my end: calling “setGravity” on my object doesn’t seem to have much effect, if any.