59 lines
1.6 KiB
C++
59 lines
1.6 KiB
C++
//-------------------------------------------------------------------------------------------------------+
|
|
// Copyright (C), 1998-2007, Beijing Tangent Software Co. Ltd.
|
|
// = FileName : TPGeFitTriangle3D Àà
|
|
// = Version : ver2.0
|
|
// = Author : wlw
|
|
// = CreateDate : 2002-09-09
|
|
// = Description: TPGeFitTriangle3D ¶¨Òå
|
|
// = Maintainers:
|
|
//
|
|
//-------------------------------------------------------------------------------------------------------+
|
|
#include "StdAfx.h"
|
|
#include "TPGeFitTriangle3D.h"
|
|
#include "TGTriangle2D.h"
|
|
|
|
TPGeFitTriangle3D::TPGeFitTriangle3D(TPGeDscEdge3D*p0,TPGeDscEdge3D*p1,TPGeDscEdge3D*p2)
|
|
: pEdge0(p0),pEdge1(p1),pEdge2(p2)
|
|
{
|
|
|
|
}
|
|
|
|
TPGeFitTriangle3D::~TPGeFitTriangle3D()
|
|
{
|
|
|
|
}
|
|
|
|
bool TPGeFitTriangle3D::operator >(const TPGeFitTriangle3D&) const
|
|
{
|
|
return false;
|
|
}
|
|
|
|
bool TPGeFitTriangle3D::operator <(const TPGeFitTriangle3D&) const
|
|
{
|
|
return false;
|
|
}
|
|
|
|
void TPGeFitTriangle3D::GetFitEdge(double value,TPDList<TPGeDscEdge3D>&res)
|
|
{
|
|
if (UPEQUAL_ZERO(pEdge0->GetMinValue() - value) &&
|
|
UPEQUAL_ZERO(pEdge1->GetMinValue() - value) &&
|
|
UPEQUAL_ZERO(pEdge2->GetMinValue() - value))
|
|
{
|
|
return;
|
|
}
|
|
|
|
if (pEdge0->pPtFit != NULL && pEdge1->pPtFit != NULL && pEdge0->pPtFit != pEdge1->pPtFit)
|
|
{
|
|
res << new TPGeDscEdge3D(pEdge0->pPtFit,pEdge1->pPtFit);
|
|
}
|
|
else if (pEdge1->pPtFit != NULL && pEdge2->pPtFit != NULL && pEdge1->pPtFit != pEdge2->pPtFit)
|
|
{
|
|
res << new TPGeDscEdge3D(pEdge1->pPtFit,pEdge2->pPtFit);
|
|
}
|
|
else if (pEdge2->pPtFit != NULL && pEdge0->pPtFit != NULL && pEdge2->pPtFit != pEdge0->pPtFit)
|
|
{
|
|
res << new TPGeDscEdge3D(pEdge2->pPtFit,pEdge0->pPtFit);
|
|
}
|
|
}
|
|
|