]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/interface/wxWindows/widgets/manualContour/manualViewBullEyeSector.cpp
e3800a16dd2535a92c17e7fc745ae465ed6f818f
[creaMaracasVisu.git] / lib / maracasVisuLib / src / interface / wxWindows / widgets / manualContour / manualViewBullEyeSector.cpp
1 #include "manualViewBullEyeSector.h"
2
3 // ----------------------------------------------------------------------------
4 // ----------------------------------------------------------------------------
5 // ----------------------------------------------------------------------------
6 manualViewBullEyeSector::manualViewBullEyeSector()
7 {
8 }
9
10 // ----------------------------------------------------------------------------
11 void manualViewBullEyeSector::RefreshContour()
12 {
13 //EED004
14         int i,nps;
15         double x,y,z;
16         double xx,yy,zz;
17 //----------------------------------
18
19         //EED 27 Juin 2012
20     //Boundaring box    
21         _minX=99999;
22         _minY=99999;
23         _minZ=99999;
24         _maxX=-99999;
25         _maxY=-99999;
26         _maxZ=-99999;
27         
28         _manContModel->UpdateSpline();
29     nps = _manContModel->GetNumberOfPointsSpline();
30
31         if ( _pts!=NULL )
32         {
33                 for( i = 0; i < nps; i++ )
34                 {
35                         _manContModel->GetSpline_i_Point(i,&x,&y,&z);
36                         xx = x*_spc[0];
37                         yy = y*_spc[1];
38                         zz = z*_spc[2];
39                         _pts->SetPoint(i , xx , yy , zz );
40                         
41                         //EED 27 Juin 2012
42                         //Boundaring box
43                         if (xx < _minX) { _minX = xx; }
44                         if (yy < _minY) { _minY = yy; }
45                         if (zz < _minZ) { _minZ = zz; }
46                         if (xx > _maxX) { _maxX = xx; }
47                         if (yy > _maxY) { _maxY = yy; }         
48                         if (zz > _maxZ) { _maxY = zz; }         
49                         
50                         
51                 }// for
52                 
53         } // if _pts
54
55 }