<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7652.24">
<TITLE>RE: [vtkusers] same camera on different viewpoints</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>If you are trying to use crystal eyes why not just SetStereoTypeToCrystalEyes on the renderwindow. You don't get much control over 3d rendering parameters (offset...), but everything is taken care of internally by vtk, including the generation of the 2 views. Also ren2->SetActiveCamera(ren1->GetActiveCamera()); probably wouldn't work for this application since the two viewpoints should actually be 2 different views, consequently different cameras, right?<BR>
<BR>
<BR>
Rob<BR>
<BR>
Luca, I had tried that myself at one point:<BR>
<BR>
ren2->SetActiveCamera(ren1->GetActiveCamera());<BR>
<BR>
but would get random crashes, has it been ok for you? I eventually had<BR>
to manually copy over camera parameters between the two cameras<BR>
instead to get the same effect.<BR>
<BR>
I think what Sicilia wants is to have the same interaction propagated<BR>
to all renderers (since the cameras may be setup in different<BR>
locations). This probably isn't a typical thing to do, normally you<BR>
want the camera location copied throughout all renderers instead. I<BR>
was looking into this but couldn't figure out myself how to Invoke()<BR>
the same interaction on another renderer. We can listen on Interaction<BR>
events on the render window's interactor, but not quite sure how to<BR>
propagate it to the other renderers.<BR>
<BR>
Mark<BR>
<BR>
<BR>
On Jan 9, 2008 8:52 AM, Sicilia Judice <siciliajudice@gmail.com> wrote:<BR>
> I think I am very near to finish this...<BR>
><BR>
> Let me try to explain... I have to generate stereo images to use with<BR>
> Crystal Eyes... So, I have create two viewports, displayed vertically, one<BR>
> over other... The upper viewport is the stereo image for one eye, and the<BR>
> second one for the other eye. I have to put one of this images with a<BR>
> difference of 5° (the paralaxe). I was creating two cameras, each one for<BR>
> one viewport. In the second camera I was using the method Azimuth(5). But in<BR>
> this way, I was having to take care of the interaction, what I could not<BR>
> done... Now I have try a different solution: I create only one camera and<BR>
> set to both viewports. Now, any action with the mouse move the two images<BR>
> together... But I have to translate the second image in 5°, and I do not<BR>
> know how to do it... How can I translate an imagem in a viewport???<BR>
><BR>
> ps.: sorry for the english, I am from Brazil!<BR>
><BR>
> ps2.: thanks for the attention!!!<BR>
><BR>
><BR>
><BR>
> On Jan 9, 2008 11:42 AM, Luca Pallozzi Lavorante <lplavorante@gmail.com ><BR>
> wrote:<BR>
> ><BR>
> ><BR>
> ><BR>
> > Sicilia,<BR>
> > if you work in C++, let's say you have two viewports, with two<BR>
> corresponding instances of vtkRenderer, ren1 and ren2. Say that you want to<BR>
> modify ren2´s camera according to whatever interaction you perform on ren1<BR>
> (via a vtkRenderWindowInteractor). The command to accomplish that is :<BR>
> ><BR>
> > ren2->SetActiveCamera(ren1->GetActiveCamera());<BR>
> ><BR>
> > Hope this help<BR>
> ><BR>
> > Luca<BR>
> ><BR>
> > _______________________________________________<BR>
> > This is the private VTK discussion list.<BR>
> > Please keep messages on-topic. Check the FAQ at:<BR>
> <A HREF="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</A><BR>
> > Follow this link to subscribe/unsubscribe:<BR>
> > <A HREF="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</A><BR>
> ><BR>
> ><BR>
><BR>
><BR>
><BR>
> --<BR>
> ---------------------------------------------------------------------------<BR>
> Sicilia Ferreira Judice<BR>
> www.lncc.br/~sicilia<BR>
> sicilia@lncc.br<BR>
><BR>
> Laboratório Nacional de Computação Cientifica<BR>
> Avenida Getulio Vargas, 333 - Quitandinha.<BR>
> Petrópolis, RJ, Brasil - CEP: 25651-075.<BR>
> Sala 1A-44 | Tel. +55 (24) 2233-6173<BR>
> Lab. Virtual | Tel. +55 (24) 2233-6098<BR>
> _______________________________________________<BR>
> This is the private VTK discussion list.<BR>
> Please keep messages on-topic. Check the FAQ at:<BR>
> <A HREF="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</A><BR>
> Follow this link to subscribe/unsubscribe:<BR>
> <A HREF="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</A><BR>
><BR>
><BR>
_______________________________________________<BR>
This is the private VTK discussion list.<BR>
Please keep messages on-topic. Check the FAQ at: <A HREF="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</A><BR>
Follow this link to subscribe/unsubscribe:<BR>
<A HREF="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</A><BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>