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:
Dario Sassi
2014-05-02 06:57:24 +00:00
parent e080543b97
commit 1b767fe58e
12 changed files with 621 additions and 110 deletions
+22
View File
@@ -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 ;
}