Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

VertexPositionModule.h
Go to the documentation of this file.
1 
32 #pragma once
33 
35 #include <ogdf/basic/Graph_d.h>
36 #include <ogdf/basic/geometry.h>
37 
38 namespace ogdf {
39 
44 public:
45  // ~Initialize vertex position module
47 
49 
56  void setBoundingBox(double x_min, double y_min, double x_max, double y_max) {
57  m_x_min = x_min;
58  m_y_min = y_min;
59  m_x_max = x_max;
60  m_y_max = y_max;
61  }
62 
64  virtual DPoint call(GraphAttributes& GA, node v) = 0;
65 
67  DPoint operator()(GraphAttributes& GA, node v) { return call(GA, v); }
68 
69 protected:
70  double m_x_min = 0;
71  double m_y_min = 0;
72  double m_x_max = 1;
73  double m_y_max = 1;
74 };
75 
76 }
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::VertexPositionModule::operator()
DPoint operator()(GraphAttributes &GA, node v)
computes a good position for the vertex v with respect to GA
Definition: VertexPositionModule.h:67
ogdf::VertexPositionModule
Interface for computing a good / optimal vertex position.
Definition: VertexPositionModule.h:43
ogdf::VertexPositionModule::~VertexPositionModule
~VertexPositionModule()
Definition: VertexPositionModule.h:48
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:56
Graph_d.h
Pure declaration header, find template implementation in Graph.h.
ogdf::VertexPositionModule::VertexPositionModule
VertexPositionModule()
Definition: VertexPositionModule.h:46
ogdf::NodeElement
Class for the representation of nodes.
Definition: Graph_d.h:233