diff --git a/TestEGk.cpp b/TestEGk.cpp index d1fba08..eda1f4f 100644 --- a/TestEGk.cpp +++ b/TestEGk.cpp @@ -18,6 +18,7 @@ #include "\EgtDev\Include\EGkVersion.h" #include "\EgtDev\Include\EGnVersion.h" #include "\EgtDev\Include\EGkGeoPoint3d.h" +#include "\EgtDev\Include\EGkGeoVector3d.h" #include "\EgtDev\Include\EGnStringUtils.h" @@ -61,32 +62,71 @@ wmain( int argc, wchar_t* argv[]) #endif #endif + // versione delle librerie cout << GetEGkVersion() << endl ; cout << GetEGnVersion() << endl ; - - Point3d ptP ; + // test di Point3d, Vector3d e Frame3d + Point3d ptP ; Vector3d vtV ; + Frame3d frF ; ptP.Set( 0, 1, 2) ; - vtV.Set( 1, 1, 1) ; - ptP.Translate( vtV) ; + vtV.Set( 2, 1, 0) ; + frF.Set( Point3d( 2, 1, 0), Frame3d::TOP) ; + ptP.ToGlob( frF) ; cout << "Point3d=" << ToString( ptP) << endl ; + cout << "Vector3d=" << ToString( vtV) << endl ; + cout << "Frame3d=" << ToString( frF.Orig()) << ';' << + ToString( frF.VersX()) << ';' << + ToString( frF.VersY()) << ';' << + ToString( frF.VersZ()) << endl ; + // test di IGeoPoint3d + IGeoPoint3d* pGPt1 = CreateGeoPoint3d() ; + IGeoPoint3d* pGPt2 ; + IGeoPoint3d* pGPt3 = CreateGeoPoint3d() ; - 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 ; + if ( pGPt1 != nullptr) { + pGPt1->Set( ptP) ; + pGPt1->Translate( 8*Z_AX) ; + cout << "GeoPoint3d(1)=" << ToString( *(pGPt1->GetPoint())) << endl ; + if ( ( pGPt2 = CloneGeoPoint3d( pGPt1)) != nullptr) { + pGPt2->Rotate( ORIG, Z_AX, 180*DEGTORAD) ; + cout << "GeoPoint3d(2)=" << ToString( *(pGPt2->GetPoint())) << endl ; + if ( pGPt3 != nullptr && CopyGeoPoint3d( pGPt2, pGPt3)) { + pGPt3->Rotate( ORIG, Z_AX, 180*DEGTORAD) ; + cout << "GeoPoint3d(3)=" << ToString( *(pGPt3->GetPoint())) << endl ; + delete pGPt3 ; + } + delete pGPt2 ; + } + delete pGPt1 ; } - return 0; + // test di IGeoVector3d + IGeoVector3d* pGVt1 = CreateGeoVector3d() ; + IGeoVector3d* pGVt2 ; + IGeoVector3d* pGVt3 = CreateGeoVector3d() ; + + if ( pGVt1 != nullptr) { + pGVt1->Set( vtV) ; + pGVt1->Rotate( ORIG, Z_AX, 90*DEGTORAD) ; + cout << "GeoVector3d(1)=" << ToString( *(pGVt1->GetVector())) << endl ; + if ( ( pGVt2 = CloneGeoVector3d( pGVt1)) != nullptr) { + pGVt2->Rotate( ORIG, X_AX, 90*DEGTORAD) ; + cout << "GeoVector3d(2)=" << ToString( *(pGVt2->GetVector())) << endl ; + if ( pGVt3 != nullptr && CopyGeoVector3d( pGVt2, pGVt3)) { + pGVt3->Rotate( ORIG, Y_AX, 90*DEGTORAD) ; + cout << "GeoVector3d(3)=" << ToString( *(pGVt3->GetVector())) << endl ; + delete pGVt3 ; + } + delete pGVt2 ; + } + delete pGVt1 ; + } + + return 0 ; } diff --git a/TestEGk.vcxproj b/TestEGk.vcxproj index ff5a2bd..e0c4925 100644 --- a/TestEGk.vcxproj +++ b/TestEGk.vcxproj @@ -86,6 +86,17 @@ + + + + + + + + + + + diff --git a/TestEGk.vcxproj.filters b/TestEGk.vcxproj.filters index cb4952d..8db819b 100644 --- a/TestEGk.vcxproj.filters +++ b/TestEGk.vcxproj.filters @@ -18,6 +18,39 @@ File di intestazione + + File di intestazione + + + File di intestazione + + + File di intestazione + + + File di intestazione + + + File di intestazione + + + File di intestazione + + + File di intestazione + + + File di intestazione + + + File di intestazione + + + File di intestazione + + + File di intestazione +