TestEGk : modifiche per IGeoVector3d, Frame3d e per const invece di #define.
This commit is contained in:
+55
-15
@@ -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 ;
|
||||
}
|
||||
|
||||
|
||||
@@ -86,6 +86,17 @@
|
||||
</PostBuildEvent>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="..\Include\EGkFrame3d.h" />
|
||||
<ClInclude Include="..\Include\EGkGeoConst.h" />
|
||||
<ClInclude Include="..\Include\EGkGeoObj.h" />
|
||||
<ClInclude Include="..\Include\EGkGeoObjType.h" />
|
||||
<ClInclude Include="..\Include\EGkGeoPoint3d.h" />
|
||||
<ClInclude Include="..\Include\EGkGeoVector3d.h" />
|
||||
<ClInclude Include="..\Include\EGkPoint3d.h" />
|
||||
<ClInclude Include="..\Include\EGkVector3d.h" />
|
||||
<ClInclude Include="..\Include\EGkVersion.h" />
|
||||
<ClInclude Include="..\Include\EGnStringUtils.h" />
|
||||
<ClInclude Include="..\Include\EGnVersion.h" />
|
||||
<ClInclude Include="stdafx.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
||||
@@ -18,6 +18,39 @@
|
||||
<ClInclude Include="stdafx.h">
|
||||
<Filter>File di intestazione</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Include\EGkGeoConst.h">
|
||||
<Filter>File di intestazione</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Include\EGkGeoObj.h">
|
||||
<Filter>File di intestazione</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Include\EGkGeoObjType.h">
|
||||
<Filter>File di intestazione</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Include\EGkGeoPoint3d.h">
|
||||
<Filter>File di intestazione</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Include\EGkGeoVector3d.h">
|
||||
<Filter>File di intestazione</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Include\EGkPoint3d.h">
|
||||
<Filter>File di intestazione</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Include\EGkVector3d.h">
|
||||
<Filter>File di intestazione</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Include\EGkVersion.h">
|
||||
<Filter>File di intestazione</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Include\EGnStringUtils.h">
|
||||
<Filter>File di intestazione</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Include\EGnVersion.h">
|
||||
<Filter>File di intestazione</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\Include\EGkFrame3d.h">
|
||||
<Filter>File di intestazione</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="stdafx.cpp">
|
||||
|
||||
Reference in New Issue
Block a user