Include :

- correzione prototipi.
This commit is contained in:
Daniele Bariletti
2025-11-18 09:14:52 +01:00
parent dacf041b67
commit 7cc55217f8
2 changed files with 7 additions and 36 deletions
+6 -4
View File
@@ -122,13 +122,9 @@ class EGK_EXPORT BBox3d
if ( dSqDist < EPS_ZERO)
return 0 ;
return sqrt( dSqDist) ; }
std::vector<Point3d> GetVertices() const ;
Point3d GetVertex( int nVert) const ;
bool Overlaps( const Frame3d& frThis, const BBox3d& bbOther, const Frame3d& frOther) const ;
private :
bool IsValid( void) const ;
int ChooseVertex( const Vector3d& vtDir) const ;
private :
Point3d m_ptMin ;
@@ -167,3 +163,9 @@ GetLocToLoc( const BBox3d& b3Box, const Frame3d& frOri, const Frame3d& frDest)
b3New.LocToLoc( frOri, frDest) ;
return b3New ;
}
//----------------------------------------------------------------------------
inline bool Overlaps( const BBox3d& bbA, const Frame3d& frA, const BBox3d& bbB, const Frame3d& frB)
{
return bbA.Overlaps( GetToLoc( frB, frA), bbB) ;
}
+1 -32
View File
@@ -19,12 +19,6 @@
//-----------------------------------------------------------------------------
class Plane3d
{
public:
enum Side { POS = + 1,
NEG = - 1,
ON = 0
} ;
public :
Plane3d( void) : m_vtN( V_NULL), m_dDist( 0) {}
bool Set( double dDist, const Vector3d& vtN)
@@ -180,33 +174,8 @@ AreSamePlaneApprox( const Plane3d& plPlaneA, const Plane3d& plPlaneB)
//-----------------------------------------------------------------------------
inline bool
AreSamePlaneExact( const Plane3d plPlaneA, const Plane3d& plPlaneB)
AreSamePlaneExact( const Plane3d& plPlaneA, const Plane3d& plPlaneB)
{
return ( AreSameVectorExact( plPlaneA.GetVersN(), plPlaneB.GetVersN()) &&
PointInPlaneExact( plPlaneA.GetPoint(), plPlaneB)) ;
}
//-----------------------------------------------------------------------------
inline int
OnWhichSide( const Plane3d plPlane, const Point3d& pt)
{
Vector3d vtDir = pt - plPlane.GetPoint() ;
if ( ! vtDir.Normalize()) {
// cerco un punto diverso sul piano per calcolare la direzione del punto
// mi aspetto che pt fosse troppo vicino all'origine del piano
Vector3d vtX = plPlane.GetVersN() ^ ( pt - ORIG) ;
Point3d ptOrig2 = plPlane.GetPoint() + vtX * 5 ;
vtDir = pt - ptOrig2 ;
vtDir.Normalize() ;
}
double dSide = vtDir * plPlane.GetVersN() ;
int nSide ;
if ( abs( dSide) < EPS_SMALL)
nSide = Plane3d::Side::ON ;
else if ( dSide > 0)
nSide = Plane3d::Side::POS ;
else
nSide = Plane3d::Side::NEG ;
return nSide ;
}