EgtGeomKernel 1.4a2 : Aggiunti gruppi per avere struttura DB ad albero.

This commit is contained in:
Dario Sassi
2013-12-02 08:24:11 +00:00
parent bf3e8b5ff9
commit 19e382b435
22 changed files with 787 additions and 338 deletions
+6 -12
View File
@@ -69,7 +69,7 @@ bool
GeoVector3d::Save( ostream& osOut) const
{
// parametri : punto
osOut << ToString( m_vtV) << endl ;
osOut << ToString( m_vtV) << ";" << endl ;
return true ;
}
@@ -78,22 +78,16 @@ GeoVector3d::Save( ostream& osOut) const
bool
GeoVector3d::Load( CScan& TheScanner)
{
string sLine ;
STRVECTOR vsParams ;
string sLine ;
// leggo la prossima linea
if ( ! TheScanner.GetLine( sLine))
return false ;
// la divido in parametri
Tokenize( sLine, ",", vsParams) ;
// 3 parametri : le coordinate
if ( vsParams.size() != 3)
return false ;
// recupero le tre coordinate
if ( ! FromString( vsParams[0], m_vtV.x) ||
! FromString( vsParams[1], m_vtV.y) ||
! FromString( vsParams[2], m_vtV.z))
// 1 solo parametro : il vettore
TrimRight( sLine, ";") ;
// recupero il vettore
if ( ! FromString( sLine, m_vtV))
return false ;
return true ;