Compare commits
2 Commits
ThreeJS
...
ThreeJS_Fiera
| Author | SHA1 | Date | |
|---|---|---|---|
| e5eb2e811f | |||
| 09bdbe99d6 |
Binary file not shown.
+1006
-606
File diff suppressed because it is too large
Load Diff
+63
-52
@@ -1,12 +1,12 @@
|
||||
//----------------------------------------------------------------------------
|
||||
// EgalWare 2022-2022
|
||||
//----------------------------------------------------------------------------
|
||||
// File : ExportThreeJS.h Data : 05.07.22 Versione : 1.5h2
|
||||
// File : ExportThreeJS.h Data : 05.07.22 Versione : 2.4j1
|
||||
// Contenuto : Dichiarazione della classe ExportThreeJS.
|
||||
//
|
||||
//
|
||||
//
|
||||
// Modifiche : 08.07.22
|
||||
// Modifiche : 19.10.22
|
||||
//
|
||||
//
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -18,66 +18,77 @@
|
||||
#include "/EgtDev/Include/EGkColor.h"
|
||||
#include "/EgtDev/Include/EGkIntersSurfTmSurfTm.h"
|
||||
|
||||
class IGdbIterator;
|
||||
class IGeoObj;
|
||||
class Frame3d;
|
||||
class IGdbIterator ;
|
||||
class IGeoObj ;
|
||||
class Frame3d ;
|
||||
|
||||
|
||||
struct sSurfDist {
|
||||
const ISurfTriMesh* SurvAlpha;
|
||||
double dDistance = 0;
|
||||
std::string sName;
|
||||
const ISurfTriMesh* SurvAlpha ;
|
||||
double dDistance = 0 ;
|
||||
std::string sName ;
|
||||
};
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
class ExportThreeJS : public IExportThreeJS
|
||||
{
|
||||
public:
|
||||
virtual bool SetOptions(int nFilter);
|
||||
virtual bool Export(IGeomDB* pGDB, int nId, const std::string& sFile, IEGrScene* pScene, bool bUdm);
|
||||
public:
|
||||
virtual bool SetOptions( int nFilter) ;
|
||||
virtual bool Export( IGeomDB* pGDB, int nId, const std::string& sFile, IEGrScene* pScene, bool bUdm) ;
|
||||
|
||||
public:
|
||||
ExportThreeJS(void) : m_nFilter(EEXFLT_DEFAULT) {}
|
||||
public:
|
||||
ExportThreeJS( void) : m_nFilter( EEXFLT_DEFAULT) {}
|
||||
|
||||
private:
|
||||
bool HeadAmbient( IEGrScene* pScene, IGeomDB* pGDB, int nId) ;
|
||||
bool FinishAmbient() ;
|
||||
bool ExportVector3D( const std::string& sName, const IGeoObj* pGeoObj, const Frame3d& frFrame, const Color& cCol, const int nIdGroup) ;
|
||||
bool ExportPoint3D( const std::string& sName, const IGeoObj* pGeoObj, const Frame3d& frFrame, const Color& cCol, const int nIdGroup) ;
|
||||
bool ExportFrame3D( const std::string& sName, const IGeoObj* pGeoObj, const Frame3d& frFrame, const Color& cCol, const int nIdGroup) ;
|
||||
bool ExportLine3D( const std::string& sName, const IGeoObj* pGeoObj, const Frame3d& frFrame, const Color& cCol, const int nIdGroup) ;
|
||||
bool ExportCurveComp3D( const std::string& sName, const IGeoObj* pGeoObj, const Frame3d& frFrame, const Color& cCol, const int nIdGroup) ; //archi e curve composite
|
||||
bool ExportSTM( const std::string& sName, const IGeoObj* pGeoObj, const Frame3d& frFrame, const Color& cCol, const int nIdGroup) ;
|
||||
bool ExportSFR( const std::string& sName, const IGeoObj* pGeoObj, const Frame3d& frFrame, const Color& cCol, const int nIdGroup) ;
|
||||
bool ExportSBezier(const std::string& sName, const IGeoObj* pGeoObj, const Frame3d& frFrame, const Color& cCol, const int nIdGroup) ;
|
||||
bool ExportText( const std::string& sName, const IGeoObj* pGeoObj, const Frame3d& frFrame, const Color& cCol, const int nIdGroup) ;
|
||||
bool ExportDimension( const std::string& sName, const IGeoObj* pGeoObj, const Frame3d& frFrame, const Color& cCol, const int nIdGroup) ;
|
||||
bool ScanGroup( const IGdbIterator& iIter, IGeomDB* pGDB, const int nIdGroup) ;
|
||||
bool ExportObject( const IGdbIterator& iIter, IGeomDB* pGDB, const int nIdGroup) ;
|
||||
bool TestFilter( int nLev, int nMode, int nStat) ;
|
||||
private:
|
||||
bool CreateFolderSpace( const std::string& SFileName, const std::string& sUserPath, const std::string& sLibPath) ;
|
||||
bool HeadAmbient( IEGrScene* pScene, IGeomDB* pGDB, int nId) ;
|
||||
bool FinishAmbient() ;
|
||||
bool CompressAll( const std::string& sFile) ;
|
||||
bool ExportVector3D( const std::string& sName, const IGeoObj* pGeoObj, const Frame3d& frFrame, const Color& cCol, const int nIdGroup) ;
|
||||
bool ExportPoint3D( const std::string& sName, const IGeoObj* pGeoObj, const Frame3d& frFrame, const Color& cCol, const int nIdGroup) ;
|
||||
bool ExportFrame3D( const std::string& sName, const IGeoObj* pGeoObj, const Frame3d& frFrame, const Color& cCol, const int nIdGroup) ;
|
||||
bool ExportLine3D( const std::string& sName, const IGeoObj* pGeoObj, const Frame3d& frFrame, const Color& cCol, const int nIdGroup) ;
|
||||
bool ExportCurveComp3D( const std::string& sName, const IGeoObj* pGeoObj, const Frame3d& frFrame, const Color& cCol, const int nIdGroup) ;
|
||||
bool ExportSTM( const std::string& sName, const IGeoObj* pGeoObj, const Frame3d& frFrame, const Color& cCol, const int nIdGroup) ;
|
||||
bool ExportSFR( const std::string& sName, const IGeoObj* pGeoObj, const Frame3d& frFrame, const Color& cCol, const int nIdGroup) ;
|
||||
bool ExportSBezier(const std::string& sName, const IGeoObj* pGeoObj, const Frame3d& frFrame, const Color& cCol, const int nIdGroup) ;
|
||||
bool ExportText( const std::string& sName, const IGeoObj* pGeoObj, const Frame3d& frFrame, const Color& cCol, const int nIdGroup) ;
|
||||
bool ExportDimension( const std::string& sName, const IGeoObj* pGeoObj, const Frame3d& frFrame, const Color& cCol, const int nIdGroup) ;
|
||||
bool ScanGroup( const IGdbIterator& iIter, IGeomDB* pGDB, const int nIdGroup) ;
|
||||
bool ExportObject( const IGdbIterator& iIter, IGeomDB* pGDB, const int nIdGroup) ;
|
||||
bool TestFilter( int nLev, int nMode, int nStat) ;
|
||||
|
||||
private:
|
||||
int m_nFilter ; // filtro su livello, modo e stato
|
||||
Writer m_Writer ; // scrittore di file di testo oggetto
|
||||
std::string m_sUdm ; // udm della scena
|
||||
Point3d m_ptMin ; // punto minimo del box3d
|
||||
double m_dimX ; // dimX Box3d Global
|
||||
double m_dimY ; // dimY Box3d Global
|
||||
double m_dimZ ; // dimZ Box3d Global
|
||||
double m_dDistance ; // scala per pan e zoom
|
||||
int m_nCont = 0 ; // contatore per linee interne ai testi
|
||||
Point3d m_ptCamera ; // Camera look at
|
||||
Point3d m_ptCenter ; // Camera center
|
||||
double m_dHalfWidth ; // Lunghezza/2 piano di proiezione (culling)
|
||||
double m_dHalfHeight ; // Altezza/2 piano di proiezione (culling)
|
||||
double m_ZNear ; // Distanza (lungo Z) piano di proiezione da origine (culling)
|
||||
double m_ZFar ; // Distanza (lungo Z) piano di culling da origine (culling)
|
||||
double m_dCameraPhi ; // [0,180] angolo phi in coordinate polari della telecamera
|
||||
double m_dCameraTheta ; // [0, 360) angolo Theta in coordinate polari della telecamera
|
||||
int m_ANG_TOL_STD_DEG = 15 ; // Interpolazione testo
|
||||
Frame3d m_frTHREEJSFrame ; // frame di ThreeJS
|
||||
std::list< sSurfDist> m_lTranspSurf ; // Lista di superfici trasparenti
|
||||
int m_nGroupCount = -1 ; // Contatore del gruppo
|
||||
std::string m_sCodMenu ; // Stringa per la creazione del menu laterale della scena
|
||||
|
||||
// Parametri...
|
||||
bool m_bShowGrid = true ; // se esportare o meno la griglia dalla scena
|
||||
bool m_bUdm_mm ; // se l'unità di misura è in mm
|
||||
std::string m_sPath ; // Path aggiuntivo dove salvare il file (il vero path è nel LUA)
|
||||
|
||||
public:
|
||||
static std::string m_sThreeJSAuxDir ; // direttorio librerie
|
||||
|
||||
private:
|
||||
int m_nFilter; // filtro su livello, modo e stato
|
||||
Writer m_Writer; // scrittore di file di testo oggetto
|
||||
Point3d m_ptMin; // punto minimo del box3d
|
||||
bool m_bUdm_mm; // se l'unità di misura è in mm
|
||||
double m_dimX; // dimX Box3d Global
|
||||
double m_dimY; // dimY Box3d Global
|
||||
double m_dimZ; // dimZ Box3d Global
|
||||
double m_dDistance; // scala per pan e zoom
|
||||
int m_nCont = 0; // contatore per linee interne ai testi
|
||||
Point3d m_ptCamera; // Camera look at
|
||||
Point3d m_ptCenter; // Camera center
|
||||
double m_dHalfWidth; // Lunghezza/2 piano di proiezione (culling)
|
||||
double m_dHalfHeight; // Altezza/2 piano di proiezione (culling)
|
||||
double m_ZNear; // Distanza (lungo Z) piano di proiezione da origine (culling)
|
||||
double m_ZFar; // Distanza (lungo Z) piano di culling da origine (culling)
|
||||
int m_ANG_TOL_STD_DEG = 15; // Interpolazione testo
|
||||
Frame3d m_frTHREEJSFrame; // frame di ThreeJS
|
||||
std::list< sSurfDist> m_lTranspSurf; // Lista di superfici trasparenti
|
||||
int m_nGroupCount = -1; // Contatore del gruppo
|
||||
std::string m_sCodMenu; // Stringa per la creazione del menu laterale della scena
|
||||
std::string m_spath; // Path dove salvare il file
|
||||
std::string m_sUdm; // udm della scena
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user