EgtGeomKernel :
- correzione alla gestione delle normali in IntersLineCyl. - modifiche alla chiamata della funzione IntesLineCyl in VolZMap.
This commit is contained in:
+13
-13
@@ -60,14 +60,14 @@ IntersLineCyl( const Point3d& ptP, const Vector3d& vtV, double dH, double dRad,
|
||||
|
||||
// Se la linea interseca entrambe le basi, si sono trovate le due intersezioni
|
||||
if ( nBasInt == 3) {
|
||||
if ( isfinite( dU1) && isfinite(dU2) && dU1 > dU2) {
|
||||
if ( dU1 > dU2) {
|
||||
swap( dU1, dU2) ;
|
||||
swap( ptInt1, ptInt2) ;
|
||||
swap( vtN1, vtN2) ;
|
||||
if ( bInvertNormals) {
|
||||
vtN1 *= - 1 ;
|
||||
vtN2 *= - 1 ;
|
||||
}
|
||||
}
|
||||
if ( bInvertNormals) {
|
||||
vtN1 *= - 1 ;
|
||||
vtN2 *= - 1 ;
|
||||
}
|
||||
// Trovate intersezioni
|
||||
return true ;
|
||||
@@ -119,10 +119,10 @@ IntersLineCyl( const Point3d& ptP, const Vector3d& vtV, double dH, double dRad,
|
||||
swap( dU1, dU2) ;
|
||||
swap( ptInt1, ptInt2) ;
|
||||
swap( vtN1, vtN2) ;
|
||||
if ( bInvertNormals) {
|
||||
vtN1 *= - 1 ;
|
||||
vtN2 *= - 1 ;
|
||||
}
|
||||
}
|
||||
if ( bInvertNormals) {
|
||||
vtN1 *= - 1 ;
|
||||
vtN2 *= - 1 ;
|
||||
}
|
||||
// Trovate intersezioni
|
||||
return true ;
|
||||
@@ -155,10 +155,10 @@ IntersLineCyl( const Point3d& ptP, const Vector3d& vtV, double dH, double dRad,
|
||||
swap( dU1, dU2) ;
|
||||
swap( ptInt1, ptInt2) ;
|
||||
swap( vtN1, vtN2) ;
|
||||
if ( bInvertNormals) {
|
||||
vtN1 *= - 1 ;
|
||||
vtN2 *= - 1 ;
|
||||
}
|
||||
}
|
||||
if ( bInvertNormals) {
|
||||
vtN1 *= - 1 ;
|
||||
vtN2 *= - 1 ;
|
||||
}
|
||||
// Trovate intersezioni
|
||||
return true ;
|
||||
|
||||
Reference in New Issue
Block a user