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(manualBaseModel *manContModel, manualViewBaseContour *manViewBaseCont);
00076         manualBaseModel         * 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         virtual 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 - Adds a point in an specified position
00113         // @param x - int
00114         // @param y - int
00115         // @param z - int
00116         virtual void    AddPoint(int x, int y, int z);
00117         virtual void    InsertPoint(int x, int y, int z);
00118 
00119         virtual void    SetPoint(       int id ,int x ,int y ,int z);
00120                         void    SetPointX(      int id ,int x );
00121                         void    SetPointY(      int id ,int y );
00122                         void    SetPointZ(      int id ,int z );
00123 
00124                         void    Magnet(int x, int y);
00125         virtual void    ResetContour();
00126 
00127         virtual void Configure();
00128 
00129 
00130 //EED Borrame
00131 //      virtual manualContourBaseControler * Clone( manualViewBaseContour * cloneView = NULL, manualContourModel * cloneModel = NULL );
00132 
00133 
00134 protected:
00135         
00136         // Reference to the contour or element view 
00137         manualViewBaseContour   *_manViewBaseCont;
00138 
00139         // Reference to the model contour or element model 
00140         manualBaseModel         *_manContModel;
00141 
00142         int                                             _z;
00143         int                                             _state;
00144         bool                                    _editable;      
00145         bool                                    _posibleToMove;
00146         bool                                    _moving;
00147         bool                                    _created;
00148         bool                                    _keyBoardMoving;
00149                 
00150 }; 
00151 
00152 
00153 #endif // manualContourBaseControler_h

Generated on 18 Mar 2010 for creaMaracasVisu_lib by  doxygen 1.6.1