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:
+23
@@ -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) ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user