]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/kernel/PlaneDirectionManagerData.h
64637e42aef489088ab7915c1f7eb59c2c9b6d67
[creaMaracasVisu.git] / lib / maracasVisuLib / src / kernel / PlaneDirectionManagerData.h
1 #ifndef PlaneDirectionManagerData_H_
2 #define PlaneDirectionManagerData_H_
3
4 #include <math.h>
5
6 #include "PlanesOperations.h"
7
8
9 #include <iostream>
10
11 #include <vtkArrowSource.h>
12 //#include <vtkConeSource.h>
13 #include <vtkPolyDataMapper.h>
14 #include <vtkActor.h>
15 #include <vtkProperty.h>
16 #include <vtkMatrix4x4.h>
17 #include <vtkTransform.h>
18
19
20 class PlaneDirectionManagerData : public PlanesOperations {
21
22 public:
23         PlaneDirectionManagerData(int radio, double colour[3], int opacity);    
24         ~PlaneDirectionManagerData();           
25
26         void setPoint0(double x,double y,double z){             
27                 p0[0] = x;
28                 p0[1] = y;
29                 p0[2] = z;
30         }
31         void setPoint1(double x,double y,double z){             
32                 p1[0] = x;
33                 p1[1] = y;
34                 p1[2] = z;
35         }
36         void setPoint2(double x,double y,double z){             
37                 p2[0] = x;
38                 p2[1] = y;
39                 p2[2] = z;
40         }
41         double* getPoint0(){
42                 return p0;              
43         }
44         double* getPoint1(){
45                 return p1;              
46         }
47         double* getPoint2(){
48                 return p2;              
49         }
50
51         void UpdateActor();
52
53         vtkProp3D* GetActor();
54
55         double* GetDirection(){
56                 return _dir;
57         }
58
59         void ChangeColour(double r,double g,double b);
60         
61 private:
62         double* p0;
63         double* p1;
64         double* p2;
65         int _radio;
66         double* _colour;
67         int _opacity;
68         double* _dir;
69         
70         vtkArrowSource *_vtkarrow;      
71         vtkPolyDataMapper *_arrowMapper;
72         vtkActor *_arrowActor;
73
74         double* GetMidPoint();
75         
76 };
77
78 #endif /*PlaneDirectionManagerData_H_*/