diff --git a/EGkGdbConst.h b/EGkGdbConst.h index a5798f8..05c6cbc 100644 --- a/EGkGdbConst.h +++ b/EGkGdbConst.h @@ -57,6 +57,8 @@ enum GdbMaterial { GDB_MT_COLOR = -1, const int GDB_MT_NULL = GDB_MT_PARENT ; //----------------- Costanti flag di BBox -------------------------------------- -enum BBoxFlag { BBF_NONE = 0, +enum BBoxFlag { BBF_STANDARD = 0, BBF_ONLY_VISIBLE = 1, - BBF_IGNORE_TEXT = 2} ; + BBF_IGNORE_TEXT = 2, + BBF_IGNORE_DIM = 3, + BBF_EXACT = 4} ; diff --git a/EGkGdbIterator.h b/EGkGdbIterator.h index 4ae042b..7073495 100644 --- a/EGkGdbIterator.h +++ b/EGkGdbIterator.h @@ -51,9 +51,9 @@ class __declspec( novtable) IGdbIterator virtual int GetId( void) const = 0 ; virtual int GetParentId( void) const = 0 ; virtual bool GetGlobFrame( Frame3d& frGlob) const = 0 ; - virtual bool GetLocalBBox( BBox3d& b3Loc, int nFlag = BBF_NONE) const = 0 ; - virtual bool GetGlobalBBox( BBox3d& b3Glob, int nFlag = BBF_NONE) const = 0 ; - virtual bool GetRefBBox( const Frame3d& frRef, BBox3d& b3Ref, int nFlag = BBF_NONE) const = 0 ; + virtual bool GetLocalBBox( BBox3d& b3Loc, int nFlag = BBF_STANDARD) const = 0 ; + virtual bool GetGlobalBBox( BBox3d& b3Glob, int nFlag = BBF_STANDARD) const = 0 ; + virtual bool GetRefBBox( const Frame3d& frRef, BBox3d& b3Ref, int nFlag = BBF_STANDARD) const = 0 ; virtual bool SetLevel( int nLevel) = 0 ; virtual bool RevertLevel( void) = 0 ; virtual bool GetLevel( int& nLevel) const = 0 ; diff --git a/EGkGeoObj.h b/EGkGeoObj.h index 8e359a2..3b51342 100644 --- a/EGkGeoObj.h +++ b/EGkGeoObj.h @@ -18,6 +18,7 @@ #include "/EgtDev/Include/EGkBBox3d.h" #include "/EgtDev/Include/EGkGeoObjType.h" #include "/EgtDev/Include/EGkObjGraphics.h" +#include "/EgtDev/Include/EGkGdbConst.h" #include //----------------------- Macro per import/export ---------------------------- @@ -38,8 +39,8 @@ class __declspec( novtable) IGeoObj virtual bool IsValid( void) const = 0 ; virtual const std::string& GetTitle( void) const = 0 ; virtual bool Dump( std::string& sOut, const char* szNewLine = "\n") const = 0 ; - virtual bool GetLocalBBox( BBox3d& b3Loc) const = 0 ; - virtual bool GetBBox( const Frame3d& frRef, BBox3d& b3Ref) const = 0 ; + virtual bool GetLocalBBox( BBox3d& b3Loc, int nFlag = BBF_STANDARD) const = 0 ; + virtual bool GetBBox( const Frame3d& frRef, BBox3d& b3Ref, int nFlag = BBF_STANDARD) const = 0 ; virtual bool Translate( const Vector3d& vtMove) = 0 ; virtual bool Rotate( const Point3d& ptAx, const Vector3d& vtAx, double dAngDeg) = 0 ; virtual bool Rotate( const Point3d& ptAx, const Vector3d& vtAx, double dCosAng, double dSinAng) = 0 ; diff --git a/EGkGeomDB.h b/EGkGeomDB.h index db84493..dab589b 100644 --- a/EGkGeomDB.h +++ b/EGkGeomDB.h @@ -58,9 +58,9 @@ class __declspec( novtable) IGeomDB virtual int GetGroupObjs( int nId) const = 0 ; virtual int GetParentId( int nId) const = 0 ; virtual bool GetGlobFrame( int nId, Frame3d& frGlob) const = 0 ; - virtual bool GetLocalBBox( int nId, BBox3d& b3Loc, int nFlag = BBF_NONE) const = 0 ; - virtual bool GetGlobalBBox( int nId, BBox3d& b3Glob, int nFlag = BBF_NONE) const = 0 ; - virtual bool GetRefBBox( int nId, const Frame3d& frRef, BBox3d& b3Ref, int nFlag = BBF_NONE) const = 0 ; + virtual bool GetLocalBBox( int nId, BBox3d& b3Loc, int nFlag = BBF_STANDARD) const = 0 ; + virtual bool GetGlobalBBox( int nId, BBox3d& b3Glob, int nFlag = BBF_STANDARD) const = 0 ; + virtual bool GetRefBBox( int nId, const Frame3d& frRef, BBox3d& b3Ref, int nFlag = BBF_STANDARD) const = 0 ; virtual int Copy( int nIdSou, int nIdDest, int nRefId, int nSonBeforeAfter = GDB_SON) = 0 ; virtual int CopyGlob( int nIdSou, int nIdDest, int nRefId, int nSonBeforeAfter = GDB_SON) = 0 ; virtual bool Relocate( int nId, int nRefId, int nSonBeforeAfter = GDB_SON) = 0 ; diff --git a/EInAPI.h b/EInAPI.h index 49c13f0..be7cad9 100644 --- a/EInAPI.h +++ b/EInAPI.h @@ -37,6 +37,55 @@ EIN_EXPORT BOOL __stdcall EgtSetKey( const wchar_t* sKey) ; EIN_EXPORT BOOL __stdcall EgtSetFont( const wchar_t* sNfeFontDir, const wchar_t* sDefaultFont) ; EIN_EXPORT BOOL __stdcall EgtFreeMemory( void* pMem) ; +// Geo Base +EIN_EXPORT BOOL __stdcall EgtVectorNormalize( double* pdX, double* pdY, double* pdZ, + double dEps = EPS_SMALL) ; +EIN_EXPORT BOOL __stdcall EgtVectorRotate( double* pdX, double* pdY, double* pdZ, + const double vtAx[3], double dAngRotDeg) ; +EIN_EXPORT BOOL __stdcall EgtVectorScale( double* pdX, double* pdY, double* pdZ, + const double ptOrig[3], const double vtX[3], const double vtY[3], const double vtZ[3], + double dCoeffX, double dCoeffY, double dCoeffZ) ; +EIN_EXPORT BOOL __stdcall EgtVectorMirror( double* pdX, double* pdY, double* pdZ, + const double vtNorm[3]) ; +EIN_EXPORT BOOL __stdcall EgtVectorShear( double* pdX, double* pdY, double* pdZ, + const double vtNorm[3], const double vtDir[3], double dCoeff) ; +EIN_EXPORT BOOL __stdcall EgtVectorToGlob( double* pdX, double* pdY, double* pdZ, + const double ptOrig[3], const double vtX[3], const double vtY[3], const double vtZ[3]) ; +EIN_EXPORT BOOL __stdcall EgtVectorToLoc( double* pdX, double* pdY, double* pdZ, + const double ptOrig[3], const double vtX[3], const double vtY[3], const double vtZ[3]) ; +EIN_EXPORT BOOL __stdcall EgtVectorLocToLoc( double* pdX, double* pdY, double* pdZ, + const double ptO1[3], const double vtX1[3], const double vtY1[3], const double vtZ1[3], + const double ptO2[3], const double vtX2[3], const double vtY2[3], const double vtZ2[3]) ; +EIN_EXPORT BOOL __stdcall EgtPointTranslate( double* pdX, double* pdY, double* pdZ, + const double vtMove[3]) ; +EIN_EXPORT BOOL __stdcall EgtPointRotate( double* pdX, double* pdY, double* pdZ, + const double ptAx[3], const double vtAx[3], double dAngRotDeg) ; +EIN_EXPORT BOOL __stdcall EgtPointScale( double* pdX, double* pdY, double* pdZ, + const double ptOrig[3], const double vtX[3], const double vtY[3], const double vtZ[3], + double dCoeffX, double dCoeffY, double dCoeffZ) ; +EIN_EXPORT BOOL __stdcall EgtPointMirror( double* pdX, double* pdY, double* pdZ, + const double ptOn[3], const double vtNorm[3]) ; +EIN_EXPORT BOOL __stdcall EgtPointShear( double* pdX, double* pdY, double* pdZ, + const double ptOn[3], const double vtNorm[3], const double vtDir[3], double dCoeff) ; +EIN_EXPORT BOOL __stdcall EgtPointToGlob( double* pdX, double* pdY, double* pdZ, + const double ptOrig[3], const double vtX[3], const double vtY[3], const double vtZ[3]) ; +EIN_EXPORT BOOL __stdcall EgtPointToLoc( double* pdX, double* pdY, double* pdZ, + const double ptOrig[3], const double vtX[3], const double vtY[3], const double vtZ[3]) ; +EIN_EXPORT BOOL __stdcall EgtPointLocToLoc( double* pdX, double* pdY, double* pdZ, + const double ptO1[3], const double vtX1[3], const double vtY1[3], const double vtZ1[3], + const double ptO2[3], const double vtX2[3], const double vtY2[3], const double vtZ2[3]) ; +EIN_EXPORT BOOL __stdcall EgtFrameTranslate( double ptOrig[3], double vtX[3], double vtY[3], double vtZ[3], + const double vtMove[3]) ; +EIN_EXPORT BOOL __stdcall EgtFrameRotate( double ptOrig[3], double vtX[3], double vtY[3], double vtZ[3], + const double ptAx[3], const double vtAx[3], double dAngRotDeg) ; +EIN_EXPORT BOOL __stdcall EgtFrameToGlob( double ptOrig[3], double vtX[3], double vtY[3], double vtZ[3], + const double ptO1[3], const double vtX1[3], const double vtY1[3], const double vtZ1[3]) ; +EIN_EXPORT BOOL __stdcall EgtFrameToLoc( double ptOrig[3], double vtX[3], double vtY[3], double vtZ[3], + const double ptO1[3], const double vtX1[3], const double vtY1[3], const double vtZ1[3]) ; +EIN_EXPORT BOOL __stdcall EgtFrameLocToLoc( double ptOrig[3], double vtX[3], double vtY[3], double vtZ[3], + const double ptO1[3], const double vtX1[3], const double vtY1[3], const double vtZ1[3], + const double ptO2[3], const double vtX2[3], const double vtY2[3], const double vtZ2[3]) ; + // GeomDB EIN_EXPORT int __stdcall EgtInitGeomDB( void) ; EIN_EXPORT BOOL __stdcall EgtSetCurrentContext( int nGseCtx) ;