a645be8f7d
- aggiunti prototipi per Voronoi - aggiornamento prototipi.
64 lines
3.0 KiB
C++
64 lines
3.0 KiB
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2015-2021
|
|
//----------------------------------------------------------------------------
|
|
// File : EGkSfrCreate.h Data : 25.08.21 Versione : 2.1h3
|
|
// Contenuto : Dichiarazione funzioni per creazione superfici Sfr :
|
|
// Rectangle, Disk, FromCurves.
|
|
//
|
|
//
|
|
// Modifiche : 10.08.15 DS Creazione modulo.
|
|
//
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
#pragma once
|
|
|
|
#include "/EgtDev/Include/EGkSurfFlatRegion.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 Triangle3d ;
|
|
|
|
//----------------------------------------------------------------------------
|
|
EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionRectangle( double dWidth, double dLen) ;
|
|
EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionStadium( double dWidth, double dLen) ;
|
|
EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionDisk( double dRadius) ;
|
|
EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionFromFatCurve( ICurve* pCrv, double dRadius,
|
|
bool bSquareEnds, bool bSquareMids, bool bUseVoronoi = false) ;
|
|
// NB : la curva ingrassata non deve autointersecarsi
|
|
EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionFromTriangle( const Triangle3d& Tria) ;
|
|
EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionFromPolyLine( const PolyLine& ContourPolyLine) ;
|
|
EGK_EXPORT ISurfFlatRegion* GetSurfFlatRegionFromPolyLineVector( const POLYLINEVECTOR& vContoursPolyLineVec) ;
|
|
|
|
//----------------------------------------------------------------------------
|
|
class SurfFlatRegionByContours
|
|
{
|
|
public :
|
|
EGK_EXPORT SurfFlatRegionByContours( bool bAllowedMore = true, bool bAllowedMultiChunk = true)
|
|
: m_bAllowedMore( bAllowedMore), m_bAllowedMultiChunk( bAllowedMultiChunk), m_bFirst( true) {}
|
|
EGK_EXPORT ~SurfFlatRegionByContours( void) ;
|
|
EGK_EXPORT bool AddCurve( ICurve* pCrv) ; // TempProp possono essere usati per identificarle
|
|
EGK_EXPORT ISurfFlatRegion* GetSurf( void) ;
|
|
EGK_EXPORT bool AllCurvesUsed( void) ;
|
|
EGK_EXPORT bool GetUnusedCurveTempProps( INTVECTOR& vId) ;
|
|
|
|
private :
|
|
bool Prepare( void) ;
|
|
|
|
private :
|
|
typedef std::pair<int,double> INDAREA ; // coppia indice, area
|
|
typedef std::vector<INDAREA> INDAREAVECTOR ; // vettore di coppie indice, area
|
|
|
|
private :
|
|
bool m_bAllowedMore ; // ammesse più regioni
|
|
bool m_bAllowedMultiChunk ; // ammesse regioni con più componenti disgiunti (chunk)
|
|
bool m_bFirst ; // flag per prima superficie non ancora richiesta
|
|
ICURVEPVECTOR m_vpCrv ; // vettore di puntatori a curve, l'oggetto ne è possessore
|
|
INDAREAVECTOR m_vArea ; // vettore indice + area di ogni curva
|
|
} ; |