diff --git a/EGkIntersLineSurfBez.h b/EGkIntersLineSurfBez.h index e446042..3394085 100644 --- a/EGkIntersLineSurfBez.h +++ b/EGkIntersLineSurfBez.h @@ -29,7 +29,7 @@ //----------------------------------------------------------------------------- //! dati di intersezione linea - superficie trimesh struct IntLinSbzInfo { - int nILTT ; //!< tipo di intersezione linea-triangolo // se -1 vuol dire che l'intersezione è stata calcolata direttamente, senza usare la trimesh + int nILTA ; //!< tipo di intersezione linea-triangolo // se -1 vuol dire che l'intersezione è stata calcolata direttamente, senza usare la trimesh double dU ; //!< parametro sulla linea double dU2 ; //!< secondo parametro sulla linea int nT ; //!< indice del triangolo della superficie trimesh // se -1 vuol dire che l'intersezione è stata calcolata direttamente, senza usare la trimesh @@ -39,11 +39,11 @@ struct IntLinSbzInfo { Point3d ptUV ; //!< coordinate del punto nello spazio parametrico Point3d ptUV2 ; //!< coordinate del secondo punto nello spazio parametrico // costruttori - IntLinSbzInfo( void) : nILTT( ILTT_NO), dU( 0), dU2( 0), nT(0), dCosDN(0), ptI(), ptI2(), ptUV(), ptUV2(){} - IntLinSbzInfo( int nIL, double dUU, int nTT, double dCos, const Point3d& ptP, const Point3d ptSP) - : nILTT( nIL), dU( dUU), dU2( 0), nT( nTT), dCosDN( dCos), ptI( ptP), ptI2(), ptUV( ptSP), ptUV2() {} - IntLinSbzInfo( int nIL, double dUU, double dUU2, int nTT, double dCos, const Point3d& ptP, const Point3d& ptP2, const Point3d& ptSP, const Point3d& ptSP2) - : nILTT( nIL), dU( dUU), dU2( dUU2), nT( nTT), dCosDN( dCos), ptI( ptP), ptI2( ptP2), ptUV( ptSP), ptUV2( ptSP2) {} + IntLinSbzInfo( void) : nILTA( ILTA_NO), dU( 0), dU2( 0), nT(0), dCosDN(0), ptI(), ptI2(), ptUV(), ptUV2(){} + IntLinSbzInfo( int nILTA, double dUU, int nTT, double dCos, const Point3d& ptP, const Point3d ptSP) + : nILTT( nILTA), dU( dUU), dU2( 0), nT( nTT), dCosDN( dCos), ptI( ptP), ptI2(), ptUV( ptSP), ptUV2() {} + IntLinSbzInfo( int nILTA, double dUU, double dUU2, int nTT, double dCos, const Point3d& ptP, const Point3d& ptP2, const Point3d& ptSP, const Point3d& ptSP2) + : nILTT( nILTA), dU( dUU), dU2( dUU2), nT( nTT), dCosDN( dCos), ptI( ptP), ptI2( ptP2), ptUV( ptSP), ptUV2( ptSP2) {} } ; //! vettore di IntLinSbzInfo typedef std::vector ILSBIVECTOR ; @@ -57,6 +57,16 @@ enum LSBiType { LSBT_NONE = 0, LSBT_TG_FIN = 4, LSBT_TOUCH = 5} ; +//----------------------------------------------------------------------------- +// Tipo di intersezione linea-triangolo ausiliario (della trimesh ausilaria) +enum IntLineTriaAuxType { ILTA_NO_TRIA = -1, // l'intersezione è stata calcolata direttamente con la superficie bezier + ILTA_NO = 0, // non c'è intersezione + ILTA_SEGM = 1, // una parte di linea appartiene all'interno del triangolo + ILTA_SEGM_ON_EDGE = 2, // una parte di linea appartiene ad un lato del triangolo + ILTA_VERT = 3, // intersezione coincide con un vertice + ILTA_EDGE = 4, // intersezione coincide con interno di un lato + ILTA_IN = 5} ; // intersezione in interno del triangolo + //----------------------------------------------------------------------------- EGK_EXPORT bool IntersLineSurfBz( const Point3d& ptL, const Vector3d& vtL, double dLen, const ISurfBezier* pSBz, ILSBIVECTOR& vInfo, bool bFinite = true) ;