Include :
- aggiornamenti - aggiunto EGkStmFromTriangleSoup.
This commit is contained in:
+3
-2
@@ -1,12 +1,13 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2014-2014
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EExImportDxf.h Data : 16.04.14 Versione : 1.5d4
|
||||
// File : EExImportDxf.h Data : 19.05.14 Versione : 1.5e4
|
||||
// Contenuto : Dichiarazione della interfaccia IImportDxf.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 16.04.14 DS Creazione modulo.
|
||||
// 19.05.14 DS Aggiunto il fattore di scala.
|
||||
//
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -30,7 +31,7 @@ class __declspec( novtable) IImportDxf
|
||||
{
|
||||
public :
|
||||
virtual ~IImportDxf( void) {}
|
||||
virtual bool Import( const std::string& sFile, IGeomDB* pGDB, int nIdGroup) = 0 ;
|
||||
virtual bool Import( const std::string& sFile, IGeomDB* pGDB, int nIdGroup, double dScaleFactor = 1) = 0 ;
|
||||
} ;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@
|
||||
//
|
||||
//
|
||||
// Modifiche : 04.04.14 DS Creazione modulo.
|
||||
// 16.05.15 DS Aggiunto il fattore di scala.
|
||||
// 16.05.14 DS Aggiunto il fattore di scala.
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalTech 2014-2014
|
||||
//----------------------------------------------------------------------------
|
||||
// File : EGkStmFromTriangleSoup.h Data : 19.05.14 Versione : 1.5e7
|
||||
// Contenuto : Dichiarazione della classe StmFromTriangleSoup.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 19.05.14 DS Creazione modulo.
|
||||
//
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "/EgtDev/Include/EGkPointGrid3d.h"
|
||||
#include "/EgtDev/Include/EGkSurfTriMesh.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( Triangle3d& Tria) ;
|
||||
EGK_EXPORT bool End( void) ;
|
||||
EGK_EXPORT ISurfTriMesh* GetSurf( void) ;
|
||||
|
||||
private :
|
||||
ISurfTriMesh* m_pSTM ;
|
||||
PointGrid3d m_VertGrid ;
|
||||
} ;
|
||||
@@ -25,6 +25,12 @@ class Triangle3d
|
||||
{ ptP[0] = ptP0 ; ptP[1] = ptP1 ; ptP[2] = ptP2 ; vtN.Set( 0, 0, 0) ; }
|
||||
void Set( const Point3d& ptP0, const Point3d& ptP1, const Point3d& ptP2, const Vector3d& vtV)
|
||||
{ ptP[0] = ptP0 ; ptP[1] = ptP1 ; ptP[2] = ptP2 ; vtN = vtV ; }
|
||||
bool SetP( int nId, const Point3d& ptV)
|
||||
{ if ( nId < 0 || nId >= 3)
|
||||
return false ;
|
||||
ptP[nId] = ptV ;
|
||||
return true ;
|
||||
}
|
||||
bool Validate( void)
|
||||
{ if ( AreSamePointNear( ptP[0], ptP[1]) || AreSamePointNear( ptP[0], ptP[2]))
|
||||
return false ;
|
||||
@@ -35,6 +41,14 @@ class Triangle3d
|
||||
vtN = vtV ;
|
||||
return true ;
|
||||
}
|
||||
bool ToGlob( const Frame3d& frRef)
|
||||
{ return ( ptP[0].ToGlob( frRef) && ptP[1].ToGlob( frRef) && ptP[2].ToGlob( frRef)) ; }
|
||||
bool ToLoc( const Frame3d& frRef)
|
||||
{ return ( ptP[0].ToLoc( frRef) && ptP[1].ToLoc( frRef) && ptP[2].ToLoc( frRef)) ; }
|
||||
bool LocToLoc( const Frame3d& frOri, const Frame3d& frDest)
|
||||
{ return ( ptP[0].LocToLoc( frOri, frDest) &&
|
||||
ptP[1].LocToLoc( frOri, frDest) &&
|
||||
ptP[2].LocToLoc( frOri, frDest)) ; }
|
||||
const Point3d& GetP( int nId) const
|
||||
{ if ( nId >= 0 && nId < 3)
|
||||
return ptP[nId] ;
|
||||
|
||||
Reference in New Issue
Block a user