I am trying to use box2d in openframeworks (http://www.openframeworks.cc) and have a couple of questions.
1) Do we need to implement a contact listener for every simulation where things collide? Or can it work without?
2) In open frameworks the drawing loop is implemented with 3 functions, namely:
a) a setup() where things are initialised
b) an update() where things are calculated
c) a draw()where things are drawn
So, in setup() I would initialise the world and all the contents, in update() i would have to do the world step
and in draw() i would need to query objects and draw them (using openframeworks for the drawing)
But from the little I understand of Box2d it seems that the drawing (debugdraw?) is called within the world step.
Would I need to change the box2d library, in order for this to work?
I am really lost here....
Any help is really needed and appreciated..
N.
1) Do we need to implement a contact listener for every simulation where things collide? Or can it work without?
2) In open frameworks the drawing loop is implemented with 3 functions, namely:
a) a setup() where things are initialised
b) an update() where things are calculated
c) a draw()where things are drawn
So, in setup() I would initialise the world and all the contents, in update() i would have to do the world step
and in draw() i would need to query objects and draw them (using openframeworks for the drawing)
But from the little I understand of Box2d it seems that the drawing (debugdraw?) is called within the world step.
Would I need to change the box2d library, in order for this to work?
I am really lost here....
Any help is really needed and appreciated..
N.