//---------------------------------------------------------------------------- // EgalTech 2013-2014 //---------------------------------------------------------------------------- // File : EgkStringUtils3d.h Data : 31.01.14 Versione : 1.5a9 // Contenuto : Dichiarazione delle funzioni di utilità 3d per le stringhe. // // // // Modifiche : 31.01.14 DS Creazione modulo. // // //---------------------------------------------------------------------------- #pragma once #include "/EgtDev/Include/EGnStringUtils.h" #include "/EgtDev/Include/EGkPoint3d.h" //----------------------- Macro per import/export ----------------------------- #undef EGK_EXPORT #if defined( I_AM_EGK) // da definirsi solo nella DLL #define EGK_EXPORT __declspec( dllexport) #else #define EGK_EXPORT __declspec( dllimport) #endif //---------------------------------------------------------------------------- EGK_EXPORT bool FromString( const std::string& sVal, Vector3d& vtVal) ; EGK_EXPORT bool FromString( const std::string& sVal, Point3d& ptVal) ; EGK_EXPORT bool FromString( const std::string& sVal, Point3d& ptVal, double& dW) ; inline const std::string ToString( Vector3d vtVal, int nPrec = 9) { std::string sBuff ; sBuff.reserve( 3 * 32 + 2) ; sBuff = ToString( vtVal.x, nPrec) + ',' + ToString( vtVal.y, nPrec) + ',' + ToString( vtVal.z, nPrec) ; return sBuff ; } inline const std::string ToString( Point3d ptVal, int nPrec = 6) { std::string sBuff ; sBuff.reserve( 3 * 32 + 2) ; sBuff = ToString( ptVal.x, nPrec) + ',' + ToString( ptVal.y, nPrec) + ',' + ToString( ptVal.z, nPrec) ; return sBuff ; }