1 #ifndef manualContourBaseControler_h
2 #define manualContourBaseControler_h
4 #include "vtkRenderWindow.h"
6 #include "vtkRenderer.h"
7 #include "vtkRenderWindowInteractor.h" //extremely important with VC++ don't remove !
8 #include "vtkCommand.h"
9 #include "vtkPolyData.h"
10 #include "vtkCellArray.h"
11 #include "vtkPolyDataMapper.h"
12 #include "vtkInteractorObserver.h"
13 #include "vtkInteractorStyleImage.h"
14 #include <vtkKochanekSpline.h>
16 #include <vtkCellPicker.h>
19 #include <vtkCamera.h>
20 #include <vtkPolyLine.h>
21 #include <vtkDataSetMapper.h>
22 #include <vtkUnstructuredGrid.h>
25 #include <vtkProperty.h>
27 #include <vtkCellArray.h>
28 #include <vtkRenderer.h>
29 #include <vtkCoordinate.h>
30 #include <vtkTextProperty.h>
31 #include <vtkTextActor.h>
32 #include <vtkProperty2D.h>
33 #include <vtkPointPicker.h>
34 //#include "widgets/UtilVtk3DGeometriSelection.h"
35 #include "UtilVtk3DGeometriSelection.h"
36 //#include "widgets/InteractorStyleMaracas.h"
37 #include "InteractorStyleMaracas.h"
39 #include "wxVTKRenderWindowInteractor.h"
45 #include "wxVtkBaseView.h"
48 #include "manualContourModel.h"
49 #include "manualViewBaseContour.h"
52 // ----------------------------------------------------------------------------
53 // ----------------------------------------------------------------------------
54 // ----------------------------------------------------------------------------
56 class creaMaracasVisu_EXPORT manualContourBaseControler: public InteractorStyleMaracas
59 manualContourBaseControler();
60 virtual ~manualContourBaseControler();
62 virtual manualContourBaseControler * Clone();
63 void CopyAttributesTo( manualContourBaseControler *cloneObject );
65 virtual bool OnChar();
66 virtual bool OnMouseMove();
67 virtual bool OnLeftButtonDown();
68 virtual bool OnLeftButtonUp();
69 virtual bool OnLeftDClick();
70 virtual bool OnMiddleButtonDown();
71 virtual bool OnMiddleButtonUp();
72 virtual bool OnRightButtonDown();
73 virtual bool OnRightButtonUp();
75 void SetModelView(manualContourModel *manContModel, manualViewBaseContour *manViewBaseCont);
76 manualContourModel * GetManualContourModel();
77 manualViewBaseContour * GetManualViewBaseContour();
80 virtual void MouseClickLeft(int x, int y);
81 virtual void MouseClickRight(int x, int y);
82 virtual void MouseDLeft(int x, int y);
84 virtual void MouseMove(int x, int y);
85 virtual void MouseReleaseLeft(int x, int y);
87 void SetState(int state);
90 void SetEditable( bool condition );
91 bool GetPosibleToMove();
92 void SetPosibleToMove( bool condition );
94 void SetMoving( bool condition );
95 void SetCompleteCreation( bool condition );
96 bool GetIfCompleteCreation ( );
97 void SetKeyBoardMoving( bool condition );
98 bool GetKeyBoardMoving( );
100 void CreateNewManualContour();
101 int GetNumberOfPointsManualContour();
102 int GetNumberOfPointsSplineManualContour();
103 void DeleteContour();
104 virtual void DeleteActualMousePoint(int x, int y );
105 double* GetVectorPointsXManualContour();
106 double* GetVectorPointsYManualContour();
112 virtual void AddPoint(int x, int y, int z);
113 virtual void InsertPoint(int x, int y, int z);
115 virtual void SetPoint( int id ,int x ,int y ,int z);
116 void SetPointX( int id ,int x );
117 void SetPointY( int id ,int y );
118 void SetPointZ( int id ,int z );
120 void Magnet(int x, int y);
121 virtual void ResetContour();
123 virtual void Configure();
127 // virtual manualContourBaseControler * Clone( manualViewBaseContour * cloneView = NULL, manualContourModel * cloneModel = NULL );
131 manualViewBaseContour *_manViewBaseCont;
132 manualContourModel *_manContModel;
140 bool _keyBoardMoving;
145 #endif // manualContourBaseControler_h