[vtkusers] Re : NEwbie Question about Mulitple Render Widows
Mark Jefferson
mark.jefferson at qq.com
Sat Apr 5 23:19:46 EDT 2008
Hi,
do you want to get more than one render windows? or do you want to get more renderers in the same render window?
1, if you only want to get more render windows, you could create some objects of vtkRenderWindow, and use function SetSize() and SetPosition() to arrange these render windows.
2, if you want to get more renderers in the same render window, you can do it as follows (this codes have two renderers in the same render window) :
vtkRenderer * ren1 = vtkRenderer::New();
vtkRenderer * ren2 = vtkRenderer::New();
vtkRenderWindow * renWin = vtkRenderWindow();
renWin->AddRenderer( ren1 );
renWin->AddRenderer( ren2 );
... ...
ren1->SetViewport( 0, 0, 0.5, 1 );
ren2->SetViewport( 0.5, 0, 1, 1 ); // use this function !
... ...
you can see the function SetViewport() of class vtkRenderer to get more information in details if you want to add more renderers in the same render window.
MJ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080406/313f59bb/attachment.htm>
More information about the vtkusers
mailing list