f030922bfe
- aggiornamento interfacce.
68 lines
3.0 KiB
C++
68 lines
3.0 KiB
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2013-2013
|
|
//----------------------------------------------------------------------------
|
|
// File : EGkPolyLine.h Data : 22.12.13 Versione : 1.4l3
|
|
// Contenuto : Dichiarazione della classe PolyLine.
|
|
//
|
|
//
|
|
//
|
|
// Modifiche : 22.12.13 DS Creazione modulo.
|
|
//
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
#pragma once
|
|
|
|
#include "/EgtDev/Include/EGkPoint3d.h"
|
|
#include "/EgtDev/Include/EGkGeoCollection.h"
|
|
|
|
//----------------------- Macro per import/export ----------------------------
|
|
#undef EGK_EXPORT
|
|
#if defined( I_AM_EGK) // da definirsi solo nella DLL
|
|
#define EGK_EXPORT __declspec( dllexport)
|
|
#else
|
|
#define EGK_EXPORT __declspec( dllimport)
|
|
#endif
|
|
|
|
//-----------------------------------------------------------------------------
|
|
class PolyLine
|
|
{
|
|
public :
|
|
EGK_EXPORT PolyLine( void) ;
|
|
EGK_EXPORT ~PolyLine( void) ;
|
|
EGK_EXPORT bool AddUPoint( double dPar, const Point3d& ptP) ;
|
|
EGK_EXPORT bool EraseFirstUPoint( void) ;
|
|
EGK_EXPORT bool AddOffsetToU( double dOffset) ;
|
|
EGK_EXPORT bool Splice( PolyLine& PL) ;
|
|
EGK_EXPORT int GetPointNbr( void) const
|
|
{ return m_nCount ; }
|
|
EGK_EXPORT bool GetFirstUPoint( double* pdPar, Point3d* pptP) const ;
|
|
EGK_EXPORT bool GetNextUPoint( double* pdPar, Point3d* pptP) const ;
|
|
EGK_EXPORT bool GetFirstU( double& dPar) const
|
|
{ return GetFirstUPoint( &dPar, nullptr) ; }
|
|
EGK_EXPORT bool GetNextU( double& dPar) const
|
|
{ return GetNextUPoint( &dPar, nullptr) ; }
|
|
EGK_EXPORT bool GetFirstPoint( Point3d& ptP) const
|
|
{ return GetFirstUPoint( nullptr, &ptP) ; }
|
|
EGK_EXPORT bool GetNextPoint( Point3d& ptP) const
|
|
{ return GetNextUPoint( nullptr, &ptP) ; }
|
|
EGK_EXPORT bool GetLastUPoint( double* pdPar, Point3d* pptP) const ;
|
|
EGK_EXPORT bool GetLastU( double& dPar)
|
|
{ return GetLastUPoint( &dPar, nullptr) ; }
|
|
EGK_EXPORT bool GetLastPoint( Point3d& ptP)
|
|
{ return GetLastUPoint( nullptr, &ptP) ; }
|
|
EGK_EXPORT int GetLineNbr( void) const
|
|
{ return ( m_nCount > 1 ? ( m_nCount - 1) : 0) ; }
|
|
EGK_EXPORT bool GetFirstULine( double* pdIni, Point3d* pptIni, double* pdFin, Point3d* pptFin) const ;
|
|
EGK_EXPORT bool GetNextULine( double* pdIni, Point3d* pptIni, double* pdFin, Point3d* pptFin) const ;
|
|
EGK_EXPORT bool GetFirstLine( Point3d& ptIni, Point3d& ptFin) const
|
|
{ return GetFirstULine( nullptr, &ptIni, nullptr, &ptFin) ; }
|
|
EGK_EXPORT bool GetNextLine( Point3d& ptIni, Point3d& ptFin) const
|
|
{ return GetNextULine( nullptr, &ptIni, nullptr, &ptFin) ; }
|
|
|
|
private :
|
|
int m_nCount ;
|
|
UPNTLIST m_lUPoints ;
|
|
mutable UPNTLIST::const_iterator m_iter ;
|
|
} ;
|