Of course! In core I want to simulate the motion of particles around a nuclei or a solar system where couple of sphere rotate another sphere. each planet/particle type has its own mass, position and velocity which are defined within particular class. The velocity and position update of planets/particles are already defined in planet.cpp and there is no need to update them in ofApp.cpp.
In short what I meant with drive is to initiate and carry out the simulation.
I hope this clear things up!?
It sounds very reasonable But I don’t see the connection to FRAME_RATE from your initial example. Do you want the simulation to start as soon as the program starts? Or are you looking for a way to wait for user interaction?
In the first case you can declare the variables in the .h file, maybe initialize them inside setup, calculate motions etc inside update and finally draw everything inside draw.
In the second case, you could have either a boolean that you toggle as response to user interaction, or you could just wait until ofGetFrameNum() is high enough, and then start updating your particles.
Maybe you wanted to use ofGetFrameNum() instdead of ofGetFrameRate() ?
Well my intention is to start the simulation as soon as the app is triggered. And I have done all you have written there but it seems there is still something missing!
Anyway thanks for the suggestions.
Maybe it would be easier if I share the link to the ofApp.cpp and .h files. Basically the surrounding planets supposed to circle the Sun, and when the user changes the slide_bars on gui the program should react accordingly.