[vtk-developers] 3D widgets

Jeff Lee jeff at cdnorthamerica.com
Wed Mar 27 13:37:47 EST 2002


Good stuff!  But what would it take to be able to call these interactors 
from your own event loop?  I would like to be able to use vtkInteractors 
from java, but because they require a vtkRenderWindowInteractor, I can't 
use them.  I have had to duplicate functionality just because I am using 
a wrapper language.  The same goes for tcl/tk and python - most apps 
written in wrapper languages have to re-implement interactors.  Is there 
a clear way to control a vtkRenderWindowInteractor from your own event 
loop i.e. just call iren.MousePressed(...), etc...?
-Jeff

Will Schroeder wrote:

> Hi Folks-
>
> There have been some recent changes (by Bill Hoffman) to VTK to enable 
> 3D widgets (Command/Observer related changes), and I've added one 3D 
> widget (vtkBoxWidget) plus an abstract superclass (vtk3DWidget). A 3D 
> widget is something that you can interact with, it has a 
> representation in the scene, and it usually provides some information 
> that can be used to manipulate other VTK classes. For example, the 
> vtkBoxWidget provides a linear transform (which can be used to control 
> an actor or transform filter) as well as a vtkPlanes implicit function 
> (that can be used for clipping, cutting, etc.).
>
> The changes to Command/Observer allows events to be precessed in 
> priority order, as well as the possibility of aborting event 
> processing. What this means is that you can combine 3D widgets (as 
> many as you want), plus an interactor style (which are now event 
> driven) all running simultaneously. In the case of the vtkBoxWidget, 
> if you select the widget it handles the event and then does an abort 
> (so the interactor does not see it). If you pick outside of the 
> widget, then no abort is called so the interactor sees the event and 
> does its dance.
>
> There is a simple example: Hybrid/Testing/Tcl/TestBoxWidget.tcl that 
> you can play with. I've checked the stuff in to see how it does on the 
> dashboard....once I get the defects out I'll try and figure out how to 
> test the damn thing and move some code into VTK/Examples as well.
>
> Sebastien asked me if the widget works with the pure Tcl interactors: 
> I have no idea. We'll have to look into that.
>
> Comments? Suggestions? before we announce it to the users list?
>
> Will
>
> _______________________________________________
> vtk-developers mailing list
> vtk-developers at public.kitware.com
> http://public.kitware.com/mailman/listinfo/vtk-developers
>
>





More information about the vtk-developers mailing list