]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DView.cxx
2022 Feature Cleanning Viewer type camera in viewer 3D
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / wxVtkMPR3DView.cxx
index f97208ad6349cf9f34c76ce52d8602453ed6e516..6bdef1c10575013b16d158e0aee15f168e9ccc89 100644 (file)
@@ -180,45 +180,7 @@ void wxVtkMPR3DView::RemoveActor(vtkActor* actor)
        _wxvtk3Dbaseview->GetRenderer()->RemoveActor(actor);
 }
 
-//-------------------------------------------------------------------
-void wxVtkMPR3DView::ResetCamera(int* ext, double* origin,double* spc)
-{
-       if(ext == NULL)
-       {
-               
-//EED 21 mars 2012  FLIP probleme  ..PLOP..
-//EED 13 may 2013  FLIP probleme  ..PLOP..
-               _wxvtk3Dbaseview->GetCamera()->Roll(180);
-               _wxvtk3Dbaseview->GetCamera()->Yaw(180+30);
-               _wxvtk3Dbaseview->GetCamera()->Pitch(-22);
-
-               _wxvtk3Dbaseview->GetRenderer()->ResetCamera ();
-               _wxvtk3Dbaseview->GetCamera()->Dolly(2.0);
-               
-       }else{
-               
-               /*double x = (spc[0])*(origin[0]+(((double)ext[1]-(double)ext[0])/2.0));
-               double y = (spc[1])*(origin[1]+(double)ext[3]);
-               double z = (spc[2])*(origin[2]+(((double)ext[5]-(double)ext[4])/2.0));*/
-               /*double x0=(spc[0])*((double)ext[0]+origin[0]);
-               double x1=(spc[0])*((double)ext[1]+origin[0]);
-               double y0=(spc[1])*((double)ext[2]+origin[1]);
-               double y1=(spc[1])*((double)ext[3]+origin[1]);
-               double z0=(spc[2])*((double)ext[4]+origin[2]);
-               double z1=(spc[2])*((double)ext[5]+origin[2]);*/
-               
-               double x0=(spc[0])*((double)ext[0]);
-               double x1=(spc[0])*((double)ext[1]);
-               double y0=(spc[1])*((double)ext[2]);
-               double y1=(spc[1])*((double)ext[3]);
-               double z0=(spc[2])*((double)ext[4]);
-               double z1=(spc[2])*((double)ext[5]);
-
-               _wxvtk3Dbaseview->GetRenderer()->ResetCamera(x0,x1,y0,y1,z0,z1);
-               //_wxvtk3Dbaseview->GetCamera()->SetPosition(x,y,z);
-               _wxvtk3Dbaseview->GetCamera()->Dolly(1.5);      
-       }       
-}
+
 
 //-------------------------------------------------------------------
 void wxVtkMPR3DView::Configure()
@@ -323,7 +285,7 @@ void wxVtkMPR3DView::Configure()
 
 // An initial camera view is created.  The Dolly() method moves
        // the camera towards the FocalPoint, thereby enlarging the image.
-       _wxvtk3Dbaseview->GetRenderer()->SetActiveCamera(_wxvtk3Dbaseview->GetCamera());
+//     _wxvtk3Dbaseview->GetRenderer()->SetActiveCamera(_wxvtk3Dbaseview->GetCamera());
 
        // Note that when camera movement occurs (as it does in the Dolly()
        // method), the clipping planes often need adjusting. Clipping planes
@@ -331,10 +293,13 @@ void wxVtkMPR3DView::Configure()
        // near plane clips out objects in front of the plane; the far plane
        // clips out objects behind the plane. This way only what is drawn
        // between the planes is actually rendered.
-       _wxvtk3Dbaseview->GetRenderer()->ResetCameraClippingRange();
 
-       this->ResetCamera();
+//EED 27/05/2013
+//     _wxvtk3Dbaseview->GetRenderer()->ResetCameraClippingRange();
 
+//EED 27/05/2013
+//      this->ResetCamera();
+       _wxvtk3Dbaseview->ResetCamera();
 
        // Set a background color for the renderer and set the size of the
        // render window (expressed in pixels).