Files
EgtExchange/ExportThreeJS.h
riccardo.elitropi 3881a4bb21 EgtExchange:
- modifica terzo parametro LUA (gruppi) e misure.
2022-09-20 17:19:21 +02:00

84 lines
4.7 KiB
C++

//----------------------------------------------------------------------------
// EgalWare 2022-2022
//----------------------------------------------------------------------------
// File : ExportThreeJS.h Data : 05.07.22 Versione : 1.5h2
// Contenuto : Dichiarazione della classe ExportThreeJS.
//
//
//
// Modifiche : 08.07.22
//
//
//----------------------------------------------------------------------------
#pragma once
#include "/EgtDev/Include/EExExportThreeJS.h"
#include "/EgtDev/Include/EGnWriter.h"
#include "/EgtDev/Include/EGkColor.h"
#include "/EgtDev/Include/EGkIntersSurfTmSurfTm.h"
class IGdbIterator;
class IGeoObj;
class Frame3d;
struct sSurfDist {
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:
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:
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
};