[vtkusers] Events vs subclasses

David Doria daviddoria+vtk at gmail.com
Tue Jan 26 13:27:26 EST 2010


Can anyone explain when you would want to subclass an interactor style and
when you would want to use events?

For example, say you are trying to select a region with
vtkInteractorStyleRubberBand2D (get the corners of the box that the rubber
band draws). You could
1) create a subclass and override OnLeftButtonDown(), etc
2) use the class itself, but handle the SelectionChangedEvent that it
produces.

Are there benefits/downsides to each of these methods?

Thanks,

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100126/ab2a2d11/attachment.htm>


More information about the vtkusers mailing list