]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualContourModelPolygon.cpp
Changements dans la class CutModuleMainPanel et CutModuleManager pour ajouter la...
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / manualContour / manualContourModelPolygon.cpp
1 #include "manualContourModelPolygon.h"
2
3 // ----------------------------------------------------------------------------
4 // ----------------------------------------------------------------------------
5 // ----------------------------------------------------------------------------
6
7 manualContourModelPolygon::manualContourModelPolygon()
8 : manualContourModel()
9 {
10 }
11
12 manualContourModelPolygon::~manualContourModelPolygon()
13 {
14 }
15
16
17 // ----------------------------------------------------------------------------
18 manualContourModelPolygon* manualContourModelPolygon :: Clone()  // virtual 
19 {
20         manualContourModelPolygon * clone = new manualContourModelPolygon();
21         CopyAttributesTo(clone);
22         return clone;
23 }
24
25 // ---------------------------------------------------------------------------
26
27 void manualContourModelPolygon::CopyAttributesTo( manualContourModelPolygon * cloneObject)
28 {
29         manualContourModel::CopyAttributesTo(cloneObject);
30 }
31
32 //----------------------------------------------------------------
33 int manualContourModelPolygon::GetTypeModel() //virtual 
34 {
35         return 10;
36 }
37
38
39 //----------------------------------------------------------------
40 void manualContourModelPolygon::GetSpline_i_Point(int i, double *x, double *y, double *z) // virtual
41 {
42         if(i>=_lstPoints.size())
43         {
44                 i=0;
45         }
46
47         if (_lstPoints.size()==0)
48         {
49                 *x      = 0;
50                 *y      = 0;
51                 *z      = 0;
52         }
53         else
54         {
55                 manualPoint     *mp;
56                 mp      = GetManualPoint(i);
57                 *x      = mp->GetX();
58                 *y      = mp->GetY();
59                 *z      = mp->GetZ();
60         }
61
62 }
63
64
65 void manualContourModelPolygon::UpdateSpline() // virtual
66 {
67         //SetNumberOfPointsSpline(_lstPoints.size()+1);
68 }