#include "manualViewLine.h" // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- // AD:02-09 manualViewLine::manualViewLine() { _sizePointsContour=20; } // ---------------------------------------------------------------------------- manualViewLine::~manualViewLine() { } // ---------------------------------------------------------------------------- manualViewLine * manualViewLine :: Clone() { manualViewLine * clone = new manualViewLine(); CopyAttributesTo(clone); return clone; } // --------------------------------------------------------------------------- void manualViewLine::CopyAttributesTo( manualViewLine * cloneObject) { // Fathers object manualViewBaseContour::CopyAttributesTo(cloneObject); } // ---------------------------------------------------------------------------- int manualViewLine::GetType() // virtual { return 6; } // ---------------------------------------------------------------------------- void manualViewLine::InitMove(int x, int y, int z) // virtual { manualPoint *mp; double XX=x; double YY=y; double ZZ=z; TransfromCoordViewWorld(XX,YY,ZZ); if (_manContModel->GetSizeLstPoints()==2) { mp = _manContModel->GetManualPoint(0); _dp0[0]= mp->GetX() - XX; _dp0[1]= mp->GetY() - YY; _dp0[2]= mp->GetZ(); mp = _manContModel->GetManualPoint(1); _dp1[0]= mp->GetX() - XX; _dp1[1]= mp->GetY() - YY; _dp1[2]= mp->GetZ(); } } // ---------------------------------------------------------------------------- void manualViewLine::MoveContour(int x, int y, int z) // virtual { manualPoint *mp; double XX=x; double YY=y; double ZZ=z; TransfromCoordViewWorld(XX,YY,ZZ); mp = _manContModel->GetManualPoint(0); mp->SetPoint(_dp0[0]+XX,_dp0[1]+YY,_dp0[2]); mp = _manContModel->GetManualPoint(1); mp->SetPoint(_dp1[0]+XX,_dp1[1]+YY,_dp0[2]); UpdateViewPoint(0); UpdateViewPoint(1); }