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:
@@ -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 ;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user