Hello, I've been trying to find out how to draw my shapes in box2d. I wanted to convert the HelloWorld program to use an arbitrary polygon (rather than a box) and draw its output. (instead of printing it).
I would guess that you could use Debug Draw, but I'm not sure how to use this outside of the example programs. Could anyone give an example?
Is it possible to use my own drawing commands? - if I could get the positions of all the vertices then I could just draw a line between them. I would like this, since it would make me feel I could easily change the way objects are drawn. The HelloWorld program, only returns a single position (presumably at the origin of the object), and an angle. I know CHipmunk has a GetVerts method that returns all the vertex positions in the shape. Does box2D have one? (I can't find it in the manual).
Thank you.
I would guess that you could use Debug Draw, but I'm not sure how to use this outside of the example programs. Could anyone give an example?
Is it possible to use my own drawing commands? - if I could get the positions of all the vertices then I could just draw a line between them. I would like this, since it would make me feel I could easily change the way objects are drawn. The HelloWorld program, only returns a single position (presumably at the origin of the object), and an angle. I know CHipmunk has a GetVerts method that returns all the vertex positions in the shape. Does box2D have one? (I can't find it in the manual).
Thank you.