manualContourModel.h

Go to the documentation of this file.
00001 #ifndef manualContourModel_h
00002 #define manualContourModel_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 "wxVTKRenderWindowInteractor.h"
00025 
00026 
00027 //--
00028 
00029 #include <vector>
00030 #include "wxVtkBaseView.h"
00031 #include "marTypes.h"
00032 #include "manualPoint.h"
00033 
00034 
00035 // ----------------------------------------------------------------------------
00036 // ----------------------------------------------------------------------------
00037 // ----------------------------------------------------------------------------
00038 
00039 
00040 class creaMaracasVisu_EXPORT manualContourModel
00041 {
00042 public:
00043         manualContourModel();
00044         virtual ~manualContourModel();
00045 
00046         virtual manualContourModel * Clone();
00047         void CopyAttributesTo( manualContourModel *cloneObject );
00048         virtual void Open(FILE *ff);    // virtual
00049         virtual void Save(FILE *ff);    // virtual
00050         virtual int GetTypeModel();                     // virtual 
00051 
00052         int                             AddPoint(double x,double y,double z);
00053         int                             InsertPoint(double x,double y,double z);
00054 //JSTG 25-04-08 -------------------------------------------------------
00055         void                    InsertPoint_id(int id, double x,double y,double z);
00056 //---------------------------------------------------------------------
00057         void                    AddManualPoint( manualPoint* theManualPoint );
00058         void                    Transform_Ax_Plus_B (double Ax, double Bx, double Ay, double By);
00059 
00060         void                    DeletePoint(int i);
00061         void                    DeleteAllPoints();
00062 
00063         void                    MovePoint(int i,double dx,double dy,double dz);
00064         void                    MoveLstPoints(double dx,double dy,double dz);
00065         void                    MoveAllPoints(double dx,double dy,double dz);
00066 
00067         int                             GetIdPoint(double x, double y, double z, int i_range,int type);
00068         manualPoint*    GetManualPoint(int id);
00069         int                             GetSizeLstPoints();
00070         int                             GetNumberOfPointsSpline();
00071         void                    SetNumberOfPointsSpline(int size);
00072 
00073         virtual void    UpdateSpline();
00074         void                    SetCloseContour(bool closeContour);
00075         bool                    IfCloseContour();
00076 //JSTG 25-02-08 -----------------------------------------------------------------
00077         //void                  GetSplinePoint(double t, double &x, double &y, double &z);      //Method Original
00078         //void                  GetSplineiPoint(int i, double &x, double &y, double &z);        //Method Original
00079 //-------------------------------------------------------------------------------
00080         double                  GetPathSize();
00081         double                  GetPathArea();
00082 
00083         void                    GetNearestPointAndNormal(double *p, double *rp,  double *rn);
00084         
00085 // JSTG 25-02-08 -----------------------------------------------------------------
00086         virtual void    GetSpline_i_Point(int i, double *x, double *y, double *z);
00087         void                    GetSpline_t_Point(double t, double *x, double *y, double *z);
00088 //--------------------------------------------------------------------------------
00089 
00090         virtual std::vector<manualContourModel*> ExploseModel(  );
00091 
00092 private:
00093         int                                                     _sizePointsContour;
00094         std::vector<manualPoint*>       _lstPoints;
00095         bool                                            _closeContour;
00096     vtkKochanekSpline                   *_cntSplineX;
00097     vtkKochanekSpline                   *_cntSplineY;
00098     vtkKochanekSpline                   *_cntSplineZ;
00099 
00100 //JSTG 25-02-08 ----------------------------------------
00101         double                  _delta_JSTG;
00102 //------------------------------------------------------
00103 
00104 }; 
00105 
00106 
00107 #endif // manualContourModel_h

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