Polygon bodies collision

Hello! I'm not quite sure if it's bug or feature. =) I have two poligonal bodies (let's say b1 and b2), which actually are not collide, but theirs AABBs are. So, when i get the list of contacts i have a contact in it with shapes of bodies b1 and b2. In my application, i have to know when bodies collide. And it confused me a lot. After some experiments i've added manifold count check to may contacts-loop and it now looks like that:

Code:
for (b2Contact* c = world->m_contactList; c; c = c->m_next)
{
         if (c->GetManifoldCount() <= 0) continue;
         // check if b1 and b2 collide
         .....
}


Now everithing works greate. So, is it ok that i have contacts with no collision-points in world's contacts list?
This looks right. Sometimes for efficiency and code uniformity I assign null-contacts to shape pairs that shouldn't collide. There is actually a single null contact that is shared and it has zero contact manifolds.

Also, you are guaranteed that if the manifold count is non-zero that there is at least one contact point.

You will also find contacts for shapes that can collide but are not touching. In that case the manifold count is also zero.

Here is the procedure to find shapes that are touching:
- First look for a contact
- If you find a contact, check its manifold count.

I need to document contacts. I'll add this to the TODO list.
Thanks a lot for such a full answer! Looking forward for a complite manual. =)

Original thread: https://box2d.org/forum/viewtopic.php?t=64