From 12212d23e4455b4652da96a72474112f73254d25 Mon Sep 17 00:00:00 2001 From: don bright Date: Thu, 25 Jun 2015 19:05:43 -0700 Subject: [PATCH] WinMSYS2: use namespace GeometryUtils for Polygon, de-conflict wingdi.h --- src/GeometryUtils.h | 3 ++- src/cgalutils-applyops.cc | 2 ++ src/cgalutils-project.cc | 1 + src/cgalutils.cc | 2 ++ src/polyset-utils.cc | 2 ++ src/polyset.h | 2 ++ 6 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/GeometryUtils.h b/src/GeometryUtils.h index 8d507adb..817357cc 100644 --- a/src/GeometryUtils.h +++ b/src/GeometryUtils.h @@ -3,6 +3,8 @@ #include "linalg.h" #include +namespace GeometryUtils { + typedef std::vector Polygon; typedef std::vector Polygons; @@ -25,7 +27,6 @@ struct IndexedPolyMesh { std::vector > polygons; }; -namespace GeometryUtils { bool tessellatePolygon(const Polygon &polygon, Polygons &triangles, const Vector3f *normal = NULL); diff --git a/src/cgalutils-applyops.cc b/src/cgalutils-applyops.cc index 77600214..99cc24a0 100644 --- a/src/cgalutils-applyops.cc +++ b/src/cgalutils-applyops.cc @@ -35,6 +35,8 @@ #include #include +using namespace GeometryUtils; + namespace CGALUtils { template diff --git a/src/cgalutils-project.cc b/src/cgalutils-project.cc index 1f8ce107..53500582 100644 --- a/src/cgalutils-project.cc +++ b/src/cgalutils-project.cc @@ -35,6 +35,7 @@ #include #include +using namespace GeometryUtils; static void add_outline_to_poly(CGAL_Nef_polyhedron2::Explorer &explorer, CGAL_Nef_polyhedron2::Explorer::Halfedge_around_face_const_circulator circ, diff --git a/src/cgalutils.cc b/src/cgalutils.cc index 08f0ff81..a86e0ef8 100644 --- a/src/cgalutils.cc +++ b/src/cgalutils.cc @@ -35,6 +35,8 @@ #include #include +using namespace GeometryUtils; + static CGAL_Nef_polyhedron *createNefPolyhedronFromPolySet(const PolySet &ps) { if (ps.isEmpty()) return new CGAL_Nef_polyhedron(); diff --git a/src/polyset-utils.cc b/src/polyset-utils.cc index 57671a76..ffb1fdf6 100644 --- a/src/polyset-utils.cc +++ b/src/polyset-utils.cc @@ -11,6 +11,8 @@ #include +using namespace GeometryUtils; + namespace PolysetUtils { // Project all polygons (also back-facing) into a Polygon2d instance. diff --git a/src/polyset.h b/src/polyset.h index 5bd3450d..f83e0044 100644 --- a/src/polyset.h +++ b/src/polyset.h @@ -12,6 +12,8 @@ #include BOOST_TRIBOOL_THIRD_STATE(unknown) +using namespace GeometryUtils; + class PolySet : public Geometry { public: