[vtkusers] Re: mouse control rotation (following the last email)

Goodwin Lawlor goodwin.lawlor at ucd.ie
Wed Oct 26 06:55:29 EDT 2005


Krista Lam wrote:
> I'm using Tcl/tk programming.
> 
> Dear all,
> 
> Is anyone know how to change the way of rotation when we press
> the left mouse button? I would like the rotation rotating only with
> respect to x-axis when I press the mouse button, how to do that? Thanks
> very much.
> 
> Best Regards,
> Yee

Hi Yee,

Have a look at Examples\GUI\Tcl\CustomInteraction.tcl

Comment out "$camera Azimuth [expr ($lastX - $x)]" in the rotate proc 
and you'll contrain the camera motion.

hth

Goodwin




More information about the vtkusers mailing list