diff --git a/EGrScene.h b/EGrScene.h index 37a7ebb..a05db50 100644 --- a/EGrScene.h +++ b/EGrScene.h @@ -16,6 +16,7 @@ //---------------------------------------------------------------------------- #include "/EgtDev/Include/EGkPoint3d.h" #include "/EgtDev/Include/EGkBBox3d.h" +#include "/EgtDev/Include/EGkPlane3d.h" #include "/EgtDev/Include/EGkColor.h" #include "/EgtDev/Include/EgtNumCollection.h" #define NOMINMAX @@ -41,26 +42,26 @@ class IEGrScene virtual ~IEGrScene( void) {} virtual bool Init( IGeomDB* pGeomDB) = 0 ; virtual bool CreateContext( HDC hDC, int nDriver, bool b2Buff, int nColorBits, int nDepthBits) = 0 ; - virtual bool IsValid( void) = 0 ; - virtual std::string GetOpenGLInfo( void) = 0 ; - virtual std::string GetGLSLInfo( void) = 0 ; - virtual std::string GetPixelFormatInfo( void) = 0 ; - virtual IGeomDB* GetGeomDB( void) = 0 ; + virtual bool IsValid( void) const = 0 ; + virtual std::string GetOpenGLInfo( void) const = 0 ; + virtual std::string GetGLSLInfo( void) const = 0 ; + virtual std::string GetPixelFormatInfo( void) const = 0 ; + virtual IGeomDB* GetGeomDB( void) const = 0 ; virtual bool RedrawWindow( void) = 0 ; virtual bool Resize( int nW, int nH) = 0 ; virtual bool SetBackground( Color colBackTop, Color colBackBottom) = 0 ; virtual bool Draw( void) = 0 ; - virtual bool Project( const Point3d& ptWorld, Point3d& ptView) = 0 ; - virtual bool UnProject( const Point3d& ptView, Point3d& ptWorld) = 0 ; + virtual bool Project( const Point3d& ptWorld, Point3d& ptView) const = 0 ; + virtual bool UnProject( const Point3d& ptView, Point3d& ptWorld) const = 0 ; virtual void Destroy( void) = 0 ; // Camera virtual bool SetCenter( const Point3d& ptCenter) = 0 ; virtual bool SetCamera( double dAngVertDeg, double dAngOrizzDeg, double dDist) = 0 ; virtual bool SetCamera( int nDir, double dDist = 0) = 0 ; - virtual const Point3d& GetCenter( void) = 0 ; - virtual Point3d GetProjectedCenter( void) = 0 ; - virtual void GetCamera( double* pdAngVertDeg, double* pdAngOrizzDeg, double* pdDist = nullptr) = 0 ; - virtual int GetCameraDir( void) = 0 ; + virtual const Point3d& GetCenter( void) const = 0 ; + virtual Point3d GetProjectedCenter( void) const = 0 ; + virtual void GetCamera( double* pdAngVertDeg, double* pdAngOrizzDeg, double* pdDist = nullptr) const = 0 ; + virtual int GetCameraDir( void) const = 0 ; virtual bool PanCamera( const Point3d& ptWinOld, const Point3d& ptWinNew) = 0 ; virtual bool RotateCamera( const Point3d& ptWinOld, const Point3d& ptWinNew) = 0 ; virtual bool ZoomAll( void) = 0 ; @@ -70,13 +71,13 @@ class IEGrScene virtual bool ZoomWin( const Point3d& ptWin1, const Point3d& ptWin2) = 0 ; // ShowMode virtual bool SetShowMode( int nShowMode) = 0 ; - virtual int GetShowMode( void) = 0 ; + virtual int GetShowMode( void) const = 0 ; virtual void SetShowCurveDirection( bool bShow) = 0 ; - virtual bool GetShowCurveDirection( void) = 0 ; + virtual bool GetShowCurveDirection( void) const = 0 ; virtual void SetShowTriaAdvanced( bool bAdvanced)= 0 ; - virtual bool GetShowTriaAdvanced( void) = 0 ; + virtual bool GetShowTriaAdvanced( void) const = 0 ; virtual void SetShowZmap( int nMode) = 0 ; - virtual int GetShowZmap( void) = 0 ; + virtual int GetShowZmap( void) const = 0 ; // Geometry virtual bool SetExtension( const BBox3d& b3Ext) = 0 ; virtual bool UpdateExtension( void) = 0 ; @@ -105,26 +106,27 @@ class IEGrScene virtual bool UnselectableRemove( int nId) = 0 ; virtual bool UnselectableClearAll( void) = 0 ; virtual bool UnselectableFind( int nId) = 0 ; - virtual bool GetSelectedObjs( INTVECTOR& nIds) = 0 ; + virtual bool GetSelectedObjs( INTVECTOR& nIds) const = 0 ; virtual int GetFirstSelectedObj( void) = 0 ; virtual int GetNextSelectedObj( void) = 0 ; - virtual double GetSelectedObjWinZ( int nSel = - 1) = 0 ; - virtual double GetSelectedObjMinWinZ( int nSel = - 1) = 0 ; + virtual double GetSelectedObjWinZ( int nSel = - 1) const = 0 ; + virtual double GetSelectedObjMinWinZ( int nSel = - 1) const = 0 ; virtual bool GetPointFromSelect( int nSelId, const Point3d& ptView, Point3d& ptSel, int& nAux) = 0 ; // Snap // anche per lo snap valgono SetObjFilterForSelect e Unselectable* virtual bool GetGraphicSnapPoint( int nSnap, const Point3d& ptWin, int nW, int nH, Point3d& ptSel) = 0 ; - virtual bool GetGridSnapPointZ( bool bSketch, const Point3d& ptWin, const Point3d& ptGrid, Point3d& ptSel) = 0 ; - virtual int GetLastSnapId( void) = 0 ; - virtual bool GetLastSnapDir( Vector3d& vtDir) = 0 ; + virtual bool GetGridSnapPointZ( bool bSketch, const Point3d& ptWin, const Point3d& ptGrid, Point3d& ptSel) const = 0 ; + virtual int GetLastSnapId( void) const = 0 ; + virtual bool GetLastSnapDir( Vector3d& vtDir) const = 0 ; + virtual bool GetPlaneSnapPoint( const Point3d& ptWin, const Plane3d& plPlane, Point3d& ptSel) const = 0 ; // Texture virtual bool LoadTexture( const std::string& sName, const std::string& sFile, double dMMxPix, double dDimX, double dDimY, int nRepeat) = 0 ; virtual bool UnloadTexture( const std::string& sName) = 0 ; virtual bool UnloadAllTextures( void) = 0 ; - virtual bool ExistsTexture( const std::string& sName) = 0 ; - virtual bool GetTexturePixels( const std::string& sName, int& nWidth, int& nHeight) = 0 ; - virtual bool GetTextureDimensions( const std::string& sName, double& dDimX, double& dDimY) = 0 ; + virtual bool ExistsTexture( const std::string& sName) const = 0 ; + virtual bool GetTexturePixels( const std::string& sName, int& nWidth, int& nHeight) const = 0 ; + virtual bool GetTextureDimensions( const std::string& sName, double& dDimX, double& dDimY) const = 0 ; virtual bool ChangeTextureDimensions( const std::string& sName, double dDimX, double dDimY) = 0 ; } ; diff --git a/EInAPI.h b/EInAPI.h index 2e14b89..c33e273 100644 --- a/EInAPI.h +++ b/EInAPI.h @@ -553,6 +553,7 @@ EIN_EXPORT BOOL __stdcall EgtModifyRawPartSize( int nRawId, double dLength, doub EIN_EXPORT BOOL __stdcall EgtModifyRawPartHeight( int nRawId, double dHeight) ; EIN_EXPORT BOOL __stdcall EgtKeepRawPart( int nRawId, int nSouPhase) ; EIN_EXPORT BOOL __stdcall EgtVerifyRawPartPhase( int nRawId, int nPhase) ; +EIN_EXPORT BOOL __stdcall EgtVerifyRawPartCurrPhase( int nRawId) ; EIN_EXPORT BOOL __stdcall EgtRemoveRawPartFromCurrPhase( int nRawId) ; EIN_EXPORT BOOL __stdcall EgtRemoveRawPart( int nRawId) ; EIN_EXPORT BOOL __stdcall EgtMoveToCornerRawPart( int nRawId, const double ptCorner[3], int nFlag) ; @@ -573,6 +574,7 @@ EIN_EXPORT BOOL __stdcall EgtShowOnlyTable( bool bVal) ; EIN_EXPORT int __stdcall EgtAddFixture( const wchar_t* wsName, const double ptPos[3], double dAngRotDeg, double dMov) ; EIN_EXPORT BOOL __stdcall EgtKeepFixture( int nFxtId, int nSouPhase) ; EIN_EXPORT BOOL __stdcall EgtRemoveFixture( int nFxtId) ; +EIN_EXPORT BOOL __stdcall EgtVerifyFixture( int nFxtId) ; EIN_EXPORT int __stdcall EgtGetFirstFixture( void) ; EIN_EXPORT int __stdcall EgtGetNextFixture( int nFxtId) ; EIN_EXPORT BOOL __stdcall EgtMoveFixture( int nFxtId, const double vtMove[3]) ; @@ -727,6 +729,7 @@ EIN_EXPORT BOOL __stdcall EgtGetGraphicSnapPoint( int nSnap, int nWinX, int nWin EIN_EXPORT BOOL __stdcall EgtGetGridSnapPointZ( BOOL bSketch, int nWinX, int nWinY, const double ptGrid[3], double ptP[3]) ; EIN_EXPORT int __stdcall EgtGetLastSnapId( void) ; EIN_EXPORT BOOL __stdcall EgtGetLastSnapDir( double vtV[3]) ; +EIN_EXPORT BOOL __stdcall EgtGetPlaneSnapPoint( int nWinX, int nWinY, const double vtN[3], double dDist, double ptP[3]) ; EIN_EXPORT BOOL __stdcall EgtSetShowMode( int nShowMode, BOOL bRedraw) ; EIN_EXPORT int __stdcall EgtGetShowMode( void) ; EIN_EXPORT BOOL __stdcall EgtSetShowCurveDirection( BOOL bShow, BOOL bRedraw) ; diff --git a/EMkMachMgr.h b/EMkMachMgr.h index 75ce7e1..3006455 100644 --- a/EMkMachMgr.h +++ b/EMkMachMgr.h @@ -92,6 +92,7 @@ class __declspec( novtable) IMachMgr virtual int AddFixture( const std::string& sName, const Point3d& ptPos, double dAngRotDeg, double dMov) = 0 ; virtual bool KeepFixture( int nFxtId, int nSouPhase) = 0 ; virtual bool RemoveFixture( int nFxtId) = 0 ; + virtual bool VerifyFixture( int nFxtId) const = 0 ; virtual int GetFirstFixture( void) = 0 ; virtual int GetNextFixture( int nFxtId) = 0 ; virtual bool MoveFixture( int nId, const Vector3d& vtMove) = 0 ; diff --git a/EXeExecutor.h b/EXeExecutor.h index b7bbda5..4cd98af 100644 --- a/EXeExecutor.h +++ b/EXeExecutor.h @@ -595,6 +595,7 @@ EXE_EXPORT bool ExeModifyRawPartSize( int nRawId, double dLength, double dWidth, EXE_EXPORT bool ExeModifyRawPartHeight( int nRawId, double dHeight) ; EXE_EXPORT bool ExeKeepRawPart( int nRawId, int nSouPhase) ; EXE_EXPORT bool ExeVerifyRawPartPhase( int nRawId, int nPhase) ; +EXE_EXPORT bool ExeVerifyRawPartCurrPhase( int nRawId) ; EXE_EXPORT bool ExeRemoveRawPartFromCurrPhase( int nRawId) ; EXE_EXPORT bool ExeRemoveRawPart( int nRawId) ; EXE_EXPORT bool ExeRotateRawPart( int nRawId, const Vector3d& vtAx, double dAngRotDeg) ; @@ -619,6 +620,7 @@ EXE_EXPORT bool ExeShowOnlyTable( bool bVal) ; EXE_EXPORT int ExeAddFixture( const std::string& sName, const Point3d& ptPos, double dAngRotDeg, double dMov) ; EXE_EXPORT bool ExeKeepFixture( int nFxtId, int nSouPhase) ; EXE_EXPORT bool ExeRemoveFixture( int nFxtId) ; +EXE_EXPORT bool ExeVerifyFixture( int nFxtId) ; EXE_EXPORT int ExeGetFirstFixture( void) ; EXE_EXPORT int ExeGetNextFixture( int nFxtId) ; EXE_EXPORT bool ExeMoveFixture( int nFxtId, const Vector3d& vtMove) ; @@ -787,6 +789,7 @@ EXE_EXPORT bool ExeGetGraphicSnapPoint( int nSnap, int nWinX, int nWinY, int nSe EXE_EXPORT bool ExeGetGridSnapPointZ( bool bSketch, int nWinX, int nWinY, const Point3d& ptGrid, Point3d& ptP) ; EXE_EXPORT int ExeGetLastSnapId( void) ; EXE_EXPORT bool ExeGetLastSnapDir( Vector3d& vtV) ; +EXE_EXPORT bool ExeGetPlaneSnapPoint( int nWinX, int nWinY, const Plane3d& Plane, Point3d& ptP) ; EXE_EXPORT bool ExeSetShowMode( int nShowMode, bool bRedraw) ; EXE_EXPORT int ExeGetShowMode( void) ; EXE_EXPORT bool ExeSetShowCurveDirection( bool bShow, bool bRedraw) ;