How to get a fixture's Shape's points from a Body* ?

Hey i'm trying to integrate Box2D and SFML, and my class takes in a Body pointer, which i need to use to get all the points of a fixture so i can form a graphical representation of the body out of them.

How do i get these points?
You can iterate over the fixtures in a body like this:
Code:
for (b2Fixture* f = body->GetFixtureList(); f; f = f->GetNext())
{
    ....
}

Once you have a fixture you will need to check what kind of shape it has, then cast to that shape type to access the shape data:
Code:
b2Shape::Type shapeType = fixture->GetType();
if ( shapeType == b2Shape::e_circle )
{
    b2CircleShape* circleShape = (b2CircleShape*)fixture->GetShape();
    ...
}
else if ( shapeType == b2Shape::e_polygon )
{
    b2PolygonShape* polygonShape = (b2PolygonShape*)fixture->GetShape();
    ....
}

For polygon shapes you can use GetVertexCount() and GetVertex() to get the vertices.
For loop shapes, GetCount() and GetVertices().
For edge shapes, m_vertex1 and m_vertex2.
Remember to transform these by the body's transform to get them in world coords.
Thanks! are you on stack overflow too? If so could you take a look at this question also?:
http://stackoverflow.com/questions/6621196/how-to-set-centers-of-shapes-fixtures-bodies-in-box2d

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