//-----------------------------------------------------------------------------+ // Copyright (C), 1998-2007, Beijing Tangent Software Co. Ltd. // = FileName : TGGeLineDist Àà // = Version : ver2.0 // = Author : wlw // = CreateDate : 2002-09-09 // = Description: TGGeLineDist ÀඨÒå // = Maintainers: // //-----------------------------------------------------------------------------+ #include "StdAfx.h" #include "TGGeLineDist.h" int TGGeLineDist::Compare(const TGGeLineDist *p1, const TGGeLineDist *p2) { if (p1->nDist < _DIST_SNAP) { return 1; } if (p2->nDist < _DIST_SNAP) { return -1; } if (fabs(p1->nDist - p2->nDist) < _DIST_SNAP) { return 0; } if (p1->nDist > p2->nDist) { return 1; } return -1; } TGGeLineDist::TGGeLineDist(ads_real nD, const TADSGePoint3d &pt1, const TADSGePoint3d &pt2) : nDist(nD), ptLocation1(pt1), ptLocation2(pt2) { } TGGeLineDist::~TGGeLineDist() { }