EgtGeomKernel 1.5e1 :
- in TriMesh migliorato lo smooth delle normali - in TriMesh aggiunta generazione per rivoluzione - migliorati gestione e aggiornamento materiali.
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
|
||||
//--------------------------- Include ----------------------------------------
|
||||
#include "stdafx.h"
|
||||
#include "DistPointLine.h"
|
||||
#include "\EgtDev\Include\EGkPolyLine.h"
|
||||
#include "\EgtDev\Include\EGkPlane3d.h"
|
||||
|
||||
@@ -289,3 +290,24 @@ PolyLine::IsPlanar( Plane3d& plPlane, double dToler) const
|
||||
// All points passed distance test, so polygon is considered planar
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
PolyLine::GetMaxDistanceFromLine( double& dMaxDist, const Point3d& ptAx,
|
||||
const Vector3d& vtAx, double dLen, bool bIsSegment) const
|
||||
{
|
||||
// Verifico che la polilinea esista
|
||||
if ( GetPointNbr() < 1)
|
||||
return false ;
|
||||
// Calcolo la distanza di ogni punto dalla linea
|
||||
dMaxDist = 0 ;
|
||||
Point3d ptP ;
|
||||
for ( bool bFound = GetFirstPoint( ptP) ; bFound ; bFound = GetNextPoint( ptP)) {
|
||||
DistPointLine dstPL( ptP, ptAx, vtAx, dLen, bIsSegment) ;
|
||||
double dDist ;
|
||||
if ( dstPL.GetDist( dDist) && dDist > dMaxDist)
|
||||
dMaxDist = dDist ;
|
||||
}
|
||||
|
||||
return true ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user