[vtkusers] problem in having two Widgets with the same interactor

satyanarayana reddy satyajanga at gmail.com
Thu Feb 11 03:01:34 EST 2010


Hi,

I want to have two sphere widgets with the same interactor. The code I have
written like this..

 iren->SetInteractorStyle(vtkInteractorStyleTerrain::New());

// pointwidget1->SetInteractor(iren);

// pointwidget1->PlaceWidget();

// pointwidget2->SetInteractor(iren);

// pointwidget2->PlaceWidget();

// linewidget1->SetInteractor(iren);

// linewidget1->PlaceWidget();

// linewidget2->SetInteractor(iren);

// linewidget2->PlaceWidget();

spherewidget1->SetInteractor(iren);

spherewidget1->PlaceWidget();

spherewidget1->SetCenter(10,10,-100);

spherewidget1->SetPriority(0.2);

spherewidget2->SetInteractor(iren);

spherewidget2->PlaceWidget();

spherewidget2->SetCenter(0,0,-100);

spherewidget2->SetPriority(0.5);

iren->Initialize();

iren->Start();


Each sphere widget is working fine when used individually. But when I tried
to have both of them only one is coming. And it is the same for point and
line widgets also..

Some one plz help on this. Thanx in advance..


Regards,

Satya..
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100211/2e9ee744/attachment.htm>


More information about the vtkusers mailing list