//---------------------------------------------------------------------------- // EgalTech 2014-2014 //---------------------------------------------------------------------------- // File : IntersCrvCompoCrvCompo.h Data : 24.06.14 Versione : 1.5f6 // Contenuto : Dichiarazione della classe intersezione curva composita/cc. // // // // Modifiche : 24.06.14 DS Creazione modulo. // // //---------------------------------------------------------------------------- #pragma once #include "/EgtDev/Include/EGkIntersCurves.h" #include "/EgtDev/Include/EGkCurveComposite.h" //----------------------------------------------------------------------------- class IntersCrvCompoCrvCompo { friend class IntersCurveCurve ; friend class SelfIntersCurve ; public : IntersCrvCompoCrvCompo( const ICurveComposite& CCompo1, const ICurveComposite& CCompo2) ; public : bool GetOverlaps( void) { return m_bOverlaps ; } int GetNumInters( void) { return m_nNumInters ; } bool GetIntCrvCrvInfo( int nInd, IntCrvCrvInfo& aInfo) { if ( nInd < 0 || nInd >= m_nNumInters) return false ; aInfo = m_Info[nInd] ; return true ; } private : IntersCrvCompoCrvCompo( void) ; bool IntersSimpleCurves( const ICurve& CurveA, int nA, const ICurve& CurveB, int nB, bool bAutoInters, bool bClosed, int nCurvesNbr) ; bool EraseCurrentInfo( int& nIndCurr, int& nIndOther) ; bool EraseOtherInfo( int& nIndCurr, int& nIndOther) ; private : bool m_bOverlaps ; int m_nNumInters ; ICCIVECTOR m_Info ; } ; //----------------------------------------------------------------------------- // Per ordinare le info di intersezione secondo il parametro crescente (con stable_sort) bool SortGreaterA( const IntCrvCrvInfo& aInfo1, const IntCrvCrvInfo& aInfo2) ; bool SortGreaterB( const IntCrvCrvInfo& aInfo1, const IntCrvCrvInfo& aInfo2) ; // Per tener conto di intersezioni con parti non manifold bool OrderNonManifoldInters( ICCIVECTOR& Info, const ICurve& CurveA, const ICurve& CurveB) ;