summaryrefslogtreecommitdiffstats
path: root/src/2geom/basic-intersection.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/2geom/basic-intersection.h')
-rw-r--r--src/2geom/basic-intersection.h77
1 files changed, 37 insertions, 40 deletions
diff --git a/src/2geom/basic-intersection.h b/src/2geom/basic-intersection.h
index 783df370e..a19a10c8c 100644
--- a/src/2geom/basic-intersection.h
+++ b/src/2geom/basic-intersection.h
@@ -44,38 +44,44 @@
#define USE_RECURSIVE_INTERSECTOR 0
-namespace Geom {
-
-#ifdef USE_RECURSIVE_INTERSECTOR
-void
-find_intersections( std::vector<std::pair<double, double> > &xs,
- D2<SBasis> const & A,
- D2<SBasis> const & B);
-void
-find_self_intersections(std::vector<std::pair<double, double> > &xs,
- D2<SBasis> const & A);
+namespace Geom {
-// Bezier form
-void
-find_intersections( std::vector<std::pair<double, double> > &xs,
- std::vector<Point> const & A,
- std::vector<Point> const & B,
- double precision = 1e-5);
+//why not allowing precision to be set here?
+void find_intersections(std::vector<std::pair<double, double> >& xs,
+ D2<SBasis> const & A,
+ D2<SBasis> const & B);
-// Bezier form
-void
-find_intersections_bezier_clipping( std::vector<std::pair<double, double> > &xs,
- std::vector<Point> const & A,
- std::vector<Point> const & B,
- double precision = 1e-5);
+void find_intersections(std::vector< std::pair<double, double> > & xs,
+ std::vector<Point> const& A,
+ std::vector<Point> const& B,
+ double precision = 1e-5);
-void
-find_self_intersections(std::vector<std::pair<double, double> > &xs,
- std::vector<Point> const & A);
+//why not allowing precision to be set here?
+void find_self_intersections(std::vector<std::pair<double, double> >& xs,
+ D2<SBasis> const & A);
-#else
+//--not implemented
+//void find_self_intersections(std::vector<std::pair<double, double> >& xs,
+// std::vector<Point> const & A);
+
+
+//TODO: this should be moved to .cpp, shouldn't it?
+// #ifdef USE_RECURSIVE_INTERSECTOR
+// /*
+// * find_intersection
+// *
+// * input: A, B - set of control points of two Bezier curve
+// * input: precision - required precision of computation
+// * output: xs - set of pairs of parameter values
+// * at which crossing happens
+// */
+// void find_intersections_bezier_recursive (std::vector< std::pair<double, double> > & xs,
+// std::vector<Point> const& A,
+// std::vector<Point> const& B,
+// double precision = 1e-5);
+// #else
/*
* find_intersection
*
@@ -87,11 +93,14 @@ find_self_intersections(std::vector<std::pair<double, double> > &xs,
* This routine is based on the Bezier Clipping Algorithm,
* see: Sederberg, Nishita, 1990 - Curve intersection using Bezier clipping
*/
-void find_intersections_clipping (std::vector< std::pair<double, double> > & xs,
+void find_intersections_bezier_clipping (std::vector< std::pair<double, double> > & xs,
std::vector<Point> const& A,
std::vector<Point> const& B,
double precision = 1e-5);
-#endif
+//#endif
+
+
+
/*
* find_collinear_normal
*
@@ -112,18 +121,6 @@ void polish_intersections(std::vector<std::pair<double, double> > &xs,
D2<SBasis> const &A,
D2<SBasis> const &B);
-void find_intersections(std::vector<std::pair<double, double> >& xs,
- D2<SBasis> const & A,
- D2<SBasis> const & B);
-
-void find_self_intersections(std::vector<std::pair<double, double> >& xs,
- D2<SBasis> const & A);
-
-
-void find_self_intersections(std::vector<std::pair<double, double> >& xs,
- std::vector<Point> const & A);
-
-
/**
* Compute the Hausdorf distance from A to B only.