I'll try again. I’m sure I can help you, but I don’t fully understand your question.
The body has a position ( b2Vec2 ) in the world.
The body has b2Fixture (density, friction, restitution, shape , etc.)
b2PolygonShape has vertices and bulk data. These vertices relate to the position of the body.
Vertex examples for b2PolgygonShape (rectangle, size: 1 meter * 1 meter)
(-0.5f, -0.5f) // left upper corner ( 0.5f, -0.5f) // right upper corner ( 0.5f, 0.5f) // right lower corner (-0.5f, 0.5f) // left lower corner
Keep in mind that you cannot set vertices yourself! You must pass them to
b2PolgygonShape::Set(b2Vec2 *vertices, int count);
This method will calculate the mass data depending on the vertices.
Martijn courteaux
source share