EgtExchange :
- modifica e aggiunta funzioni per lettura librerie ThreeJS esterne.
This commit is contained in:
@@ -40,6 +40,7 @@ static const char* EEX_GETEEXVERSION = "GetEExVersion" ;
|
||||
static const char* EEX_SETEEXKEY = "SetEExKey" ;
|
||||
static const char* EEX_SETEEXNETHWKEY = "SetEExNetHwKey" ;
|
||||
static const char* EEX_SETBTLAUXDIR = "SetBtlAuxDir" ;
|
||||
static const char* EEX_SETTHREEJSAUXDIR = "SetThreeJSAuxDir" ;
|
||||
static const char* EEX_CREATEBEAMMGR = "CreateBeamMgr" ;
|
||||
static const char* EEX_CREATEIMPORTBTL = "CreateImportBtl" ;
|
||||
static const char* EEX_CREATEIMPORTBTLX = "CreateImportBtlx" ;
|
||||
@@ -180,6 +181,22 @@ MySetBtlAuxDir( const string& sBtlAuxDir)
|
||||
return pFun( sBtlAuxDir) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
MySetThreeJSAuxDir( const string& sThreeJSAuxDir )
|
||||
{
|
||||
// verifico caricamento libreria EgtExchange
|
||||
if ( s_hEEx == nullptr)
|
||||
return false ;
|
||||
// recupero funzione creazione oggetto
|
||||
typedef bool ( *PF_SetThreeJSAuxDir)( const string& sThreeJSAuxDir) ;
|
||||
PF_SetThreeJSAuxDir pFun = ( PF_SetThreeJSAuxDir) GetProcAddress( s_hEEx, EEX_SETTHREEJSAUXDIR) ;
|
||||
if ( pFun == nullptr)
|
||||
return false ;
|
||||
return pFun( sThreeJSAuxDir) ;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
IBeamMgr*
|
||||
MyCreateBeamMgr( void)
|
||||
|
||||
@@ -41,6 +41,7 @@ void MySetEExKey( const std::string& sKey) ;
|
||||
void MySetEExNetHwKey( bool bNetHwKey) ;
|
||||
const char* MyGetEExVersion( void) ;
|
||||
bool MySetBtlAuxDir( const std::string& sBtlAuxDir) ;
|
||||
bool MySetThreeJSAuxDir( const std::string& sThreeJSAuxDir) ;
|
||||
IBeamMgr* MyCreateBeamMgr( void) ;
|
||||
IImportBtl* MyCreateImportBtl( void) ;
|
||||
IImportBtlx* MyCreateImportBtlx( void) ;
|
||||
|
||||
+13
-4
@@ -119,6 +119,14 @@ ExeSetBtlAuxDir( const string& sBtlAuxDir)
|
||||
return MySetBtlAuxDir( sBtlAuxDir) ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeSetThreeJSAuxDir( const string & sThreeJSAuxDir )
|
||||
{
|
||||
return MySetThreeJSAuxDir( sThreeJSAuxDir) ;
|
||||
}
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeImportBtl( const string& sFilePath, int nFlag)
|
||||
@@ -571,16 +579,17 @@ ExeExportThreeJS( int nId, const string& sFilePath, int nFilter)
|
||||
// preparo l'esportatore
|
||||
PtrOwner<IExportThreeJS> pExpThreeJS( MyCreateExportThreeJS()) ;
|
||||
bOk = bOk && ! IsNull( pExpThreeJS) ;
|
||||
// eseguo l'esportazione
|
||||
pExpThreeJS->SetOptions( nFilter) ;
|
||||
|
||||
// eseguo l'esportazione
|
||||
bOk = bOk && pExpThreeJS->SetOptions( nFilter) ;
|
||||
bOk = bOk && pExpThreeJS->Export( pGeomDB, nId, sFilePath, pScene, ExeUiUnitsAreMM()) ;
|
||||
// se richiesto, salvo il comando Lua equivalente
|
||||
// se richiesto, salvo il comando Lua equivalente
|
||||
if ( IsCmdLog()) {
|
||||
string sLua = "EgtExportThreeJS(" + ToString( nId) + ",'" +
|
||||
StringToLuaString( sFilePath) + "')" +
|
||||
" -- Ok=" + ToString( bOk) ;
|
||||
LOG_INFO( GetCmdLogger(), sLua.c_str()) ;
|
||||
}
|
||||
// restituisco il risultato
|
||||
// restituisco il risultato
|
||||
return bOk ;
|
||||
}
|
||||
|
||||
+1
-1
@@ -249,7 +249,7 @@ LuaExportThreeJS( lua_State* L)
|
||||
string sFilePath ;
|
||||
LuaCheckParam( L, 2, sFilePath)
|
||||
int nFilter = EEXFLT_DEFAULT;
|
||||
LuaGetParam(L, 3, nFilter);
|
||||
LuaGetParam( L, 3, nFilter);
|
||||
LuaClearStack( L) ;
|
||||
// creo il file
|
||||
bool bOk = ExeExportThreeJS( nGroupId, sFilePath, nFilter) ;
|
||||
|
||||
Reference in New Issue
Block a user