Files
TestEGk/TestEGk.cpp
T
2013-11-21 17:15:11 +00:00

93 lines
2.3 KiB
C++

//----------------------------------------------------------------------------
// EgalTech 2013-2013
//----------------------------------------------------------------------------
// File : TestEGk.cpp Data : 20.11.13 Versione : 1.3a1
// Contenuto : Programma di test della libreria EgtGeomKernel.
//
//
//
// Modifiche : 20.11.13 DS Creazione modulo.
//
//
//----------------------------------------------------------------------------
//--------------------------- Include ----------------------------------------
#include "stdafx.h"
#include <iostream>
#include <string>
#include "\EgtDev\Include\EGkVersion.h"
#include "\EgtDev\Include\EGnVersion.h"
#include "\EgtDev\Include\EGkGeoPoint3d.h"
#include "\EgtDev\Include\EGnStringUtils.h"
//--------------------------- Define -----------------------------------------
#define STR_VER "1.3a1"
using namespace std ;
//----------------------------------------------------------------------------
int
wmain( int argc, wchar_t* argv[])
{
wstring sIn ;
// se debug, imposto stampe memory leaks all'uscita
#ifdef _DEBUG
_CrtSetDbgFlag( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF) ;
#endif
// interpreto i parametri di linea
// nome file di comandi
if ( argc >= 2)
sIn = argv[1] ;
else
sIn = L"In.tsc" ;
// versione del programma
#if defined( _WIN64)
#if defined( NDEBUG)
cout << "TestEGkR64.exe v." STR_VER << endl ;
#else
cout << "TestEGkD64.exe v." STR_VER << endl ;
#endif
#else
#if defined( NDEBUG)
cout << "TestEGkR32.exe v." STR_VER << endl ;
#else
cout << "TestEGkD32.exe v." STR_VER << endl ;
#endif
#endif
cout << GetEGkVersion() << endl ;
cout << GetEGnVersion() << endl ;
Point3d ptP ;
Vector3d vtV ;
ptP.Set( 0, 1, 2) ;
vtV.Set( 1, 1, 1) ;
ptP.Translate( vtV) ;
cout << "Point3d=" << ToString( ptP) << endl ;
IGeoPoint3d* pGPnt ;
pGPnt = GetGeoPoint3d( CreateGeoObj( KEY_GEO_PNT3D)) ;
if ( pGPnt != nullptr) {
pGPnt->Set( ptP) ;
pGPnt->Translate( vtV) ;
cout << "GeoPoint3d=" << ToString( *(pGPnt->GetPoint())) << endl ;
delete pGPnt ;
}
return 0;
}