From ee72b1fdb3f395bcef5f01ae6d401c85d88240ad Mon Sep 17 00:00:00 2001
From: Thomas Fischer <thomas.fischer@ufz.de>
Date: Thu, 28 Feb 2019 11:54:09 +0100
Subject: [PATCH] [GL] Polygon: Remove unused functions.

---
 GeoLib/Polygon.cpp | 41 -----------------------------------------
 GeoLib/Polygon.h   | 16 ----------------
 2 files changed, 57 deletions(-)

diff --git a/GeoLib/Polygon.cpp b/GeoLib/Polygon.cpp
index 6405e80ed83..3f712213bd0 100644
--- a/GeoLib/Polygon.cpp
+++ b/GeoLib/Polygon.cpp
@@ -267,22 +267,6 @@ bool Polygon::getNextIntersectionPointPolygonLine(
     return false;
 }
 
-const std::list<Polygon*>& Polygon::getListOfSimplePolygons()
-{
-    return _simple_polygon_list;
-}
-
-void Polygon::computeListOfSimplePolygons ()
-{
-    splitPolygonAtPoint (_simple_polygon_list.begin());
-    splitPolygonAtIntersection (_simple_polygon_list.begin());
-
-    for (auto& polygon : _simple_polygon_list)
-    {
-        polygon->initialise();
-    }
-}
-
 EdgeType Polygon::getEdgeType (std::size_t k, GeoLib::Point const & pnt) const
 {
     switch (getLocationOfPoint(k, pnt))
@@ -522,31 +506,6 @@ void Polygon::splitPolygonAtPoint (const std::list<GeoLib::Polygon*>::iterator&
     }
 }
 
-GeoLib::Polygon* createPolygonFromCircle (GeoLib::Point const& middle_pnt, double radius,
-                                          std::vector<GeoLib::Point*> & pnts, std::size_t resolution)
-{
-    const std::size_t off_set (pnts.size());
-    // create points
-    double angle (boost::math::double_constants::two_pi / resolution);
-    for (std::size_t k(0); k < resolution; k++)
-    {
-        auto* pnt(new GeoLib::Point(middle_pnt));
-        (*pnt)[0] += radius * cos (k * angle);
-        (*pnt)[1] += radius * sin (k * angle);
-        pnts.push_back (pnt);
-    }
-
-    // create polygon
-    GeoLib::Polygon* polygon(new GeoLib::Polygon{Polyline{pnts}, false});
-    for (std::size_t k(0); k < resolution; k++)
-    {
-        polygon->addPoint(k + off_set);
-    }
-    polygon->addPoint (off_set);
-
-    return polygon;
-}
-
 bool operator==(Polygon const& lhs, Polygon const& rhs)
 {
     if (lhs.getNumberOfPoints() != rhs.getNumberOfPoints())
diff --git a/GeoLib/Polygon.h b/GeoLib/Polygon.h
index 930ec7b9008..e26033b26ca 100644
--- a/GeoLib/Polygon.h
+++ b/GeoLib/Polygon.h
@@ -108,9 +108,6 @@ public:
                                              GeoLib::Point& intersection_pnt,
                                              std::size_t& seg_num) const;
 
-    void computeListOfSimplePolygons ();
-    const std::list<Polygon*>& getListOfSimplePolygons ();
-
     friend bool operator==(Polygon const& lhs, Polygon const& rhs);
 private:
     /**
@@ -144,19 +141,6 @@ private:
     AABB _aabb;
 };
 
-/**
- * function creates a approximated circle area around a given point
- * @param middle_pnt the middle point of the circle
- * @param radius the radius of the circle
- * @param pnts (output) points that are used to approximate the circle
- * @param resolution number of point to use for approximation
- * @return a pointer to a polygon
- */
-GeoLib::Polygon* createPolygonFromCircle (GeoLib::Point const& middle_pnt,
-                                          double radius,
-                                          std::vector<GeoLib::Point*> & pnts,
-                                          std::size_t resolution = 12);
-
 /**
  * comparison operator for polygons
  * @param lhs the first polygon
-- 
GitLab