Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

ConvexHull.h
Go to the documentation of this file.
1 
32 #pragma once
33 
35 #include <ogdf/basic/geometry.h>
37 #include <vector>
38 
39 namespace ogdf {
40 
42 
48 private:
49  bool sameDirection(const DPoint &start, const DPoint &end, const DPoint &s, const DPoint &e) const;
50 
51  // calculates a convex hull very quickly but only works with cross-free Polygons!
52  DPolygon conv(const DPolygon &poly) const;
53 
54  // Calculates the Part of the convex hull that is left of line start-end
55  // /a points should only contain points that really are left of the line.
56  void leftHull(std::vector<DPoint> points, DPoint &start, DPoint &end, DPolygon &hullPoly) const;
57 
58 
59 public:
60  ConvexHull();
61  ~ConvexHull();
62 
63  DPoint calcNormal(const DPoint &start, const DPoint &end) const;
64  double leftOfLine(const DPoint &normal, const DPoint &point, const DPoint &pointOnLine) const;
65 
66  DPolygon call(std::vector<DPoint> points) const;
67  DPolygon call(GraphAttributes &GA) const;
68  DPolygon call(MultilevelGraph &MLG) const;
69 };
70 
71 }
Declaration of class GraphAttributes which extends a Graph by additional attributes.
Polygons with real coordinates.
Definition: geometry.h:1025
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
Stores additional attributes of a graph (like layout information).
MLG is the main data structure for ModularMultilevelMixer.
Computes the convex hull of a set of points or a layout.
Definition: ConvexHull.h:47
The namespace for all OGDF objects.
Declaration of classes GenericPoint, GenericPolyline, GenericLine, GenericSegment, DPolygon, DRect, DIntersectableRect.