wxMaracas3DBrowser.cxx

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   wxMaracas
00004   Module:    $RCSfile: wxMaracas3DBrowser.cxx,v $
00005   Language:  C++
00006   Date:      $Date: 2009/05/14 13:54:54 $
00007   Version:   $Revision: 1.1 $
00008 
00009   Copyright: (c) 2002, 2003
00010   License:
00011 
00012      This software is distributed WITHOUT ANY WARRANTY; without even
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
00014      PURPOSE.  See the above copyright notice for more information.
00015 
00016 =========================================================================*/
00017 
00018 #include "wxMaracas3DBrowser.h"
00019 //#include <Crtdbg.h>
00020 
00021 
00022 wxMaracas3DBrowser::wxMaracas3DBrowser( wxWindow* parent, marInterface* mar, wxWindowID id , int id_toolbar_plans  )
00023     : wxPanel( parent, id, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL )
00024 {
00025     _mar = mar;
00026 
00027     _3DSurf = new wxSurfaceWidget( this, -1 );
00028         _3DSurf->SetId_toolbar_plans(id_toolbar_plans);
00029 
00030     wxBoxSizer* szTop = new wxBoxSizer( wxVERTICAL );
00031     szTop->Add( _3DSurf, 1, wxEXPAND | wxALL, 0 );
00032 
00033     this->SetAutoLayout( true );
00034     this->SetSizer( szTop );
00035 
00036 //    szTop->Fit( this );
00037     szTop->SetSizeHints( this );
00038 
00039 }
00040 //----------------------------------------------------------------------------
00041 void wxMaracas3DBrowser::LoadData( ){
00042     _3DSurf->ShowMARACASData( _mar );
00043 }
00044 //----------------------------------------------------------------------------
00045 int wxMaracas3DBrowser::GetIsovalue(){
00046         int result=0;
00047         if (_3DSurf!=NULL){
00048                 result=_3DSurf->GetIsovalue();
00049         }
00050         return result;
00051 }
00052 //----------------------------------------------------------------------------
00053 int wxMaracas3DBrowser::GetOpacity(){
00054         int result=0;
00055         if (_3DSurf!=NULL){
00056                 result=_3DSurf->GetOpacity();
00057         }
00058         return result;
00059 }
00060 //----------------------------------------------------------------------------
00061 void wxMaracas3DBrowser::RegenerateAll(bool all){
00062         if (_3DSurf!=NULL){
00063                 _3DSurf->Clean3D();
00064                 if (all==true){
00065                         _mar->_experiment->RegenerateAxis();
00066                 } else {
00067                         _mar->_experiment->RecalculateAxis();
00068                 }
00069                 _3DSurf->AddAxisActors();       
00070                 _3DSurf->RefreshAxis(); 
00071         }
00072 }
00073 //----------------------------------------------------------------------------
00074 
00075 // EOF - wxMaracas3DBrowser.cxx
00076 

Generated on 18 Mar 2010 for creaMaracasVisu_lib by  doxygen 1.6.1