From 6e3503fde57c40083536ebdf726206c701b21ea2 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Wed, 22 Nov 2023 20:21:06 +0100 Subject: [PATCH] =?UTF-8?q?Include=20:=20-=20a=20classe=20PolyLine=20aggiu?= =?UTF-8?q?nte=20propriet=C3=A0=20TempProp=20e=20relative=20funzioni=20Set?= =?UTF-8?q?/Get.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- EGkPolyLine.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/EGkPolyLine.h b/EGkPolyLine.h index 61d0e42..a26e6dd 100644 --- a/EGkPolyLine.h +++ b/EGkPolyLine.h @@ -116,6 +116,11 @@ class PolyLine EGK_EXPORT bool GetConvexHullXY( PNTVECTOR& vConvHull) const ; EGK_EXPORT bool GetMinAreaRectangleXY( Point3d& ptCen, Vector3d& vtAx, double& dLen, double& dHeight) const ; EGK_EXPORT bool Trim( const Plane3d& plPlane, bool bInVsOut = true) ; + EGK_EXPORT void SetTempProp( int nProp, int nPropInd = 0) + { if ( nPropInd >= 0 && nPropInd < 2) + m_nTempProp[nPropInd] = nProp ; } + EGK_EXPORT int GetTempProp( int nPropInd = 0) const + { return (( nPropInd >= 0 && nPropInd < 2) ? m_nTempProp[nPropInd] : 0) ; } private : bool MyChangeStart( int nPos) ; @@ -123,9 +128,10 @@ class PolyLine bool MyMakeConvex( const Vector3d& vtN, bool bLeftSide) ; private : - int m_nRejected ; - PNTULIST m_lUPoints ; - mutable PNTULIST::const_iterator m_iter ; + int m_nRejected ; // numero punti rifiutati perchè coincidenti + int m_nTempProp[2] ; // vettore proprietà temporanee + PNTULIST m_lUPoints ; // lista dei punti + mutable PNTULIST::const_iterator m_iter ; // iteratore corrente } ; //----------------------------------------------------------------------------