[vtk-developers] 3D Widget changes

Will Schroeder will.schroeder at kitware.com
Thu Mar 28 15:52:39 EST 2002


We have been keenly observing and trying to learn from the SciRun, 
OpenInventor, and some of the Brown University work. For example, the 
vtkInteractorStyleUnicam was actually contributed by Andrew Forsberg at 
Brown (see ftp://ftp.cs.brown.edu/pub/papers/graphics/research/unicam.pdf). 
Other than that, the Command/Observer design pattern that Bill Hoffman and 
Ken added are the heart of the whole thing.
Will

At 03:37 PM 3/28/2002 -0500, Lorensen, William E (CRD) wrote:
>Is there some sort of degin document or white paper in the 3d widgets? Do 
>they follow some published
>paradigm?
>
>-----Original Message-----
>From: Will Schroeder [mailto:will.schroeder at kitware.com]
>Sent: Thursday, March 28, 2002 3:33 PM
>To: vtk-developers at public.kitware.com
>Cc: Harihar N Iyer; dean.inglis at on.aibn.com
>Subject: [vtk-developers] 3D Widget changes
>
>
>Hi Folks-
>
>After conferring with the design maestro (Ken) and looking your feedback,
>I've reworked the 3D widgets.
>
>One thing we realized is that these family of things have different
>characteristics: while they all listen for events from
>vtkRenderWindowInteractor, some have a representation in 3D space (and
>require an indication of where to be placed), some may not have a
>representation or may be window based (e.g., probing, selection or
>measuring in the window), and vtkInteractorStyles are actually a type of
>these things and should be part of the framework.
>
>We've added a new superclass: vtkInteractorObserver. It has a
>SetInteractor() method. It observes the keypress and delete events invoked
>by the render window interactor. The keypress activation value for a widget
>is now 'i' (although this can be programmed). vtkInteractorObserver has the
>state ivar Enabled. All subclasses must have the SetEnabled(int) method.
>Convenience methods like On(), Off(), EnabledOn(), and EnabledOff() are
>available. The state of the interactor observer is obtained using
>GetEnabled(). The SetEnabled(1) method adds observers to watch the
>interactor (appropriate to the particular interactor observer) ;
>SetEnabled(0) removes the observers . There are two new events: EnableEvent
>and DisableEvent which are invoked by the SetEnabled() method.
>
>Things that require placement in space (with PlaceWidget()) are subclasses
>of vtk3DWidget, which inherits from vtkInteractorObserver. The vtkBoxWidget
>and vtkLineWidget inherit from vtk3DWidget.
>
>Interactor styles will become a subclass of vtkInteractorObserver. They
>should remain backward compatible. We are looking to creating a general
>solution so that the wrapper languages (Tcl, Python. Java) can be cleanly
>interfaced with this stuff.
>
>I still have a list of others things that people suggested, I'll get to
>them soon. Sebastien suggested creating a separate Widgets/ directory. It's
>a good idea, but I want to hold off for a bit to see how all this settles out.
>
>Please give feedback and suggestions. We want to get this right, its going
>to be used pretty heavily in VTK.
>
>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