From 53e5fcc26929906dfe9bf77d6ebf0dd3a4ce5dc7 Mon Sep 17 00:00:00 2001 From: LorenzoM Date: Wed, 23 Jun 2021 16:29:58 +0200 Subject: [PATCH] Spostate in PolyLine funzioni ad esse inerenti --- EGkPolyLine.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/EGkPolyLine.h b/EGkPolyLine.h index 72a2afb..4d1f998 100644 --- a/EGkPolyLine.h +++ b/EGkPolyLine.h @@ -132,3 +132,30 @@ class PolyLine // Raccolte di PolyLine typedef std::vector POLYLINEVECTOR ; // vettore di PolyLine typedef std::list POLYLINELIST ; // lista di PolyLine + +//---------------------------------------------------------------------------- +/*static*/ bool +ChangePolyLineStart( const Point3d& ptNewStart, PolyLine& Loop, double dTol = EPS_SMALL) ; +// nSegNum 0-based +/*static*/ bool +PointPositionOnPolyLine( const Point3d& ptPoint, /*const*/ PolyLine& Loop, int& nSegNum, double& dParOnSeg, double dTol = EPS_SMALL) ; +/*static*/ bool +IsPointInsidePolyLine( const Point3d& ptP, /*const*/ PolyLine& plPoly) ; +/*static*/ bool +DistPointPolyLine( const Point3d& ptP, const PolyLine& plPoly, double& dPointPolyLineDist) ; +/*static*/ bool +SplitPolyLineAtPoint( const Point3d& ptPoint, /*const*/ PolyLine& Loop, PolyLine& Loop1, PolyLine& Loop2, double dTol = EPS_SMALL) ; +/*static*/ bool +AddPolyLineToPolyLine( PolyLine& Poly, PolyLine& PolyToAdd, double dTol = EPS_SMALL) ; + +//---------------------------------------------------------------------------- +struct PositionOnPolyLine { + int nIndexInVec ; + int nSegNum ; + double dParOnSeg ; + PositionOnPolyLine( int nIndex, int nSeg, double dPar) { + nIndexInVec = nIndex ; + nSegNum = nSeg ; + dParOnSeg = dPar ; + } +} ;