]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/CutModule/kernel/CutModelFigure.h
5b437670066d36769933ccdd5f33f38fd9182739
[creaMaracasVisu.git] / lib / maracasVisuLib / src / CutModule / kernel / CutModelFigure.h
1 #ifndef CUTTINGMODELFIGURE_H_
2 #define CUTTINGMODELFIGURE_H_
3
4 #include "vtkTransform.h"
5 #include "vtkPolyData.h"
6
7 class CutModelFigure
8 {
9 public:
10         CutModelFigure(){}      
11         
12         virtual ~CutModelFigure(){}
13
14         virtual void SetPosition(double x,double y, double z){
15                 _px = x;
16                 _py = y;
17                 _pz = z;
18         }
19
20         virtual void    SetScale(double sx,double sy, double sz){
21                 _sx = sx;
22                 _sy = sy;
23                 _sz = sz;
24         }
25
26         virtual void    SetRotation(double alfa,double beta, double teta){
27         _alfa = alfa;
28                 _beta = beta;
29                 _teta = teta;
30         }
31
32         virtual void    SetSpacing(double spcX,double spcY, double spcZ){
33                 _spcX = spcX;
34                 _spcY = spcY;
35                 _spcZ = spcZ;
36         }               
37
38         virtual void SetVtkTransform(vtkTransform *transform){
39                 double *orient = transform->GetOrientation();
40                 _alfa = orient[0];
41                 _beta = orient[1];
42                 _teta = orient[2];
43
44                 double *scale = transform->GetScale();
45                 _sx = scale[0];
46                 _sy = scale[1];
47                 _sz = scale[2];
48
49                 double *position = transform->GetPosition();
50                 _px = position[0];
51                 _py = position[1];
52                 _pz = position[2];
53
54
55         }
56         virtual void SetInversVtkTransform(vtkTransform *inverstransform){
57                 _inversModel = inverstransform;
58         }
59
60         virtual bool IfPointInside(double x, double y, double z) = 0;
61         virtual double  GetTheoricVolume()=0;   
62         virtual vtkPolyData* getPolyData()=0;
63
64 private:
65         double                  _px;
66         double                  _py;
67         double                  _pz;
68         double                  _alfa;
69         double                  _beta;
70         double                  _teta;
71         double                  _spcX;
72         double                  _spcY;
73         double                  _spcZ;
74         char *GetName;
75 protected:
76         double                  _sx;
77         double                  _sy;
78         double                  _sz;
79         vtkTransform    *_inversModel;
80         vtkTransform    *_matrixModel;  
81 };
82
83 #endif /*FIGURECUTTINGMODEL_H_*/