Image

Imagelupinehunter wrote in Imagecpp

Listens: Dimmu Borgir - Cataclysm Children

OOP

Ok, you have this nice simulator that is developed oop in mind.

And you want to add visualization in it, you want to demonstrate what is going on in some classes.

You will (probably) have a seperate thread that maintains the OpenGL display and stuff like that. But it needs to know about the data on the fly somehow.

What would be the best way to go?:

* Have a global visuzlization class and call its methods in your classes that have the data, in order to let it know about the data.
* Distribute the pointer of this visualization class to your objects with data
* Make the visualization class the "master", by making it friends with other classes or something like that

The first two can spoil the code I think. After all, the simulation does not have to display anyting in the real runs.
What do you think? 3?