X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FwxVtk3DBaseView.cxx;h=58ba013414d29a90420714c7d02242f92e87cd0f;hb=f050938d3947f6b785289da6d58f8fec2da57421;hp=ecfae840fe818c084eaeddc62614cd2546649cb2;hpb=1b2153bfefaca680e9680b02a039fb06df0a6fba;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk3DBaseView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk3DBaseView.cxx index ecfae84..58ba013 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk3DBaseView.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk3DBaseView.cxx @@ -47,6 +47,43 @@ void wxVtk3DBaseView::Refresh() vtkRenderWindowInteractor *vri = GetWxVTKRenderWindowInteractor(); vri->vtkRenderWindowInteractor::Render(); } + + +//------------------------------------------------------------------- +void wxVtk3DBaseView::SetStereo(int type) +{ + //EED 02/06/2012 + printf("EED wxVtk3DBaseView::SetStereo start\n"); + + if (_renWin!=NULL) + { + printf("EED wxVtk3DBaseView::SetStereo 2\n"); + if (type==0) + { + _renWin->SetStereoRender(0); // OFF + } else { + _renWin->SetStereoRender(1); // ON + _renWin->SetStereoCapableWindow(1); + _renWin->SetAnaglyphColorMask(4,3); + _renWin->SetAnaglyphColorSaturation(0.65); + + // VTK_STEREO_CRYSTAL_EYES 1 + // VTK_STEREO_RED_BLUE 2 + // VTK_STEREO_INTERLACED 3 + // VTK_STEREO_LEFT 4 + // VTK_STEREO_RIGHT 5 + // VTK_STEREO_DRESDEN 6 + // VTK_STEREO_ANAGLYPH 7 + // VTK_STEREO_CHECKERBOARD 8 + _renWin->SetStereoType(type); + + } // if type + } // _renWin + printf("EED wxVtk3DBaseView::SetStereo end\n"); + +} + + //------------------------------------------------------------------- void wxVtk3DBaseView::Configure() { @@ -64,21 +101,8 @@ void wxVtk3DBaseView::Configure() _aRenderer->SetBackground( 0.33 , 0.33 , 0.33 ); _aRenderer->SetBackground2( 0.66 , 0.66 , 0.66 ); + SetStereo(0); -// _renWin->SetStereoCapableWindow(1); -// // //renderwindow->SetStereoTypeToCrystalEyes(); -// _renWin->SetStereoTypeToRedBlue(); -// _renWin->SetStereoRender(1); - -//EED 19/10/2011 OK EED stereo -// _renWin->SetStereoCapableWindow(1); -// _renWin->SetAnaglyphColorMask(4,3); -// _renWin->SetAnaglyphColorSaturation(0.65); -// _renWin->SetStereoTypeToAnaglyph(); // OK 1. -// _renWin->SetStereoRender(1); - printf("EED wxVtk3DBaseView::Configure test Stereo ...\n"); - - GetWxVTKRenderWindowInteractor()->SetRenderWindow(_renWin); vtkInteractorStyleBaseView3D *interactorStyleBaseView3D = vtkInteractorStyleBaseView3D::New();