stephanschulz , thanks a lot.
So, looking at your code, I understand that it is basically keeping track of rotations and translations inside your object (the “manual notify” option I mentioned in my original post)? That is, every time you, say, execute ofTranslate(…) you manually make sure the objects would be aware of it by updating some member variables of these objects, correct?
Hm, even this seems harder than I thought. I can keep a stack of coordinate transformations inside my object, but I can only update it - the stack - when I push/pop matrices and do transforms, which happens in draw(). When I finish draw(), I need to pop those transforms.
But my mouse events are obviously asynchronous so when a mouse click occurs the object already has no idea about what transforms occurred during the draw() stage. Not sure how to get around this elegantly.
Well, for now the only solution I found is to keep track of coordinate transformations stack and manually let all the transformed object know about these transformations.
To resolve the issue I raised in the quote above, I don’t pop the stack with ofPopMatrix (in draw()), instead I initialize the stack each time anew in testApp.cpp’s draw() - that is, the first instance where a coordinate transformation occurs.
This is very awkward but I cannot see a better solution for now…