From: <K.W...@gm...> - 2006-01-17 22:15:24
|
Hello, a few minutes ago I posted two files for the panning feature. Since I made several changes (which I sketch below), I did not post diffs but the whole files. Please tell me if there is a better way to post. In this proposal, I tried to keep the things simple. There is even no pan matrix kept, but rather the center member variable is put back in use. Furthermore, I moved the lastx/y member variables to the clusterdisplay class. They are passed as parameters to gltbZoom and gltbPan. I think this is a good idea since lastx/y stored a mouse state, and the clusterdisplay does also store some mouse state (button and state) -- so why not store it in one place? I also removed gltbMouse from the trackball class for the same reason. And there is a second reason: I suggest removing all glut code from the trackball class, since maybe someday glut might not suffice anymore and then it would be nice to reuse the trackball class. At last, I commented out for clarity some unused code in clusterdisplay.py (but all I changed were the mouse and motion methods.) And I ran a ":%s/;$//g" in vim on the trackball.py, for aesthetical reasons ;-) The scale parameter in trackball.gltbPan needs to be set more carefully, but this requires good knowledge of gluPerspective. If you like the overall proposal, I will look into it. I also tried the 4-D projection feature and it seems work pretty well! It raises if I choose dim 4 on a 3-dimensional data set, though. I also like the script which generates the data. Wouldn't it be nice to use it directly rather than by way of a intermediary data file? Kind regards, Karsten. -- Telefonieren Sie schon oder sparen Sie noch? NEU: GMX Phone_Flat http://www.gmx.net/de/go/telefonie |