[vtkusers] WG: How to use one Camera in two vtkCanvases?

Chunyan Jiang jiang at Telematik-Institut.org
Wed May 7 05:14:10 EDT 2003


Dear vtk-users,
I use vtk4.2 and Java jdk1.4. Now I want to test the example TestVTKCanvas.
This example exists in vtk42\Wrapping\Java.
In this example, there are two TestVTKCanvas objects. I want to use one
camera to control them. It means that when I click mouse left button, the
two objects will rotate together, every action will perform same at two
objects.
I tried many methods but failed. Such as:
    vtkCamera camera=new vtkCamera();
    camera=panel.renWin.GetRenderer().GetActiveCamera();
    panel2.renWin.GetRenderer().SetActiveCamera(camera);
or:
do not use panel2, add another vtkRenderer to panel directly.

How can I realize this function?
Thanks a lot!

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