[vtkusers] Stereo effect with two projectors and polarized lenses
Immo Trinks
trinks at esc.cam.ac.uk
Thu Jul 22 10:53:36 EDT 2004
Hi Joerg,
in TclTk I use for
vtkRenderWindow renWin
renWin StereoCapableWindowOn
renWin SetStereoTypeToCrystalEyes
renWin StereoRenderOn
renWin Render
or the "Dresden" Mode:
renWin StereoCapableWindowOn
renWin SetStereoTypeToDresden
renWin StereoRenderOn
renWin Render
I hope this helps.
Regards,
Immo
On Thursday 22 Jul 2004 15:41, trull78yaoo wrote:
> Hello vtk User!
>
> I have two projectors with polarized lenses and polarized glasses, and want
> to use it with VTK. My System: WinXP Nvidia GeForce FX 5600. I'm VTK
> beginner and need help to solve this problem in C++. Must i change the
> graphic card or WinXP settings? What function need my short example file?
> Many thanks!
>
> Joerg Lubnau
> -------------------------------------------------------------
> #include "vtkConeSource.h"
> #include "vtkPolyDataMapper.h"
> #include "vtkRenderWindow.h"
> #include "vtkRenderWindowInteractor.h"
> #include "vtkCamera.h"
> #include "vtkActor.h"
> #include "vtkRenderer.h"
> #include "vtkInteractorStyleTrackballCamera.h"
>
> int main( int argc, char *argv[] )
> {
> vtkConeSource *cone = vtkConeSource::New();
> cone->SetHeight( 3.0 );
> cone->SetRadius( 1.0 );
> cone->SetResolution( 10 );
>
> vtkPolyDataMapper *coneMapper = vtkPolyDataMapper::New();
> coneMapper->SetInput( cone->GetOutput() );
>
> vtkActor *coneActor = vtkActor::New();
> coneActor->SetMapper( coneMapper );
>
> vtkRenderer *ren1= vtkRenderer::New();
> ren1->AddActor( coneActor );
> ren1->SetBackground( 0.1, 0.2, 0.4 );
>
> vtkRenderWindow *renWin = vtkRenderWindow::New();
> renWin->AddRenderer( ren1 );
> renWin->SetSize( 300, 300 );
>
> vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
> iren->SetRenderWindow(renWin);
>
> vtkInteractorStyleTrackballCamera *style =
> vtkInteractorStyleTrackballCamera::New();
> iren->SetInteractorStyle(style);
>
> iren->Initialize();
> iren->Start();
>
> cone->Delete();
> coneMapper->Delete();
> coneActor->Delete();
> ren1->Delete();
> renWin->Delete();
> iren->Delete();
> style->Delete();
>
> return 0;
> }
> ------------------------------------------------------------------
>
> _______________________________________________
> 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://www.vtk.org/mailman/listinfo/vtkusers
More information about the vtkusers
mailing list