manualContourBaseControler.h

Go to the documentation of this file.
00001 #ifndef manualContourBaseControler_h
00002 #define manualContourBaseControler_h
00003 
00004 #include "vtkRenderWindow.h"
00005 
00006 #include "vtkRenderer.h"
00007 #include "vtkRenderWindowInteractor.h" //extremely important with VC++ don't remove !
00008 #include "vtkCommand.h"
00009 #include "vtkPolyData.h"
00010 #include "vtkCellArray.h"
00011 #include "vtkPolyDataMapper.h"
00012 #include "vtkInteractorObserver.h"
00013 #include "vtkInteractorStyleImage.h"
00014 #include <vtkKochanekSpline.h> 
00015 
00016 #include <vtkCellPicker.h> 
00017 
00018 
00019 #include <vtkCamera.h> 
00020 #include <vtkPolyLine.h>
00021 #include <vtkDataSetMapper.h>
00022 #include <vtkUnstructuredGrid.h>
00023 
00024 #include <vtkActor.h>
00025 #include <vtkProperty.h>
00026 
00027 #include <vtkCellArray.h>
00028 #include <vtkRenderer.h>
00029 #include <vtkCoordinate.h>
00030 #include <vtkTextProperty.h>
00031 #include <vtkTextActor.h>
00032 #include <vtkProperty2D.h>
00033 #include <vtkPointPicker.h>
00034 //#include "widgets/UtilVtk3DGeometriSelection.h"
00035 #include "UtilVtk3DGeometriSelection.h"
00036 //#include "widgets/InteractorStyleMaracas.h"
00037 #include "InteractorStyleMaracas.h"
00038 
00039 #include "wxVTKRenderWindowInteractor.h"
00040 
00041 
00042 //--
00043 
00044 #include <vector>
00045 #include "wxVtkBaseView.h"
00046 #include "marTypes.h"
00047 
00048 #include "manualContourModel.h"
00049 #include "manualViewBaseContour.h"
00050 
00051 
00052 // ----------------------------------------------------------------------------
00053 // ----------------------------------------------------------------------------
00054 // ----------------------------------------------------------------------------
00055 
00056 class creaMaracasVisu_EXPORT manualContourBaseControler: public InteractorStyleMaracas
00057 {
00058 public:
00059         manualContourBaseControler();
00060         virtual ~manualContourBaseControler();
00061 
00062         virtual manualContourBaseControler * Clone();
00063         void CopyAttributesTo( manualContourBaseControler *cloneObject );
00064 
00065         virtual bool  OnChar();
00066         virtual bool  OnMouseMove();
00067         virtual bool  OnLeftButtonDown(); 
00068         virtual bool  OnLeftButtonUp();
00069         virtual bool  OnLeftDClick();
00070         virtual bool  OnMiddleButtonDown(); 
00071         virtual bool  OnMiddleButtonUp();
00072         virtual bool  OnRightButtonDown();
00073         virtual bool  OnRightButtonUp();
00074 
00075         void    SetModelView(manualContourModel *manContModel, manualViewBaseContour *manViewBaseCont);
00076         manualContourModel              * GetManualContourModel();
00077         manualViewBaseContour   * GetManualViewBaseContour();
00078 
00079 
00080         virtual void    MouseClickLeft(int x, int y);
00081         virtual void    MouseClickRight(int x, int y);
00082         virtual void    MouseDLeft(int x, int y);
00083 
00084         virtual void    MouseMove(int x, int y);
00085         virtual void    MouseReleaseLeft(int x, int y);
00086 
00087         void    SetState(int state);
00088         int             GetState();
00089         bool    IsEditable();
00090         void    SetEditable(  bool condition  );
00091         bool    GetPosibleToMove();
00092         void    SetPosibleToMove(  bool condition  );
00093         bool    IsMoving();
00094         void    SetMoving(  bool condition  );
00095         void    SetCompleteCreation( bool condition );
00096         bool    GetIfCompleteCreation ( );
00097         void    SetKeyBoardMoving( bool condition );
00098         bool    GetKeyBoardMoving(  );
00099         
00100         void    CreateNewManualContour();
00101         int             GetNumberOfPointsManualContour();
00102         int             GetNumberOfPointsSplineManualContour();
00103         void    DeleteContour();
00104         virtual void    DeleteActualMousePoint(int x, int y );
00105         double* GetVectorPointsXManualContour();
00106         double* GetVectorPointsYManualContour();
00107         
00108 
00109         void    SetZ(int z);
00110         virtual int             GetZ();
00111 
00112         virtual void    AddPoint(int x, int y, int z);
00113         virtual void    InsertPoint(int x, int y, int z);
00114 
00115         virtual void    SetPoint(       int id ,int x ,int y ,int z);
00116                         void    SetPointX(      int id ,int x );
00117                         void    SetPointY(      int id ,int y );
00118                         void    SetPointZ(      int id ,int z );
00119 
00120                         void    Magnet(int x, int y);
00121         virtual void    ResetContour();
00122 
00123         virtual void Configure();
00124 
00125 
00126 //EED Borrame
00127 //      virtual manualContourBaseControler * Clone( manualViewBaseContour * cloneView = NULL, manualContourModel * cloneModel = NULL );
00128 
00129 
00130 private:
00131         manualViewBaseContour   *_manViewBaseCont;
00132         manualContourModel              *_manContModel;
00133 
00134         int                                             _z;
00135         int                                             _state;
00136         bool                                    _editable;      
00137         bool                                    _posibleToMove;
00138         bool                                    _moving;
00139         bool                                    _created;
00140         bool                                    _keyBoardMoving;
00141                 
00142 }; 
00143 
00144 
00145 #endif // manualContourBaseControler_h

Generated on Wed Jul 29 16:35:28 2009 for creaMaracasVisu_lib by  doxygen 1.5.3