X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=lib%2FmaracasVisuLib%2Fsrc%2Finterface%2FwxWindows%2Fwidgets%2FwxVtk3DBaseView.cxx;h=f0f23f93aadd16245861a610aa91109beb737cf0;hb=65c158dc171f8d3114ee3544b2a94a1f41880df0;hp=94fe0f7e575d330549851e1d5e73d4d7bf56c42f;hpb=9e16e29818047ef5e7f4cd8031a61cc09e8efc3b;p=creaMaracasVisu.git diff --git a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk3DBaseView.cxx b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk3DBaseView.cxx index 94fe0f7..f0f23f9 100644 --- a/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk3DBaseView.cxx +++ b/lib/maracasVisuLib/src/interface/wxWindows/widgets/wxVtk3DBaseView.cxx @@ -2,7 +2,9 @@ #include "vtkInteractorStyleBaseView3D.h" - +#ifdef _DEBUG +#define new DEBUG_NEW +#endif wxVtk3DBaseView::wxVtk3DBaseView(wxWindow *parent) :wxVtkBaseView( parent ) { @@ -14,6 +16,7 @@ wxVtk3DBaseView::wxVtk3DBaseView(wxWindow *parent) //------------------------------------------------------------------- wxVtk3DBaseView::~wxVtk3DBaseView() { + if (_aCamera!=NULL) { _aCamera -> Delete(); _aCamera=NULL;} if (_aRenderer!=NULL) { _aRenderer -> Delete(); _aRenderer=NULL;} if (_renWin!=NULL) { @@ -47,8 +50,10 @@ void wxVtk3DBaseView::Refresh() //------------------------------------------------------------------- void wxVtk3DBaseView::Configure() { + //printf("EED wxVtk3DBaseView::Configure A\n"); if (_configure==false) { + //printf("EED wxVtk3DBaseView::Configure B\n"); _configure=true; //wxVtkBaseView::Configure(); _aRenderer = vtkRenderer::New(); @@ -67,9 +72,6 @@ void wxVtk3DBaseView::Configure() GetWxVTKRenderWindowInteractor()->SetRenderWindow(_renWin); - -// EED Borrame -// vtkInteractorStyle3DMaracas *interactorStyle3DMaracas = vtkInteractorStyle3DMaracas::New(); vtkInteractorStyleBaseView3D *interactorStyleBaseView3D = vtkInteractorStyleBaseView3D::New(); SetInteractorStyleBaseView( interactorStyleBaseView3D ); @@ -77,12 +79,6 @@ void wxVtk3DBaseView::Configure() GetWxVTKRenderWindowInteractor()->SetInteractorStyle( interactorStyleBaseView3D ); interactorStyleBaseView3D->SetwxVtkBaseView(this); - -/* EED Borrame - vtkInteractorStyleSwitch *iss = dynamic_cast(_iren->GetInteractorStyle()); - iss->SetCurrentStyleToTrackballCamera(); -*/ - // It is convenient to create an initial view of the data. The // FocalPoint and Position form a vector direction. Later on // (ResetCamera() method) this vector is used to position the camera