Files
envi-code/SourceCode/Code2026/tg_shs/shs_geLib/TGGePolyDist.cpp
T
2026-09-28 15:28:50 +08:00

45 lines
965 B
C++

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