Open
Graph Drawing
Framework
v. 2023.09 (Elderberry)
Overview
Class Hierarchy
Class Index
Class List
Members
Namespaces
Source Files
ConvexHull.h
Go to the documentation of this file.
1
32
#pragma once
33
34
#include <
ogdf/basic/GraphAttributes.h
>
35
#include <
ogdf/basic/geometry.h
>
36
#include <
ogdf/energybased/multilevel_mixer/MultilevelGraph.h
>
37
38
#include <vector>
39
40
namespace
ogdf
{
41
43
48
class
OGDF_EXPORT
ConvexHull
{
49
private
:
50
bool
sameDirection(
const
DPoint
& start,
const
DPoint
&
end
,
const
DPoint
& s,
const
DPoint
& e)
const
;
51
52
// calculates a convex hull very quickly but only works with cross-free Polygons!
53
DPolygon
conv(
const
DPolygon
& poly)
const
;
54
55
// Calculates the Part of the convex hull that is left of line start-end
56
// /a points should only contain points that really are left of the line.
57
void
leftHull(std::vector<DPoint> points,
DPoint
& start,
DPoint
&
end
,
DPolygon
& hullPoly)
const
;
58
59
60
public
:
61
ConvexHull
();
62
~
ConvexHull
();
63
64
DPoint
calcNormal(
const
DPoint
& start,
const
DPoint
&
end
)
const
;
65
double
leftOfLine(
const
DPoint
& normal,
const
DPoint
& point,
const
DPoint
& pointOnLine)
const
;
66
67
DPolygon
call(std::vector<DPoint> points)
const
;
68
DPolygon
call(
GraphAttributes
& GA)
const
;
69
DPolygon
call(
MultilevelGraph
& MLG)
const
;
70
};
71
72
}
ogdf
The namespace for all OGDF objects.
Definition:
AugmentationModule.h:36
ogdf::GraphAttributes
Stores additional attributes of a graph (like layout information).
Definition:
GraphAttributes.h:66
GraphAttributes.h
Declaration of class GraphAttributes which extends a Graph by additional attributes.
ogdf::GenericPoint< double >
geometry.h
Declaration of classes GenericPoint, GenericPolyline, GenericLine, GenericSegment,...
ogdf::ConvexHull
Computes the convex hull of a set of points or a layout.
Definition:
ConvexHull.h:48
ogdf::DPolygon
Polygons with real coordinates.
Definition:
geometry.h:982
ogdf::MultilevelGraph
Definition:
MultilevelGraph.h:66
MultilevelGraph.h
MLG is the main data structure for ModularMultilevelMixer.
ogdf::end
HypergraphRegistry< HypernodeElement >::iterator end(const HypergraphRegistry< HypernodeElement > &self)
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition:
config.h:101
include
ogdf
graphalg
ConvexHull.h
This site is powered by Netlify.
© 1999–2024
The OGDF Team