Include :
- aggiunto parametro con default a Validate di Triangle3d.
This commit is contained in:
+5
-5
@@ -34,15 +34,15 @@ class Triangle3d
|
||||
ptP[nId] = ptV ;
|
||||
return true ;
|
||||
}
|
||||
bool Validate( void)
|
||||
bool Validate( bool bOverwrite = false)
|
||||
{ if ( AreSamePointApprox( ptP[0], ptP[1]) || AreSamePointApprox( ptP[0], ptP[2]))
|
||||
return false ;
|
||||
Vector3d vtV = ( ptP[1] - ptP[0]) ^ ( ptP[2] - ptP[0]) ;
|
||||
vtV.Normalize() ;
|
||||
if ( ! vtN.IsZero())
|
||||
return AreSameVectorApprox( vtV, vtN) ;
|
||||
vtN = vtV ;
|
||||
return true ;
|
||||
bool bOk = ( vtN.IsZero() || AreSameVectorApprox( vtV, vtN)) ;
|
||||
if ( bOverwrite)
|
||||
vtN = vtV ;
|
||||
return bOk ;
|
||||
}
|
||||
bool ToGlob( const Frame3d& frRef)
|
||||
{ return ( ptP[0].ToGlob( frRef) && ptP[1].ToGlob( frRef) && ptP[2].ToGlob( frRef)) ; }
|
||||
|
||||
Reference in New Issue
Block a user