[vtkusers] Dolly
James C. Robinson
j.robinson at kepler-systems.com
Fri Feb 20 10:10:09 EST 2004
Dear All,
I am using the Dolly method (of vtkRenderWindowInteractor) to zoom in and
out. My code looks like this:
if ((chCharCode == 70)||(chCharCode == 102))
{ float dollyvalue = this->Interactor->GetDolly() ;
dollyvalue = sqrt(dollyvalue*dollyvalue) ; // Get rid of sign
if (ShiftKeyDown) this->Interactor->SetDolly(-dollyvalue) ;
else this->Interactor->SetDolly(dollyvalue) ;
}
This code is in the WindowProc method of my View, so I am looking for the
user to hold down "f" (zoom in) or "SHIFT + f" (zoom out) and the camera
should fly in along the view vector. It behaves reasonably unless you keep
"f" pressed and then the view is rotated as you zoom in.
Any ideas?
Jim
______________________
James C. Robinson, PhD,
Chartered Engineer,
Kepler Simulation Systems Ltd.,
Unit 10,
Melbourne Business Park,
Model Farm Road,
Cork,
Eire
Tel: +353-21-4822028
Tel: +353-87-2393010
Fax: +353-21-4822028
E-mail: j.robinson at kepler-systems.com
______________________
More information about the vtkusers
mailing list