manualViewLine.cpp

Go to the documentation of this file.
00001 #include "manualViewLine.h"
00002 
00003 
00004 // ----------------------------------------------------------------------------
00005 // ----------------------------------------------------------------------------
00006 // ----------------------------------------------------------------------------
00007 
00008 // AD:02-09
00009 
00010 manualViewLine::manualViewLine()
00011 {
00012         _sizePointsContour=20;
00013 }
00014 // ----------------------------------------------------------------------------
00015 manualViewLine::~manualViewLine()
00016 {
00017 }
00018 
00019 
00020 // ----------------------------------------------------------------------------
00021 manualViewLine * manualViewLine :: Clone()
00022 {
00023         manualViewLine * clone = new manualViewLine();
00024         CopyAttributesTo(clone);
00025         return clone;
00026 }
00027 
00028 // ---------------------------------------------------------------------------
00029 
00030 void manualViewLine::CopyAttributesTo( manualViewLine * cloneObject)
00031 {
00032         // Fathers object
00033         manualViewBaseContour::CopyAttributesTo(cloneObject);
00034 }
00035 
00036 // ----------------------------------------------------------------------------
00037 int manualViewLine::GetType() // virtual
00038 {
00039         return 6;
00040 }
00041 
00042 
00043 // ----------------------------------------------------------------------------
00044 
00045 void manualViewLine::InitMove(int x, int y, int z)  // virtual
00046 {
00047         manualPoint *mp;
00048         double XX=x;
00049         double YY=y;
00050         double ZZ=z;
00051         TransfromCoordViewWorld(XX,YY,ZZ);
00052 
00053         if (_manContModel->GetSizeLstPoints()==2)
00054         {
00055                 mp = _manContModel->GetManualPoint(0);
00056                 _dp0[0]= mp->GetX() - XX;
00057                 _dp0[1]= mp->GetY() - YY;
00058                 _dp0[2]= mp->GetZ();
00059 
00060                 mp = _manContModel->GetManualPoint(1);
00061                 _dp1[0]= mp->GetX() - XX;
00062                 _dp1[1]= mp->GetY() - YY;
00063                 _dp1[2]= mp->GetZ();
00064 
00065         }
00066 }
00067 
00068 
00069 // ----------------------------------------------------------------------------
00070 void manualViewLine::MoveContour(int x, int y, int z) // virtual 
00071 {
00072         manualPoint *mp;
00073         double XX=x;
00074         double YY=y;
00075         double ZZ=z;
00076         TransfromCoordViewWorld(XX,YY,ZZ);
00077 
00078         mp = _manContModel->GetManualPoint(0);
00079         mp->SetPoint(_dp0[0]+XX,_dp0[1]+YY,_dp0[2]);
00080 
00081         mp = _manContModel->GetManualPoint(1);
00082         mp->SetPoint(_dp1[0]+XX,_dp1[1]+YY,_dp0[2]);
00083 
00084 
00085         UpdateViewPoint(0);
00086         UpdateViewPoint(1);
00087 }
00088 

Generated on 18 Mar 2010 for creaMaracasVisu_lib by  doxygen 1.6.1