Figured it out... This is how you do it:
Code:
for (b2Body* curBody = _world->GetBodyList(); curBody;curBody = curBody->GetNext())
{
b2Vec2 position = curBody->GetPosition();
for (b2Fixture* curFixture = curBody->GetFixtureList(); curFixture;curFixture = curFixture->GetNext())
{
b2Shape* shape = curFixture->GetShape();
if (shape->m_type == b2Shape::Type::e_circle )
{
float radius = shape->m_radius;
// draw circle
}
else if (shape->m_type == b2Shape::Type::e_polygon)
{
//b2Vec2 boxExtents = shape->m_vertices[0];
b2AABB aabb;
shape->ComputeAABB(&aabb, curBody->GetTransform(), 0);
// draw rectangle from the aabb
}
}
i++;
}