[vtkusers] vtkInteractorStyle

David Gobbi dgobbi at irus.rri.on.ca
Thu Oct 26 14:24:22 EDT 2000


Hi Steve,

You should be able to do all of this by subclassing 
vtkInteractorStyleSwitch (or by directly subclassing vtkInteractorStyle).
This is only possible from C++, but it shouldn't be too much of a hassle -
just override OnMouseMove() etc.  Using vtkInteractorStyleUser for this
kind of stuff is probably messier than creating a new InteractorStyle
class.

The way that the vtkInteractorStyleUser is set up, when UserInteraction
is on, you have to provide your own code for _all_ user interaction.
This might change in the future.

 - David

--
  David Gobbi, MSc                    dgobbi at irus.rri.on.ca
  Advanced Imaging Research Group
  Robarts Research Institute, University of Western Ontario

On Thu, 26 Oct 2000, Steve Woolsey wrote:

> I have been trying to figure out a method of doing what I need for the
> interactor, but can't seem to figure it out.
> The app I am developing has the following requirements:
> 
> 1. Rubberband region zooming
> 2. Mouse over actor events (needs to show the name of the object when
> the mouse is moved over the actor)
> 3. Have pan and picking still work.
> 3. Must be in C++
> 
> So I have been looking at TkInteractor.tcl for the rubberbanding and
> have it working.  The question I have is how to do the mouse over
> event.  I am using vtkInteractorUser and it seems I can only do the
> mouse over event by calling StartUserInteraction, but if I do that then
> panning and picking won't work.  Is there a way to have both
> functionalities without having to code a whole new style of Interactor?
> 
> Any help would be greatly appreciated.
> 
> Steve
> 
> -------------------------------------------------------------------
> Steven Woolsey                         Engineer/Scientist
> Bechtel BWXT Idaho, LLC                Visualization Engineer
> Idaho National Engineering Lab.        EMAIL: woolsr at inel.gov
> P.O. Box 1625, M.S. 3605
> Idaho Falls, ID  83415-3605
> -------------------------------------------------------------------





More information about the vtkusers mailing list