EgtGeomKernel :
- cambiato Load, con uso di NgeReader.
This commit is contained in:
+9
-17
@@ -17,6 +17,7 @@
|
||||
#include "GeoConst.h"
|
||||
#include "GeoObjFactory.h"
|
||||
#include "NgeWriter.h"
|
||||
#include "NgeReader.h"
|
||||
#include "/EgtDev/Include/EGkStringUtils3d.h"
|
||||
#include <new>
|
||||
|
||||
@@ -223,37 +224,28 @@ CurveArc::Save( NgeWriter& ngeOut) const
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
CurveArc::Load( Scanner& TheScanner)
|
||||
CurveArc::Load( NgeReader& ngeIn)
|
||||
{
|
||||
// imposto ricalcolo della grafica
|
||||
m_OGrMgr.Reset() ;
|
||||
// leggo la prossima linea
|
||||
string sLine ;
|
||||
if ( ! TheScanner.GetLine( sLine))
|
||||
return false ;
|
||||
// la divido in parametri
|
||||
STRVECTOR vsParams ;
|
||||
Tokenize( sLine, ";", vsParams) ;
|
||||
// 6 parametri : centro, versore normale, raggio, versore iniziale, angolo al centro e delta Z
|
||||
if ( vsParams.size() != 6)
|
||||
return false ;
|
||||
// leggo la prossima linea ( 6 parametri)
|
||||
// recupero il centro
|
||||
if ( ! FromString( vsParams[0], m_PtCen))
|
||||
if ( ! ngeIn.ReadPoint( m_PtCen, ";"))
|
||||
return false ;
|
||||
// recupero il versore normale
|
||||
if ( ! FromString( vsParams[1], m_VtN))
|
||||
if ( ! ngeIn.ReadVector( m_VtN, ";"))
|
||||
return false ;
|
||||
// recupero il raggio
|
||||
if ( ! FromString( vsParams[2], m_dRad))
|
||||
if ( ! ngeIn.ReadDouble( m_dRad, ";"))
|
||||
return false ;
|
||||
// recupero il versore iniziale
|
||||
if ( ! FromString( vsParams[3], m_VtS))
|
||||
if ( ! ngeIn.ReadVector( m_VtS, ";"))
|
||||
return false ;
|
||||
// recupero l'angolo al centro
|
||||
if ( ! FromString( vsParams[4], m_dAngCenDeg))
|
||||
if ( ! ngeIn.ReadDouble( m_dAngCenDeg, ";"))
|
||||
return false ;
|
||||
// recupero il delta N
|
||||
if ( ! FromString( vsParams[5], m_dDeltaN))
|
||||
if ( ! ngeIn.ReadDouble( m_dDeltaN, ";", true))
|
||||
return false ;
|
||||
// eseguo validazione
|
||||
return Validate() ;
|
||||
|
||||
Reference in New Issue
Block a user