Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

VertexPositionModule.h
Go to the documentation of this file.
1 
32 #pragma once
33 
34 #include <ogdf/basic/Graph.h>
35 #include <ogdf/basic/basic.h>
36 #include <ogdf/basic/geometry.h>
37 
38 namespace ogdf {
39 class GraphAttributes;
40 
45 public:
46  // ~Initialize vertex position module
48 
50 
57  void setBoundingBox(double x_min, double y_min, double x_max, double y_max) {
58  m_x_min = x_min;
59  m_y_min = y_min;
60  m_x_max = x_max;
61  m_y_max = y_max;
62  }
63 
65  virtual DPoint call(GraphAttributes& GA, node v) = 0;
66 
68  DPoint operator()(GraphAttributes& GA, node v) { return call(GA, v); }
69 
70 protected:
71  double m_x_min = 0;
72  double m_y_min = 0;
73  double m_x_max = 1;
74  double m_y_max = 1;
75 };
76 
77 }
ogdf
The namespace for all OGDF objects.
Definition: multilevelmixer.cpp:39
ogdf::GraphAttributes
Stores additional attributes of a graph (like layout information).
Definition: GraphAttributes.h:72
Graph.h
Includes declaration of graph class.
ogdf::GenericPoint< double >
geometry.h
Declaration of classes GenericPoint, GenericPolyline, GenericLine, GenericSegment,...
ogdf::VertexPositionModule::operator()
DPoint operator()(GraphAttributes &GA, node v)
computes a good position for the vertex v with respect to GA
Definition: VertexPositionModule.h:68
ogdf::VertexPositionModule
Interface for computing a good / optimal vertex position.
Definition: VertexPositionModule.h:44
ogdf::VertexPositionModule::~VertexPositionModule
~VertexPositionModule()
Definition: VertexPositionModule.h:49
basic.h
Basic declarations, included by all source files.
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::VertexPositionModule::setBoundingBox
void setBoundingBox(double x_min, double y_min, double x_max, double y_max)
Vertex has to be moved within the given bound.
Definition: VertexPositionModule.h:57
ogdf::VertexPositionModule::VertexPositionModule
VertexPositionModule()
Definition: VertexPositionModule.h:47
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:240