Compare commits
2 Commits
ThreeJS
...
ThreeJS_Fiera
| Author | SHA1 | Date | |
|---|---|---|---|
| e5eb2e811f | |||
| 09bdbe99d6 |
Binary file not shown.
+975
-575
File diff suppressed because it is too large
Load Diff
+49
-38
@@ -1,12 +1,12 @@
|
|||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
// EgalWare 2022-2022
|
// 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.
|
// Contenuto : Dichiarazione della classe ExportThreeJS.
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Modifiche : 08.07.22
|
// Modifiche : 19.10.22
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
@@ -18,36 +18,38 @@
|
|||||||
#include "/EgtDev/Include/EGkColor.h"
|
#include "/EgtDev/Include/EGkColor.h"
|
||||||
#include "/EgtDev/Include/EGkIntersSurfTmSurfTm.h"
|
#include "/EgtDev/Include/EGkIntersSurfTmSurfTm.h"
|
||||||
|
|
||||||
class IGdbIterator;
|
class IGdbIterator ;
|
||||||
class IGeoObj;
|
class IGeoObj ;
|
||||||
class Frame3d;
|
class Frame3d ;
|
||||||
|
|
||||||
|
|
||||||
struct sSurfDist {
|
struct sSurfDist {
|
||||||
const ISurfTriMesh* SurvAlpha;
|
const ISurfTriMesh* SurvAlpha ;
|
||||||
double dDistance = 0;
|
double dDistance = 0 ;
|
||||||
std::string sName;
|
std::string sName ;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
class ExportThreeJS : public IExportThreeJS
|
class ExportThreeJS : public IExportThreeJS
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
virtual bool SetOptions(int nFilter);
|
virtual bool SetOptions( int nFilter) ;
|
||||||
virtual bool Export(IGeomDB* pGDB, int nId, const std::string& sFile, IEGrScene* pScene, bool bUdm);
|
virtual bool Export( IGeomDB* pGDB, int nId, const std::string& sFile, IEGrScene* pScene, bool bUdm) ;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ExportThreeJS(void) : m_nFilter(EEXFLT_DEFAULT) {}
|
ExportThreeJS( void) : m_nFilter( EEXFLT_DEFAULT) {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
bool CreateFolderSpace( const std::string& SFileName, const std::string& sUserPath, const std::string& sLibPath) ;
|
||||||
bool HeadAmbient( IEGrScene* pScene, IGeomDB* pGDB, int nId) ;
|
bool HeadAmbient( IEGrScene* pScene, IGeomDB* pGDB, int nId) ;
|
||||||
bool FinishAmbient() ;
|
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 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 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 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 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 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 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 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 ExportSBezier(const std::string& sName, const IGeoObj* pGeoObj, const Frame3d& frFrame, const Color& cCol, const int nIdGroup) ;
|
||||||
@@ -57,27 +59,36 @@ private:
|
|||||||
bool ExportObject( 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) ;
|
bool TestFilter( int nLev, int nMode, int nStat) ;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int m_nFilter; // filtro su livello, modo e stato
|
int m_nFilter ; // filtro su livello, modo e stato
|
||||||
Writer m_Writer; // scrittore di file di testo oggetto
|
Writer m_Writer ; // scrittore di file di testo oggetto
|
||||||
Point3d m_ptMin; // punto minimo del box3d
|
std::string m_sUdm ; // udm della scena
|
||||||
bool m_bUdm_mm; // se l'unità di misura è in mm
|
Point3d m_ptMin ; // punto minimo del box3d
|
||||||
double m_dimX; // dimX Box3d Global
|
double m_dimX ; // dimX Box3d Global
|
||||||
double m_dimY; // dimY Box3d Global
|
double m_dimY ; // dimY Box3d Global
|
||||||
double m_dimZ; // dimZ Box3d Global
|
double m_dimZ ; // dimZ Box3d Global
|
||||||
double m_dDistance; // scala per pan e zoom
|
double m_dDistance ; // scala per pan e zoom
|
||||||
int m_nCont = 0; // contatore per linee interne ai testi
|
int m_nCont = 0 ; // contatore per linee interne ai testi
|
||||||
Point3d m_ptCamera; // Camera look at
|
Point3d m_ptCamera ; // Camera look at
|
||||||
Point3d m_ptCenter; // Camera center
|
Point3d m_ptCenter ; // Camera center
|
||||||
double m_dHalfWidth; // Lunghezza/2 piano di proiezione (culling)
|
double m_dHalfWidth ; // Lunghezza/2 piano di proiezione (culling)
|
||||||
double m_dHalfHeight; // Altezza/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_ZNear ; // Distanza (lungo Z) piano di proiezione da origine (culling)
|
||||||
double m_ZFar; // Distanza (lungo Z) piano di culling da origine (culling)
|
double m_ZFar ; // Distanza (lungo Z) piano di culling da origine (culling)
|
||||||
int m_ANG_TOL_STD_DEG = 15; // Interpolazione testo
|
double m_dCameraPhi ; // [0,180] angolo phi in coordinate polari della telecamera
|
||||||
Frame3d m_frTHREEJSFrame; // frame di ThreeJS
|
double m_dCameraTheta ; // [0, 360) angolo Theta in coordinate polari della telecamera
|
||||||
std::list< sSurfDist> m_lTranspSurf; // Lista di superfici trasparenti
|
int m_ANG_TOL_STD_DEG = 15 ; // Interpolazione testo
|
||||||
int m_nGroupCount = -1; // Contatore del gruppo
|
Frame3d m_frTHREEJSFrame ; // frame di ThreeJS
|
||||||
std::string m_sCodMenu; // Stringa per la creazione del menu laterale della scena
|
std::list< sSurfDist> m_lTranspSurf ; // Lista di superfici trasparenti
|
||||||
std::string m_spath; // Path dove salvare il file
|
int m_nGroupCount = -1 ; // Contatore del gruppo
|
||||||
std::string m_sUdm; // udm della scena
|
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
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user