[vtkusers] Control more renderers??

Chunyan Jiang jiang at TI.FhG.DE
Fri Dec 20 03:57:06 EST 2002


Dear VTK list,
I use more than one vtkRenderer to render objects(three) in one
vtkRenderWindow and one vtkRenderWindowInteractor. And I define the
different area by set renderer->SetViewport(0.5,0.5,1.0,1.0). Now I can
control these three objects only in their own area. When I rotate one
object, the other two will not be rotated. How can I control them in the
whole window at the same time?

Example code:

	vtkRenderer *ren1;
	vtkRenderer *ren2;
	vtkRenderer *ren3;
	vtkRenderWindow *renWin;
	vtkRenderWindowInteractor *iren;

	iren->SetRenderWindow(renWin);
           ....../*set different objects in ren1, ren2, ren3 separately*/

	renWin->AddRenderer(ren1);
	renWin->AddRenderer(ren2);
	renWin->AddRenderer(ren3);

	ren1->SetViewport(0.5,0.5,1.0,1.0);
	ren2->SetViewport(0.5,0.0,1.0,0.5);
	ren3->SetViewport(0,0,0.5,1);

Any help is quite appreciated.

Chunyan



***********************************************************************
Chunyan Jiang, Dipl.-Inform.,
Institut for Telematic
Bahnhofstrasse 30-32, D-54292 Trier, Germany
Phone: (+49) (0)651-97551-34
Fax: (+49) (0)651-97551-12
***********************************************************************




More information about the vtkusers mailing list