diff --git a/EGkDllMain.cpp b/EGkDllMain.cpp index 1cd9364..366e6be 100644 --- a/EGkDllMain.cpp +++ b/EGkDllMain.cpp @@ -19,11 +19,11 @@ //--------------------------- Costanti ---------------------------------------- #if defined( _DEBUG) - #define EGK_STR "EgtGeomKernelD32.dll ver. " + const char* EGK_STR = "EgtGeomKernelD32.dll ver. " ; #else - #define EGK_STR "EgtGeomKernelR32.dll ver. " + const char* EGK_STR = "EgtGeomKernelR32.dll ver. " ; #endif -#define STR_DIM 40 +const int STR_DIM = 40 ; //----------------------------------------------------------------------------- static HINSTANCE s_hModule = NULL ; diff --git a/EgtGeomKernel.vcxproj b/EgtGeomKernel.vcxproj index a4654c0..bff6bbc 100644 --- a/EgtGeomKernel.vcxproj +++ b/EgtGeomKernel.vcxproj @@ -58,6 +58,7 @@ Disabled WIN32;_WINDOWS;I_AM_EGK;_DEBUG;_USRDLL;%(PreprocessorDefinitions) true + CompileAsCpp Windows @@ -90,6 +91,7 @@ copy $(TargetPath) \EgtProg\Dll true WIN32;_WINDOWS;I_AM_EGK;NDEBUG;_USRDLL;%(PreprocessorDefinitions) true + CompileAsCpp Windows @@ -134,6 +136,7 @@ copy $(TargetPath) \EgtProg\Dll + diff --git a/EgtGeomKernel.vcxproj.filters b/EgtGeomKernel.vcxproj.filters index abe3e6f..bf61ba9 100644 --- a/EgtGeomKernel.vcxproj.filters +++ b/EgtGeomKernel.vcxproj.filters @@ -86,6 +86,9 @@ File di intestazione + + File di intestazione + diff --git a/Frame3d.cpp b/Frame3d.cpp index b71148f..c459f01 100644 --- a/Frame3d.cpp +++ b/Frame3d.cpp @@ -100,39 +100,39 @@ Frame3d::Set( const Point3d& ptOrig, Type nType) switch ( nType) { case TOP : m_nType = m_nZType ; - m_vtVersX.Set( 1, 0, 0) ; - m_vtVersY.Set( 0, 1, 0) ; - m_vtVersZ.Set( 0, 0, 1) ; + m_vtVersX = X_AX ; + m_vtVersY = Y_AX ; + m_vtVersZ = Z_AX ; break ; case BOTTOM : m_nType = BOTTOM ; - m_vtVersX.Set( 1, 0, 0) ; - m_vtVersY.Set( 0, -1, 0) ; - m_vtVersZ.Set( 0, 0, -1) ; + m_vtVersX = X_AX ; + m_vtVersY = - Y_AX ; + m_vtVersZ = - Z_AX ; break ; case FRONT : m_nType = FRONT ; - m_vtVersX.Set( 1, 0, 0) ; - m_vtVersY.Set( 0, 0, 1) ; - m_vtVersZ.Set( 0, -1, 0) ; + m_vtVersX = X_AX ; + m_vtVersY = Z_AX ; + m_vtVersZ = - Y_AX ; break ; case BACK : m_nType = BACK ; - m_vtVersX.Set( -1, 0, 0) ; - m_vtVersY.Set( 0, 0, 1) ; - m_vtVersZ.Set( 0, 1, 0) ; + m_vtVersX = - X_AX ; + m_vtVersY = Z_AX ; + m_vtVersZ = Y_AX ; break ; case LEFT : m_nType = LEFT ; - m_vtVersX.Set( 0, -1, 0) ; - m_vtVersY.Set( 0, 0, 1) ; - m_vtVersZ.Set( -1, 0, 0) ; + m_vtVersX = - Y_AX ; + m_vtVersY = Z_AX ; + m_vtVersZ = - X_AX ; break ; case RIGHT : m_nType = RIGHT ; - m_vtVersX.Set( 0, 1, 0) ; - m_vtVersY.Set( 0, 0, 1) ; - m_vtVersZ.Set( 1, 0, 0) ; + m_vtVersX = Y_AX ; + m_vtVersY = Z_AX ; + m_vtVersZ = X_AX ; break ; default : m_nType = ERR ; @@ -150,10 +150,10 @@ Frame3d::Reset( void) { m_nType = TOP ; m_nZType = TOP ; - m_ptOrig.Set( 0, 0, 0) ; - m_vtVersX.Set( 1, 0, 0) ; - m_vtVersY.Set( 0, 1, 0) ; - m_vtVersZ.Set( 0, 0, 1) ; + m_ptOrig = ORIG ; + m_vtVersX = X_AX ; + m_vtVersY = Y_AX ; + m_vtVersZ = Z_AX ; return true ; } diff --git a/GeoPoint3d.cpp b/GeoPoint3d.cpp index 3b58645..a6875e0 100644 --- a/GeoPoint3d.cpp +++ b/GeoPoint3d.cpp @@ -32,7 +32,6 @@ GeoPoint3d::GeoPoint3d( void) //---------------------------------------------------------------------------- GeoPoint3d::~GeoPoint3d( void) { - m_ptP.Set( 50, 100, 200) ; } //---------------------------------------------------------------------------- @@ -50,6 +49,7 @@ GeoPoint3d::Clone( void) const { GeoPoint3d* pGPt ; + // alloco oggetto pGPt = new(nothrow) GeoPoint3d ; if ( pGPt != nullptr) diff --git a/GeoPoint3d.h b/GeoPoint3d.h index f12ce0e..a22b4d8 100644 --- a/GeoPoint3d.h +++ b/GeoPoint3d.h @@ -1,8 +1,8 @@ //---------------------------------------------------------------------------- -// EgalS +// EgalTech 2013-2013 //---------------------------------------------------------------------------- -// File : GeoPoint3d.h Data : 10.10.13 Versione : 1.2a3 -// Contenuto : Dichiarazione della classe Segmento di Linea. +// File : GeoPoint3d.h Data : 22.11.13 Versione : 1.3a1 +// Contenuto : Dichiarazione della classe Punto Geometrico 3d. // // // @@ -19,14 +19,6 @@ //---------------------------------------------------------------------------- class GeoPoint3d : public IGeoPoint3d { - public : - GeoPoint3d( void) ; - bool Set( const Point3d& ptP) ; - virtual const GeoPoint3d& operator =( const GeoPoint3d& gpSrc) - { if ( &gpSrc != this) - m_ptP = gpSrc.m_ptP ; - return *this ; } - public : virtual ~GeoPoint3d( void) ; virtual GeoPoint3d* Clone( void) const ; @@ -53,9 +45,17 @@ class GeoPoint3d : public IGeoPoint3d { return m_ptP.ToLoc( frRef) ;} public : + virtual bool Set( const Point3d& ptP) ; virtual const Point3d* GetPoint( void) const { return &m_ptP ; } + public : + GeoPoint3d( void) ; + const GeoPoint3d& operator =( const GeoPoint3d& gpSrc) + { if ( &gpSrc != this) + m_ptP = gpSrc.m_ptP ; + return *this ; } + public : Point3d m_ptP ; } ; diff --git a/GeoVector3d.h b/GeoVector3d.h index d958461..3c8c250 100644 --- a/GeoVector3d.h +++ b/GeoVector3d.h @@ -1,8 +1,8 @@ //---------------------------------------------------------------------------- -// EgalS +// EgalTech 2013-2013 //---------------------------------------------------------------------------- -// File : GeoVector3d.h Data : 10.10.13 Versione : 1.2a3 -// Contenuto : Dichiarazione della classe Segmento di Linea. +// File : GeoVector3d.h Data : 22.11.13 Versione : 1.3a1 +// Contenuto : Dichiarazione della classe Vettore Geometrico 3d. // // // @@ -13,20 +13,12 @@ #pragma once -#include "/EgtDev/Include/EGkGeoObj.h" +#include "/EgtDev/Include/EGkGeoVector3d.h" //---------------------------------------------------------------------------- -class GeoVector3d : public IGeoObj +class GeoVector3d : public IGeoVector3d { - public : - GeoVector3d( void) ; - bool Set( const Vector3d& vtV) ; - inline const GeoVector3d& operator =( const GeoVector3d& gvSrc) - { if ( &gvSrc != this) - m_vtV = gvSrc.m_vtV ; - return *this ; } - public : virtual ~GeoVector3d( void) ; virtual GeoVector3d* Clone( void) const ; @@ -53,9 +45,17 @@ class GeoVector3d : public IGeoObj { return m_vtV.ToLoc( frRef) ;} public : - inline const Vector3d* GetVector( void) const + virtual bool Set( const Vector3d& vtV) ; + virtual const Vector3d* GetVector( void) const { return &m_vtV ; } + public : + GeoVector3d( void) ; + inline const GeoVector3d& operator =( const GeoVector3d& gvSrc) + { if ( &gvSrc != this) + m_vtV = gvSrc.m_vtV ; + return *this ; } + public : Vector3d m_vtV ; } ;