I’m having trouble to properly design an interface to move a point in 3d.
I created a simple code to illustrate my problem.
The idea is that I have an ofVec3f called position, and I want three 2dPads to modify its XYZ. Until now I was using copies of that position in the pads, but every time one pad changed I have to manually update the other pads.
Now I thought that the smartest way would be to pass a pointer to the pad so that I don’t have to refresh the pads every time, and since my program is changing the variable in many places it would be a very bad design to keep copying and updating the same variable so many times.
Now the problem comes when I try to use that reference. First of all my experience with pointers is very little, so I don’t know how that would look like. And then I also have been looking at the 2dPad code and it doesn’t seem to be ready to do what I want to do…
Anybody could give me some advice on how what directions should I take?
here you can have a look at the code… it is very simple.
src.zip (1.5 KB)