[vtkusers] Control more renderers??

Tuhin Sinha tk.sinha at vanderbilt.edu
Fri Dec 20 10:42:19 EST 2002


Chunyan,

  Try this...

  vtkCamera *cam = vtkCamera::New();

  ren1->SetActiveCamera(cam);
  ren2->SetActiveCamera(ren1->GetActiveCamera());
  ren3->SetActiveCamera(ren1->GetActiveCamera());

Tuhin

On Friday 20 December 2002 02:57, Chunyan Jiang wrote:
> 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
> ***********************************************************************
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> <http://public.kitware.com/cgi-bin/vtkfaq> Follow this link to
> subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers

-- 
Graduate Research Assistant
Vanderbilt University, Dept of BME
615-343-8261



More information about the vtkusers mailing list