[vtkusers] How to show and control one vtkSphereWidget in different windows?

Andrew Dolgert ajd27 at cornell.edu
Thu Nov 6 11:51:42 EST 2003


> I want to show one vtkSphereWidget in two windows. And
> if I move the sphere in one window, it will also be
> moved in the other window. My code is below, but it 
> doesn't work.
Hi Jiang,
You will have to create a vtkSphereWidget for each window because
vtkSphereWidget can only listen to one interactor at a time.
If you attach a callback to each widget, as shown in 
Examples/GUI/Python/SphereWidget.py, then you can use the
vtkSphereWidget::GetSphere() method to set one widget's position
from the other.
- Drew, Cornell Theory Center




More information about the vtkusers mailing list