Hello,
I am using a JInternalFrame to hold a GLJPanel. In this GLPanel is a plotted graph. I have implemented recenetring capabilities within the GLJPanel. When the user clicks a location in the graph it recenters around that point. I use a mouse event ‘e’ and use e.getX() and e.getY() to get the location clicked. Then I do the proper calculations on variable translateX_ and translateY_ to perform this recentering. The problem is it does not recentering exactly. Now I know my calculations are correct. A description of the problem is as I click further away from the actual center on the graph, the worse the recentering is. So if I click relatively close to the actual center, it recenters fine. So it is a affect by how far in the x and y plane I click from the actual. In this GLJPanel I also have two GLJPanels that are the X and Y axis. I know the dimension of these and this affects my plotting. I need to offset the widths of the axis when computing the coordinates to plot of the actual graph. I was wondering if anyone knew any reason why as I click further and further away from the graph, does worse my recentering is. Could it be a problem with the units, (mouse event click reading vs. GLJPanel dimensions. Please does anyone have any ideas what I can tlook into myself to fix this problem.
Confesor