Include :
- correzione prototipi.
This commit is contained in:
+6
-4
@@ -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
@@ -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 ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user