Original Post
I'm creating a small terrain editor for fun, but I'm having a problem deciding on where the responsibility for action should lie. I have two classes: heightmap and editorTool. editorTool is a base class from which all the tools in the editro will derive (eg, hill tool, valley tool etc). I'm having trouble implementing the tools without giving them access to the raw heightmap data. The problem with this is that I'm currently using openGL immeadiate mode, and when I change to use vertex arrays, the internal representation of my heightmap will probably change. I could implement each tool to just call a funciton on the heighmap class (like makeHill(), makeValley()), but then I'd need to change the heightmap class every time I add a new tool. Any ideas?