[vtkusers] same camera on different viewpoints

Mark Wyszomierski markww at gmail.com
Wed Jan 9 13:09:29 EST 2008


Luca, I had tried that myself at one point:

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

but would get random crashes, has it been ok for you? I eventually had
to manually copy over camera parameters between the two cameras
instead to get the same effect.

I think what Sicilia wants is to have the same interaction propagated
to all renderers (since the cameras may be setup in different
locations). This probably isn't a typical thing to do, normally you
want the camera location copied throughout all renderers instead. I
was looking into this but couldn't figure out myself how to Invoke()
the same interaction on another renderer. We can listen on Interaction
events on the render window's interactor, but not quite sure how to
propagate it to the other renderers.

Mark


On Jan 9, 2008 8:52 AM, Sicilia Judice <siciliajudice at gmail.com> wrote:
> I think I am very near to finish this...
>
> Let me try to explain... I have to generate stereo images to use with
> Crystal Eyes... So, I have create two viewports, displayed vertically, one
> over other... The upper viewport is the stereo image for one eye, and the
> second one for the other eye. I have to put one of this images with a
> difference of 5° (the paralaxe). I was creating two cameras, each one for
> one viewport. In the second camera I was using the method Azimuth(5). But in
> this way, I was having to take care of the interaction, what I could not
> done... Now I have try a different solution: I create only one camera and
> set to both viewports. Now, any action with the mouse move the two images
> together... But I have to translate the second image in 5°, and I do not
> know how to do it... How can I translate an imagem in a viewport???
>
> ps.: sorry for the english, I am from Brazil!
>
> ps2.: thanks for the attention!!!
>
>
>
> On Jan 9, 2008 11:42 AM, Luca Pallozzi Lavorante <lplavorante at gmail.com >
> wrote:
> >
> >
> >
> > Sicilia,
> > if you work in C++, let's say you have two viewports, with two
> corresponding instances of vtkRenderer, ren1 and ren2. Say that you want to
> modify ren2´s camera according to whatever interaction you perform on ren1
> (via a vtkRenderWindowInteractor). The command to accomplish that is :
> >
> > ren2->SetActiveCamera(ren1->GetActiveCamera());
> >
> > Hope this help
> >
> >       Luca
> >
> > _______________________________________________
> > This is the private VTK discussion list.
> > Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> > Follow this link to subscribe/unsubscribe:
> > http://www.vtk.org/mailman/listinfo/vtkusers
> >
> >
>
>
>
> --
> ---------------------------------------------------------------------------
> Sicilia Ferreira Judice
> www.lncc.br/~sicilia
> sicilia at lncc.br
>
> Laboratório Nacional de Computação Cientifica
> Avenida Getulio Vargas, 333 - Quitandinha.
> Petrópolis, RJ, Brasil - CEP: 25651-075.
> Sala 1A-44  | Tel. +55 (24) 2233-6173
> Lab. Virtual | Tel. +55 (24) 2233-6098
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>



More information about the vtkusers mailing list