EgtGeomKernel 1.5c5 :

- IGdbIterator può utilizzare un altro IGdbIterator per andare sul gruppo
- aggiunta gestione nomi di colori standard
- Aggiunte ToString e FromString per Color
- TSC ora accetta colori standard da nome.
This commit is contained in:
Dario Sassi
2014-03-12 21:19:47 +00:00
parent 0b9c1a8fc5
commit 01ce6ea4a4
18 changed files with 391 additions and 119 deletions
+22
View File
@@ -103,3 +103,25 @@ FromString( const string& sVal, Frame3d& frFrame)
// imposto il riferimento
return frFrame.Set( ptOrig, vtDirX, vtDirY, vtDirZ) ;
}
//----------------------------------------------------------------------------
bool
FromString( const string& sVal, Color& cCol)
{
// divido la stringa in parametri
STRVECTOR vsParams ;
Tokenize( sVal, ",", vsParams) ;
// devono essere 4 parametri : Red, Green, Blue, Alpha
if ( vsParams.size() != 4)
return false ;
// recupero i parametri
int nRed, nGreen, nBlue, nAlpha ;
if ( ! FromString( vsParams[0], nRed) ||
! FromString( vsParams[1], nGreen) ||
! FromString( vsParams[2], nBlue) ||
! FromString( vsParams[3], nAlpha))
return false ;
// assegno il colore
cCol.Set( nRed, nGreen, nBlue, nAlpha) ;
return true ;
}