]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/include/wxMaracas3DBrowser.cxx
78c539fc4e046c8012cba11be06207079400b9f5
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / include / wxMaracas3DBrowser.cxx
1 /*=========================================================================
2
3   Program:   wxMaracas
4   Module:    $RCSfile: wxMaracas3DBrowser.cxx,v $
5   Language:  C++
6   Date:      $Date: 2009/05/14 13:54:54 $
7   Version:   $Revision: 1.1 $
8
9   Copyright: (c) 2002, 2003
10   License:
11
12      This software is distributed WITHOUT ANY WARRANTY; without even
13      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14      PURPOSE.  See the above copyright notice for more information.
15
16 =========================================================================*/
17
18 #include "wxMaracas3DBrowser.h"
19 //#include <Crtdbg.h>
20
21
22 wxMaracas3DBrowser::wxMaracas3DBrowser( wxWindow* parent, marInterface* mar, wxWindowID id , int id_toolbar_plans  )
23     : wxPanel( parent, id, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL )
24 {
25     _mar = mar;
26
27     _3DSurf = new wxSurfaceWidget( this, -1 );
28         _3DSurf->SetId_toolbar_plans(id_toolbar_plans);
29
30     wxBoxSizer* szTop = new wxBoxSizer( wxVERTICAL );
31     szTop->Add( _3DSurf, 1, wxEXPAND | wxALL, 0 );
32
33     this->SetAutoLayout( true );
34     this->SetSizer( szTop );
35
36 //    szTop->Fit( this );
37     szTop->SetSizeHints( this );
38
39 }
40 //----------------------------------------------------------------------------
41 void wxMaracas3DBrowser::LoadData( ){
42     _3DSurf->ShowMARACASData( _mar );
43 }
44 //----------------------------------------------------------------------------
45 int wxMaracas3DBrowser::GetIsovalue(){
46         int result=0;
47         if (_3DSurf!=NULL){
48                 result=_3DSurf->GetIsovalue();
49         }
50         return result;
51 }
52 //----------------------------------------------------------------------------
53 int wxMaracas3DBrowser::GetOpacity(){
54         int result=0;
55         if (_3DSurf!=NULL){
56                 result=_3DSurf->GetOpacity();
57         }
58         return result;
59 }
60 //----------------------------------------------------------------------------
61 void wxMaracas3DBrowser::RegenerateAll(bool all){
62         if (_3DSurf!=NULL){
63                 _3DSurf->Clean3D();
64                 if (all==true){
65                         _mar->_experiment->RegenerateAxis();
66                 } else {
67                         _mar->_experiment->RecalculateAxis();
68                 }
69                 _3DSurf->AddAxisActors();       
70                 _3DSurf->RefreshAxis(); 
71         }
72 }
73 //----------------------------------------------------------------------------
74
75 // EOF - wxMaracas3DBrowser.cxx
76