From 294546102dd2156cb753175b9210f9a2b7e33e87 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Tue, 18 Mar 2014 08:51:01 +0000 Subject: [PATCH] EgtGraphics 1.5c6 : - modifiche per materiale - spostato comando PAUSE di TSC in EgtGeneral. --- EgtGraphics.rc | Bin 11390 -> 11390 bytes SceExecutor.cpp | 28 +--------------------------- SceExecutor.h | 9 ++++++--- SceneBasic.cpp | 2 +- SceneGeom.cpp | 2 +- 5 files changed, 9 insertions(+), 32 deletions(-) diff --git a/EgtGraphics.rc b/EgtGraphics.rc index a729a6acfe488df9524cd915716e1617dfaa8a49..d117324248c2c00d175e679eac7b1af5d1bc1b18 100644 GIT binary patch delta 81 zcmewt@h@V-H#SDI&G%&mnSs F+yKHO8}9%B delta 94 zcmewt@h@V-H#SDo&G%&mnI{)XOKeu)N@D@@_cKj)6U>8(=`e2oA!NmjRbq)0R03{- L9^+;+B@ZqDJRcsD diff --git a/SceExecutor.cpp b/SceExecutor.cpp index 72792b2..8d6cc1d 100644 --- a/SceExecutor.cpp +++ b/SceExecutor.cpp @@ -79,9 +79,7 @@ SceExecutor::Execute( const string& sCmd1, const string& sCmd2, const STRVECTOR& } // esecuzione comando - if ( sCmd1 == "PAUSE") - return ExecutePause( sCmd2, vsParams) ; - else if ( sCmd1 == "RD" || sCmd1 == "REDRAW") + if ( sCmd1 == "RD" || sCmd1 == "REDRAW") return ExecuteRedraw( sCmd2, vsParams) ; else if ( sCmd1 == "ZM" || sCmd1 == "ZOOM") return ExecuteZoom( sCmd2, vsParams) ; @@ -95,30 +93,6 @@ SceExecutor::Execute( const string& sCmd1, const string& sCmd2, const STRVECTOR& return false ; } -//---------------------------------------------------------------------------- -bool -SceExecutor::ExecutePause( const string& sCmd2, const STRVECTOR& vsParams) -{ - const int MIN_TIME = 0 ; - const int MAX_TIME = 10000 ; - - // 1 parametro : durata della pausa in ms - if ( vsParams.size() != 1) - return false ; - // tempo di attesa - int nTime ; - if ( ! FromString( vsParams[0], nTime)) - return false ; - if ( nTime < MIN_TIME) - nTime = MIN_TIME ; - else if ( nTime > MAX_TIME) - nTime = MAX_TIME ; - // eseguo - Sleep( nTime) ; - - return true ; -} - //---------------------------------------------------------------------------- bool SceExecutor::ExecuteRedraw( const string& sCmd2, const STRVECTOR& vsParams) diff --git a/SceExecutor.h b/SceExecutor.h index cd46c78..eda5c0b 100644 --- a/SceExecutor.h +++ b/SceExecutor.h @@ -20,18 +20,21 @@ //---------------------------------------------------------------------------- class SceExecutor : public ISceExecutor { - public : + public : // ICmdExecutor virtual bool SetCmdParser( ICmdParser* pParser) ; virtual bool AddExecutor( ICmdExecutor* pOtherExec) ; + virtual bool AddStandardVariables( void) + { return true ; } virtual bool Execute( const std::string& sCmd1, const std::string& sCmd2, const STRVECTOR& vsParams) ; + + public : // ISceExecutor + ~SceExecutor( void) ; virtual bool SetScene( IEGrScene* pScene) ; public : SceExecutor( void) ; - ~SceExecutor( void) ; private : - bool ExecutePause( const std::string& sCmd2, const STRVECTOR& vsParams) ; bool ExecuteRedraw( const std::string& sCmd2, const STRVECTOR& vsParams) ; bool ExecuteZoom( const std::string& sCmd2, const STRVECTOR& vsParams) ; bool ExecuteCenter( const std::string& sCmd2, const STRVECTOR& vsParams) ; diff --git a/SceneBasic.cpp b/SceneBasic.cpp index 1e1a744..dacb8b1 100644 --- a/SceneBasic.cpp +++ b/SceneBasic.cpp @@ -623,7 +623,7 @@ Scene::Draw( void) // aggiorno il colore di default if ( m_pGeomDB != nullptr) - m_pGeomDB->GetDefaultColor( m_colDef) ; + m_pGeomDB->GetDefaultMaterial( m_colDef) ; // imposto la dimensione standard dei punti glPointSize( 3) ; diff --git a/SceneGeom.cpp b/SceneGeom.cpp index 037ce24..880fbbd 100644 --- a/SceneGeom.cpp +++ b/SceneGeom.cpp @@ -183,7 +183,7 @@ Scene::DrawGeoObj( const IGdbIterator& iIter, int nObjStat) int nGeoType = pGeoObj->GetType() ; // recupero il colore Color cCol ; - if ( ! iIter.GetCalcColor( cCol)) + if ( ! iIter.GetCalcMaterial( cCol)) cCol = m_colDef ; // se vettore if ( nGeoType == GEO_VECT3D) {