[vtkusers] Close a rendering window?

David Doria daviddoria at gmail.com
Fri May 29 07:41:25 EDT 2009


I would like to display some graphical content, then when the user presses
'q' for quit, the code execution continues after closing the window.

    vtkRenderWindow* renWin = vtkRenderWindow::New();
    renWin->AddRenderer( ren );
    renWin->SetSize( 800, 600);

    // Create an interactor
    vtkRenderWindowInteractor* iren = vtkRenderWindowInteractor::New();
    renWin->SetInteractor( iren );

    vtkInteractorStyleTrackballCamera* style =
vtkInteractorStyleTrackballCamera::New();
    iren->SetInteractorStyle( style );

    // Initialize and enter interactive mode
    iren->Initialize();
    iren->Start();

//CLOSE THE WINDOW

//continue with non-graphical code
    for(unsigned int i = 0; i < 1e5; i++)
    {
        std::cout << i << std::endl;
    }


I didn't see any methods for closing the window in vtkRenderWindowInteractor
or vtkRenderWindow - did I miss them? Or is this not a common thing to do?

Thanks,

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


More information about the vtkusers mailing list