]> Creatis software - creaMaracasVisu.git/blobdiff - lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk3DBaseView.cxx
#3012 creaMaracasVisu Bug New Normal - Update Image in ViewerNV
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / wxVtk3DBaseView.cxx
index 9d92c225526295afd8d36d392e09c339d3e1f7df..7a158603a8551078b2d98d63d71fbe8936833711 100644 (file)
 #ifdef _DEBUG
 #define new DEBUG_NEW
 #endif
-wxVtk3DBaseView::wxVtk3DBaseView(wxWindow *parent)
+wxVtk3DBaseView::wxVtk3DBaseView(wxWindow *parent, vtkBaseData* vtkbasedata)
 :wxVtkBaseView( parent )
 {
+       SetVtkBaseData( vtkbasedata );
        _configure      = false;
        _aRenderer      = NULL;
        _renWin         = NULL;
@@ -42,11 +43,14 @@ wxVtk3DBaseView::wxVtk3DBaseView(wxWindow *parent)
 wxVtk3DBaseView::~wxVtk3DBaseView()
 {
 
-       if (_aCamera!=NULL)     { _aCamera              -> Delete(); _aCamera=NULL;}
+       if (_aCamera!=NULL)             { _aCamera              -> Delete(); _aCamera=NULL;}
        if (_aRenderer!=NULL)   { _aRenderer    -> Delete(); _aRenderer=NULL;}
-       if (_renWin!=NULL)      { 
-               if(_renWin->GetReferenceCount()==0){
-                       _renWin         -> Delete(); _renWin=NULL;
+       if (_renWin!=NULL)              
+       { 
+               if(_renWin->GetReferenceCount()==0)
+               {
+                       _renWin->Delete(); 
+                       _renWin=NULL;
                }
        }
 }
@@ -155,6 +159,12 @@ void wxVtk3DBaseView::Configure()
                _aRenderer->GradientBackgroundOn();
                _aRenderer->SetBackground( 0.33 , 0.33 , 0.33 );
                _aRenderer->SetBackground2( 0.66 , 0.66 , 0.66 );
+
+
+
+//             _aRenderer->GradientBackgroundOff();
+//             _aRenderer->SetBackground(0,0,0 );
+
                
                SetStereo(0);
                
@@ -192,10 +202,9 @@ void wxVtk3DBaseView::Configure()
                GetCamera()->Roll(180);
                GetCamera()->Yaw(180+30);
                GetCamera()->Pitch(-22);
-
-
        }
 }
+
 //-------------------------------------------------------------------
 //EED 27 sep 2006
 void wxVtk3DBaseView::GetSpacing(double spc[3])