EgtGeomKernel 1.8j4 :

- aggiunta classe Polygon3d (da EgtExchange)
- razionalizzata classe Plane3d
- corretta funzione IntersLineTria.
This commit is contained in:
Dario Sassi
2017-10-16 07:56:04 +00:00
parent 31658bb165
commit 5bcd4bb67d
26 changed files with 969 additions and 105 deletions
+5 -6
View File
@@ -31,12 +31,12 @@ CDBoxPlane( const BBox3d& Box, const Plane3d& Plane)
return false ;
// Compute the projection interval radius of b onto L(t) = ptCen + t * Plane.vtN
double dR = vtExt.x * abs( Plane.vtN.x) +
vtExt.y * abs( Plane.vtN.y) +
vtExt.z * abs( Plane.vtN.z) ;
double dR = vtExt.x * abs( Plane.GetVersN().x) +
vtExt.y * abs( Plane.GetVersN().y) +
vtExt.z * abs( Plane.GetVersN().z) ;
// Compute distance of box center from plane
double dS = ( ptCen - ORIG) * Plane.vtN - Plane.dDist ;
double dS = ( ptCen - ORIG) * Plane.GetVersN() - Plane.GetDist() ;
// Intersection occurs when distance dS falls within [-dR,+dR] interval
return ( abs( dS) < dR + EPS_SMALL) ;
@@ -148,7 +148,6 @@ CDBoxTria( const BBox3d& b3Box, const Triangle3d& trTria)
// Test separating axis corresponding to triangle face normal (category 2)
Plane3d Plane ;
Plane.vtN = trTria.GetN() ;
Plane.dDist = Plane.vtN * ( trTria.GetP( 0) - ORIG) ;
Plane.Set( trTria.GetP( 0), trTria.GetN()) ;
return CDBoxPlane( b3Box, Plane) ;
}