EgtGeomKernel 1.9c2 :

- a BBox3d aggiunti metodi SqMaxDistFromPoint, SqMaxDistFromPointXY, MaxDistFromPoint e MaxDistFromPointXY
- a IntersLineSurfTm e IntersParLine aggiunto parametro bFinite per indicare se linea finita o infinita.
This commit is contained in:
Dario Sassi
2018-03-22 19:53:38 +00:00
parent 85d6365fac
commit 3b6de06fd9
4 changed files with 34 additions and 8 deletions
+23
View File
@@ -509,3 +509,26 @@ BBox3d::SqDistFromPointXY( const Point3d& ptP) const
dSqDist += ( ptP.y - m_ptMax.y) * ( ptP.y - m_ptMax.y) ;
return dSqDist ;
}
//----------------------------------------------------------------------------
double
BBox3d::SqMaxDistFromPoint( const Point3d& ptP) const
{
if ( ! IsValid())
return INFINITO ;
double dDmaxX = max( abs( ptP.x - m_ptMin.x), abs( ptP.x - m_ptMax.x)) ;
double dDmaxY = max( abs( ptP.y - m_ptMin.y), abs( ptP.y - m_ptMax.y)) ;
double dDmaxZ = max( abs( ptP.z - m_ptMin.z), abs( ptP.z - m_ptMax.z)) ;
return ( dDmaxX * dDmaxX + dDmaxY * dDmaxY + dDmaxZ * dDmaxZ) ;
}
//----------------------------------------------------------------------------
double
BBox3d::SqMaxDistFromPointXY( const Point3d& ptP) const
{
if ( ! IsValid())
return INFINITO ;
double dDmaxX = max( abs( ptP.x - m_ptMin.x), abs( ptP.x - m_ptMax.x)) ;
double dDmaxY = max( abs( ptP.y - m_ptMin.y), abs( ptP.y - m_ptMax.y)) ;
return ( dDmaxX * dDmaxX + dDmaxY * dDmaxY) ;
}