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 );
59 void DeletePoint(int i);
60 void DeleteAllPoints();
62 void MovePoint(int i,double dx,double dy,double dz);
63 void MoveLstPoints(double dx,double dy,double dz);
64 void MoveAllPoints(double dx,double dy,double dz);
66 int GetIdPoint(double x, double y, double z, int i_range,int type);
67 manualPoint* GetManualPoint(int id);
68 int GetSizeLstPoints();
69 int GetNumberOfPointsSpline();
70 void SetNumberOfPointsSpline(int size);
72 virtual void UpdateSpline();
73 void SetCloseContour(bool closeContour);
74 bool IfCloseContour();
75 //JSTG 25-02-08 -----------------------------------------------------------------
76 //void GetSplinePoint(double t, double &x, double &y, double &z); //Method Original
77 //void GetSplineiPoint(int i, double &x, double &y, double &z); //Method Original
78 //-------------------------------------------------------------------------------
82 void GetNearestPointAndNormal(double *p, double *rp, double *rn);
84 // JSTG 25-02-08 -----------------------------------------------------------------
85 virtual void GetSpline_i_Point(int i, double *x, double *y, double *z);
86 void GetSpline_t_Point(double t, double *x, double *y, double *z);
87 //--------------------------------------------------------------------------------
89 virtual std::vector<manualContourModel*> ExploseModel( );
92 int _sizePointsContour;
93 std::vector<manualPoint*> _lstPoints;
95 vtkKochanekSpline *_cntSplineX;
96 vtkKochanekSpline *_cntSplineY;
97 vtkKochanekSpline *_cntSplineZ;
99 //JSTG 25-02-08 ----------------------------------------
101 //------------------------------------------------------
106 #endif // manualContourModel_h