diff --git a/EGkColor.h b/EGkColor.h index fab601d..58042fb 100644 --- a/EGkColor.h +++ b/EGkColor.h @@ -26,6 +26,7 @@ //----------------------------------------------------------------------------- const int MAX_RGB = 255 ; const int MAX_ALPHA = 100 ; +const int ALPHA_LIM = 90 ; // valore di opacità equivalente al 100% const float INV_MAX_RGB = 1 / float( MAX_RGB) ; const float INV_MAX_ALPHA = 1 / float( MAX_ALPHA) ; diff --git a/EGkIntersLinePlane.h b/EGkIntersLinePlane.h new file mode 100644 index 0000000..ecae8e0 --- /dev/null +++ b/EGkIntersLinePlane.h @@ -0,0 +1,39 @@ +//---------------------------------------------------------------------------- +// EgalTech 2015-2015 +//---------------------------------------------------------------------------- +// File : EGkIntersLinePlane.h Data : 18.02.15 Versione : 1.6b7 +// Contenuto : Dichiarazione della classe intersezione linea/piano. +// +// +// +// Modifiche : 18.02.15 DS Creazione modulo. +// +// +//---------------------------------------------------------------------------- + +#pragma once + +#include "/EgtDev/Include/EGkPlane3d.h" + +//----------------------- Macro per import/export ---------------------------- +#undef EGK_EXPORT +#if defined( I_AM_EGK) // da definirsi solo nella DLL + #define EGK_EXPORT __declspec( dllexport) +#else + #define EGK_EXPORT __declspec( dllimport) +#endif + +//----------------------------------------------------------------------------- +EGK_EXPORT int IntersLinePlane( const Point3d& ptL1, const Point3d& ptL2, const Plane3d& plPlane, + Point3d& ptInt) ; +EGK_EXPORT int IntersLinePlane( const Point3d& ptL, const Vector3d& vtL, double dLen, const Plane3d& plPlane, + Point3d& ptInt) ; + +//----------------------------------------------------------------------------- +// Tipo di intersezione linea-piano +const int ILPT_NO = 0 ; // non c'è intersezione +const int ILPT_INPLANE = 1 ; // la linea giace nel piano +const int ILPT_START = 2 ; // l'intersezione è il punto iniziale +const int ILPT_END = 3 ; // l'intersezione è il punto finale +const int ILPT_YES = 4 ; // intersezione con attraversamento + \ No newline at end of file diff --git a/EGkIntersLineTria.h b/EGkIntersLineTria.h new file mode 100644 index 0000000..2356d68 --- /dev/null +++ b/EGkIntersLineTria.h @@ -0,0 +1,38 @@ +//---------------------------------------------------------------------------- +// EgalTech 2015-2015 +//---------------------------------------------------------------------------- +// File : EGkIntersLinePlane.h Data : 18.02.15 Versione : 1.6b7 +// Contenuto : Dichiarazione della classe intersezione linea/piano. +// +// +// +// Modifiche : 18.02.15 DS Creazione modulo. +// +// +//---------------------------------------------------------------------------- + +#pragma once + +#include "/EgtDev/Include/EGkTriangle3d.h" + +//----------------------- Macro per import/export ---------------------------- +#undef EGK_EXPORT +#if defined( I_AM_EGK) // da definirsi solo nella DLL + #define EGK_EXPORT __declspec( dllexport) +#else + #define EGK_EXPORT __declspec( dllimport) +#endif + +//----------------------------------------------------------------------------- +EGK_EXPORT int IntersLineTria( const Point3d& ptL1, const Point3d& ptL2, const Triangle3d& trTria, + Point3d& ptInt) ; +EGK_EXPORT int IntersLineTria( const Point3d& ptL, const Vector3d& vtL, double dLen, const Triangle3d& trTria, + Point3d& ptInt) ; + +//----------------------------------------------------------------------------- +// Tipo di intersezione linea-triangolo +enum IntLineTriaType { ILTT_NO = 0, // non c'è intersezione + ILTT_SEGM = 1, // una parte di linea appartiene al triangolo + ILTT_VERT = 2, // intersezione coincide con un vertice + ILTT_EDGE = 3, // intersezione coincide con interno di un lato + ILTT_IN = 4} ; // intersezione coincide con interno del triangolo diff --git a/EGrScene.h b/EGrScene.h index 657d508..08495f9 100644 --- a/EGrScene.h +++ b/EGrScene.h @@ -59,6 +59,7 @@ class IEGrScene 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 bool GetPointFromSelect( int nSelId, const Point3d& ptView, Point3d& ptSel) = 0 ; virtual bool Project( const Point3d& ptWorld, Point3d& ptView) = 0 ; virtual bool UnProject( const Point3d& ptView, Point3d& ptWorld) = 0 ; @@ -144,8 +145,9 @@ enum SnapPoint { SP_NONE = 0, SP_END = 3, SP_MID = 4, SP_CENTER = 5, - SP_NEAR = 6, - SP_INTERS = 7, - SP_TANG = 8, - SP_PERP = 9, - SP_MINDIST = 10} ; \ No newline at end of file + SP_CENTROID = 6, + SP_NEAR = 7, + SP_INTERS = 8, + SP_TANG = 9, + SP_PERP = 10, + SP_MINDIST = 11} ; \ No newline at end of file diff --git a/EInAPI.h b/EInAPI.h index 3808554..4404957 100644 --- a/EInAPI.h +++ b/EInAPI.h @@ -291,6 +291,7 @@ EIN_EXPORT BOOL __stdcall EgtStartPoint( int nId, int nRefId, double ptP[3]) ; EIN_EXPORT BOOL __stdcall EgtEndPoint( int nId, int nRefId, double ptP[3]) ; EIN_EXPORT BOOL __stdcall EgtMidPoint( int nId, int nRefId, double ptP[3]) ; EIN_EXPORT BOOL __stdcall EgtCenterPoint( int nId, int nRefId, double ptP[3]) ; +EIN_EXPORT BOOL __stdcall EgtCentroid( int nId, int nRefId, double ptP[3]) ; EIN_EXPORT BOOL __stdcall EgtAtParamPoint( int nId, double dU, int nRefId, double ptP[3]) ; EIN_EXPORT BOOL __stdcall EgtNearPoint( int nId, const double ptNear[3], int nRefId, double ptP[3]) ; EIN_EXPORT BOOL __stdcall EgtIntersectionPoint( int nId1, int nId2, const double ptNear[3], int nRefId, double ptP[3]) ; @@ -307,7 +308,9 @@ EIN_EXPORT BOOL __stdcall EgtCurveThickness( int nId, double* pdThick) ; EIN_EXPORT BOOL __stdcall EgtGetMinDistPointCurve( const double ptP[3], int nId, double* pdDist) ; EIN_EXPORT BOOL __stdcall EgtGetMinDistPntSidePointCurve( const double ptP[3], int nId, double vtN[3], double* pdDist, double ptMin[3], int* pnSide) ; +EIN_EXPORT BOOL __stdcall EgtCurveArcRadius( int nId, double* pdRad) ; EIN_EXPORT BOOL __stdcall EgtCurveArcNormVersor( int nId, int nRefId, double vtNorm[3]) ; +EIN_EXPORT BOOL __stdcall EgtCurveCompoCenter( int nId, int nSimpCrv, int nRefId, double ptCen[3]) ; EIN_EXPORT BOOL __stdcall EgtExtTextNormVersor( int nId, int nRefId, double vtNorm[3]) ; EIN_EXPORT BOOL __stdcall EgtPointToIdGlob( double ptP[3], int nId) ; EIN_EXPORT BOOL __stdcall EgtPointToIdLoc( double ptP[3], int nId) ; diff --git a/EgkCurve.h b/EgkCurve.h index bc47911..e54f9b7 100644 --- a/EgkCurve.h +++ b/EgkCurve.h @@ -44,6 +44,7 @@ class __declspec( novtable) ICurve : public IGeoObj virtual bool GetEndPoint( Point3d& ptEnd) const = 0 ; virtual bool GetMidPoint( Point3d& ptMid) const = 0 ; virtual bool GetCenterPoint( Point3d& ptCen) const = 0 ; + virtual bool GetCentroid( Point3d& ptCen) const = 0 ; virtual bool GetStartDir( Vector3d& vtDir) const = 0 ; virtual bool GetEndDir( Vector3d& vtDir) const = 0 ; virtual bool GetMidDir( Vector3d& vtDir) const = 0 ; diff --git a/EgkCurveComposite.h b/EgkCurveComposite.h index 736d872..e49ae97 100644 --- a/EgkCurveComposite.h +++ b/EgkCurveComposite.h @@ -30,6 +30,7 @@ class __declspec( novtable) ICurveComposite : public ICurve virtual bool PolygonCenterMidSide( int nSides, const Point3d& ptCen, const Point3d& ptMidSide, const Vector3d& vtN) = 0 ; virtual bool PolygonSide( int nSides, const Point3d& ptStart, const Point3d& ptEnd, const Vector3d& vtN) = 0 ; virtual int GetCurveNumber( void) const = 0 ; + virtual const ICurve* GetCurve( int nCrv) const = 0 ; virtual const ICurve* GetFirstCurve( void) const = 0 ; virtual const ICurve* GetNextCurve( void) const = 0 ; virtual const ICurve* GetLastCurve( void) const = 0 ; diff --git a/EgkSurfTriMesh.h b/EgkSurfTriMesh.h index 672ac35..0cf38ff 100644 --- a/EgkSurfTriMesh.h +++ b/EgkSurfTriMesh.h @@ -49,12 +49,17 @@ class __declspec( novtable) ISurfTriMesh : public ISurf virtual int GetTriangleSize( void) const = 0 ; virtual double GetLinearTolerance( void) = 0 ; virtual double GetSmoothAngle( void) = 0 ; + virtual bool GetVertex( int nId, Point3d& ptP) const = 0 ; virtual int GetFirstVertex( Point3d& ptP) const = 0 ; virtual int GetNextVertex( int nId, Point3d& ptP) const = 0 ; + virtual bool GetTriangle( int nId, int nIdVert[3]) const = 0 ; virtual int GetFirstTriangle( int nIdVert[3]) const = 0 ; virtual int GetNextTriangle( int nId, int nIdVert[3]) const = 0 ; + virtual bool GetTriangle( int nId, Triangle3d& Tria) const = 0 ; virtual int GetFirstTriangle( Triangle3d& Tria) const = 0 ; virtual int GetNextTriangle( int nId, Triangle3d& Tria) const = 0 ; + virtual int GetAllTriaAroundVertex( int nV, INTVECTOR& vT, bool& bCirc) const = 0 ; + virtual bool GetVertexSmoothNormal( int nV, int nT, Vector3d& vtN) const = 0 ; virtual bool GetTriangleBoundaryEdges( int nId, TriFlags3d& TFlags) const = 0 ; virtual bool GetTriangleSmoothNormals( int nId, TriNormals3d& TNrms) const = 0 ; } ;