5367ebddbd
- aggiornamento prototipi.
51 lines
1.8 KiB
C++
51 lines
1.8 KiB
C++
//----------------------------------------------------------------------------
|
|
// EgalTech 2014-2023
|
|
//----------------------------------------------------------------------------
|
|
// File : EGkStmFromTriangleSoup.h Data : 07.05.23 Versione : 2.5e2
|
|
// Contenuto : Dichiarazione della classe StmFromTriangleSoup.
|
|
//
|
|
//
|
|
//
|
|
// Modifiche : 19.05.14 DS Creazione modulo.
|
|
//
|
|
//
|
|
//----------------------------------------------------------------------------
|
|
|
|
#pragma once
|
|
|
|
#include "/EgtDev/Include/EGkSurfTriMesh.h"
|
|
#include "/EgtDev/Include/EGkPointGrid3d.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 StmFromTriangleSoup
|
|
{
|
|
public :
|
|
EGK_EXPORT static const int GRID_STD_BUCKETS = 50000 ;
|
|
|
|
public :
|
|
EGK_EXPORT StmFromTriangleSoup( void) ;
|
|
EGK_EXPORT ~StmFromTriangleSoup( void) ;
|
|
EGK_EXPORT bool Start( int nBuckets = GRID_STD_BUCKETS) ;
|
|
EGK_EXPORT bool AddTriangle( const Triangle3d& Tria) ;
|
|
EGK_EXPORT bool AddTriangle( const Point3d& ptP0, const Point3d& ptP1, const Point3d& ptP2,
|
|
double dU0 = -1, double dV0 = -1, double dU1 = -1, double dV1 = -1, double dU2 = -1, double dV2 = -1) ;
|
|
EGK_EXPORT bool AddSurfTriMesh( const ISurfTriMesh& stmSource) ;
|
|
EGK_EXPORT bool End( void) ;
|
|
EGK_EXPORT ISurfTriMesh* GetSurf( void) ;
|
|
|
|
private :
|
|
inline int AddVertex( const Point3d& ptP, double dU = -1, double dV = -1) ;
|
|
|
|
private :
|
|
ISurfTriMesh* m_pSTM ;
|
|
PointGrid3d m_VertGrid ;
|
|
} ;
|