]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtkMPR3DView.cxx
#3465 SetwxVtkBaseViewSetOpacityAxis box
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / wxVtkMPR3DView.cxx
index 32994c7743cd664add4ba747482f79d945312227..97f4faddad7b6ed23a2900a44470d55bbdbf48b1 100644 (file)
@@ -699,7 +699,7 @@ void wxVtkMPR3DView::VisiblePlaneWidget( bool visible )
 }
 
 //CPR: Method added 30 Nov 2009
-void wxVtkMPR3DView::showOutlineActor(bool value)
+void wxVtkMPR3DView::showOutlineBoxActor(bool value)
 {
        vtkActor* _outlineActor = _vtkmpr3Ddataviewer->GetOutlineActor();
        if(value == true)
@@ -710,6 +710,29 @@ void wxVtkMPR3DView::showOutlineActor(bool value)
        } // value
 }
 
+//-------------------------------------------------------------------
+void wxVtkMPR3DView::showOutlinePlaneActor(bool value)
+{
+       vtkProperty *prop1=NULL;
+       if(value == true)
+       {
+               prop1 = _planeWidgetX ->GetPlaneProperty();
+               prop1->SetOpacity(1);
+               prop1 = _planeWidgetY ->GetPlaneProperty();
+               prop1->SetOpacity(1);
+               prop1 = _planeWidgetZ ->GetPlaneProperty();
+               prop1->SetOpacity(1);           
+       } else {
+               prop1 = _planeWidgetX ->GetPlaneProperty();
+               prop1->SetOpacity(0);
+               prop1 = _planeWidgetY ->GetPlaneProperty();
+               prop1->SetOpacity(0);
+               prop1 = _planeWidgetZ ->GetPlaneProperty();
+               prop1->SetOpacity(0);
+       } // value
+}
+
+
 //-------------------------------------------------------------------
 void wxVtkMPR3DView::SetVtkMPR3DDataViewer(vtkMPR3DDataViewer *vtkmpr3Ddataviewer)
 {
@@ -976,15 +999,20 @@ void wxVtkMPR3DView::SetBackGroundType(int type)
        if (_wxvtk3Dbaseview!=NULL)
        {
                if (type==0)
+               {
+                       _wxvtk3Dbaseview->GetRenderer()->GradientBackgroundOn();
+                       _wxvtk3Dbaseview->GetRenderer()->SetBackground( 0.33 , 0.33 , 0.33 );
+                       _wxvtk3Dbaseview->GetRenderer()->SetBackground2( 0.66 , 0.66 , 0.66 );
+               } // if type
+               else if (type==1)
                {
                        _wxvtk3Dbaseview->GetRenderer()->GradientBackgroundOff();
                        _wxvtk3Dbaseview->GetRenderer()->SetBackground( 0 , 0 , 0 );
                } // if type
-               if (type==1)
+               else if (type==2)
                {
-                       _wxvtk3Dbaseview->GetRenderer()->GradientBackgroundOn();
-                       _wxvtk3Dbaseview->GetRenderer()->SetBackground( 0.33 , 0.33 , 0.33 );
-                       _wxvtk3Dbaseview->GetRenderer()->SetBackground2( 0.66 , 0.66 , 0.66 );
+                       _wxvtk3Dbaseview->GetRenderer()->GradientBackgroundOff();
+                       _wxvtk3Dbaseview->GetRenderer()->SetBackground( 1 , 1 , 1 );
                } // if type
                _wxvtk3Dbaseview->Refresh();
        }// if _wxvtk3Dbaseview