In this application I'm creating (a simple Paint like thing) I am having trouble with detecting whether an object (a square, ellipse, photo - all insertable objects are simply classes that derive from a base class, or a subclass of the base class). baseObject defines an abstract method called mouseCollide, returning a boolean. It returns true when the mouse is in the shape when called, false if not. When testing the logic, I factored out translations (namely rotate) but I need to be able to detect collisions when the object is rotated.
The question is: how can I translate absolute coordinates (relative to the window) to coordinates relative to a transformation matrix? Namely, the Mouse X and Y values?