1 #ifndef manualContourModel_h
2 #define manualContourModel_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>
24 #include "wxVTKRenderWindowInteractor.h"
30 #include "wxVtkBaseView.h"
32 #include "manualPoint.h"
35 // ----------------------------------------------------------------------------
36 // ----------------------------------------------------------------------------
37 // ----------------------------------------------------------------------------
40 class creaMaracasVisu_EXPORT manualContourModel
44 virtual ~manualContourModel();
46 virtual manualContourModel * Clone();
47 void CopyAttributesTo( manualContourModel *cloneObject );
48 virtual void Open(FILE *ff); // virtual
49 virtual void Save(FILE *ff); // virtual
50 virtual int GetTypeModel(); // virtual
52 int AddPoint(double x,double y,double z);
53 int InsertPoint(double x,double y,double z);
54 //JSTG 25-04-08 -------------------------------------------------------
55 void InsertPoint_id(int id, double x,double y,double z);
56 //---------------------------------------------------------------------
57 void AddManualPoint( manualPoint* theManualPoint );
58 void Transform_Ax_Plus_B (double Ax, double Bx, double Ay, double By);
60 void DeletePoint(int i);
61 void DeleteAllPoints();
63 void MovePoint(int i,double dx,double dy,double dz);
64 void MoveLstPoints(double dx,double dy,double dz);
65 void MoveAllPoints(double dx,double dy,double dz);
67 int GetIdPoint(double x, double y, double z, int i_range,int type);
68 manualPoint* GetManualPoint(int id);
69 int GetSizeLstPoints();
70 int GetNumberOfPointsSpline();
71 void SetNumberOfPointsSpline(int size);
73 virtual void UpdateSpline();
74 void SetCloseContour(bool closeContour);
75 bool IfCloseContour();
76 //JSTG 25-02-08 -----------------------------------------------------------------
77 //void GetSplinePoint(double t, double &x, double &y, double &z); //Method Original
78 //void GetSplineiPoint(int i, double &x, double &y, double &z); //Method Original
79 //-------------------------------------------------------------------------------
83 void GetNearestPointAndNormal(double *p, double *rp, double *rn);
85 // JSTG 25-02-08 -----------------------------------------------------------------
86 virtual void GetSpline_i_Point(int i, double *x, double *y, double *z);
87 void GetSpline_t_Point(double t, double *x, double *y, double *z);
88 //--------------------------------------------------------------------------------
90 virtual std::vector<manualContourModel*> ExploseModel( );
93 int _sizePointsContour;
94 std::vector<manualPoint*> _lstPoints;
96 vtkKochanekSpline *_cntSplineX;
97 vtkKochanekSpline *_cntSplineY;
98 vtkKochanekSpline *_cntSplineZ;
100 //JSTG 25-02-08 ----------------------------------------
102 //------------------------------------------------------
107 #endif // manualContourModel_h