[vtkusers] Re: (no subject)
Goodwin Lawlor
goodwin.lawlor at ucd.ie
Mon Dec 20 06:30:20 EST 2004
Hi fengfenfhsy,
There are some patches for vtkInteractorStyleTrackballCamera here:
http://www.vtk.org/Bug/bug.php?op=show&bugid=1054&pos=3
that will allow what you want in C++.
Call:
style->MousePickingOn();
to get it enabled.
hth
Goodwin
"fengfenghsy" <fengfenghsy at 163.com> wrote in message
news:20041218185210.CBC9134535 at public.kitware.com...
> Hello everyone!
> I have met a problem, which has bothered me for nearly 20 days.
> First look at the following code which used Tcl/Tk:
>
> ##########################################
> vtkInteractorStyleTrackballCamera style
> style AddObserver LeftButtonPressEvent {set MouseMotion 0; style
OnLeftButtonDown}
> style AddObserver MouseMoveEvent {set MouseMotion 1; style
OnMouseMove}
>
> vtkRenderer ren1
> vtkRenderWindow renWin
> renWin AddRenderer ren1
> vtkRenderWindowInteractor iren
> iren SetRenderWindow renWin
> iren SetInteractorStyle style
> ##########################################
>
> vtkInteractorStyleTrackballCamera allows the user to interactively
manipulate (rotate, pan, etc.) the camera, the viewpoint of the scene. In
trackball interaction, the magnitude of the mouse motion is proportional to
the camera motion associated with a particular mouse binding. For example,
small left-button motions cause small changes in the rotation of the camera
around its focal point. For a 3-button mouse, the left button is for
rotation, the right button for zooming, the middle button for panning, and
ctrl + left button for spinning. (With fewer mouse buttons, ctrl + shift +
left button is for zooming, and shift + left button is for panning.)
>
> style AddObserver LeftButtonPressEvent {set MouseMotion 0; style
OnLeftButtonDown}
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~this function could set the variable MouseMotion to 0, and also keep
the old LeftButtonDownPress style.
>
> However if I use the function AddObserver in Visual C++. It`s easy to
set the variable MouseMotion to 0, but hard to keep the OnleftButtonDown
function working. The other two AddObserver function also have the same
problem.
>
> Could someone help me about this problem. Really thank you!
>
> sincerealy
>
> fengfenghsy
> fengfenghsy at 163.com
> 2004-12-19
>
----------------------------------------------------------------------------
----
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
More information about the vtkusers
mailing list