[vtkusers] MouseInteractorStyle2 for multiple windows

Harold boogiedoll at yahoo.com
Thu Dec 19 00:13:48 EST 2013


Hi,
Based on the example: http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/Picking , I'm trying to add one more window by creating two sets of polydata, mappers, actors, renderers, render windows, and render window interactors. Unfortunately, I can't make it work. Do I need to have two different class of "MouseInteractorStyle2"? For example:

vtkSmartPointer<MouseInteractorStyle2> style_1 =
    vtkSmartPointer<MouseInteractorStyle2>::New();
  style_1->SetDefaultRenderer(renderer_1);
renderWindowInteractor_1->SetInteractorStyle( style_1 );


vtkSmartPointer<MouseInteractorStyle2> style_2 =
    vtkSmartPointer<MouseInteractorStyle2>::New();
  style_2->SetDefaultRenderer(renderer_2);
 renderWindowInteractor_1->SetInteractorStyle( style_2);


Thank you.

Best Regards,
Harold
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20131218/009dd5da/attachment.htm>


More information about the vtkusers mailing list