I was thinking of implementing a functionality that lets users undo the zoom and pan operations. Sometimes we hit the zoom to whole cloud extent or do several pan/zoom it would be good if we could just go back to the extent where it was. My idea was to store the camera parameter for the last 10 views and move back and forth between them using "View Previous/View Next" buttons in some toolbar.
Browsing the source, I found the zoom is handled here..
Code: Select all
void ccGLWindow::setZoom(float value)
Code: Select all
void ccGLWindow::setCameraPos(const CCVector3d& P)
The issue that i noticed was that when mousewheel is scrolled, the zoom is activated for each movement of the wheel. For example the user does a huge scroll fast, this method could get called about 10 times in a second like shown below. So something that lets us know that user has not finished his scrolling/panning would be helpful in storing these intermediate values.
Please share your views.
thanks
Vinayan