Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

ClusterOrthoLayout.h
Go to the documentation of this file.
1 
33 #pragma once
34 
39 
40 
41 namespace ogdf {
42 
44 
48 {
49 public:
52 
53 
60  void call(ClusterPlanRep &PG, adjEntry adjExternal, Layout &drawing);
61 
63  virtual void call(
64  ClusterPlanRep &PG,
65  adjEntry adjExternal,
66  Layout &drawing,
67  List<NodePair>& npEdges,
68  List<edge>& newEdges,
69  Graph& originalGraph) override;
70 
71 
72  //
73  // options
74 
76  virtual double separation() const override {
77  return m_separation;
78  }
80  virtual void separation(double sep) override {
81  m_separation = sep;
82  }
83 
85  //distance between the glue point of an edge and a corner of the vertex boundary
86  double cOverhang() const {
87  return m_cOverhang;
88  }
90  void cOverhang(double c) {
91  m_cOverhang = c;
92  }
93 
94 
96  double margin() const {
97  return m_margin;
98  }
100  void margin(double m) {
101  m_margin = m;
102  }
103 
104 
107  return m_preferedDir;
108  }
110  void preferedDir(OrthoDir dir) {
111  m_preferedDir = dir;
112  }
113 
115  int costAssoc() const {
116  return m_costAssoc;
117  }
119  void costAssoc(int c) {
120  m_costAssoc = c;
121  }
122 
124  int costGen() const {
125  return m_costGen;
126  }
128  void costGen(int c) {
129  m_costGen = c;
130  }
131 
133  void optionProfile(int i) {m_optionProfile = i;}
134 
136  void align(bool b) {m_align = b;}
137 
139  void scaling(bool b) {m_useScalingCompaction = b;}
140 
142  //Necessary to allow setting over base class pointer
143  //bit 0 = alignment
144  //bit 1 = scaling
145  //bit 2 = progressive/traditional
146  //=> 0 is standard
147  virtual void setOptions(int optionField) override {
148  m_align = (optionField & 1) != 0;
149  m_useScalingCompaction = (optionField & 2) != 0;
150  m_orthoStyle = (optionField & 4) != 0;
151  // m_orthoStyle = 0 is traditional
152  }
153 
154 
155 private:
156  // compute bounding box and move final drawing such that it is 0 aligned
157  // respecting margins
158  void computeBoundingBox(const ClusterPlanRep &PG, Layout &drawing);
159 
160 
161  // options
162  double m_separation;
163  double m_cOverhang;
164  double m_margin;
168  int m_costGen;
169  //align merger sons on same level
170  bool m_align;
171  //settings for scaling compaction
175 };
176 
177 
178 } // end namespace ogdf
Declaration of interface for planar layout algorithms for UML diagrams (used in planarization approac...
OrthoDir m_preferedDir
Preferred direction of generalizations (obsolete).
void align(bool b)
Sets alignment option.
Data type for general directed graphs (adjacency list representation).
Definition: Graph_d.h:472
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:99
Declaration of orthogonal representation of planar graphs.
void margin(double m)
Sets the distance from the tight bounding box to the boundary of the drawing.
double cOverhang() const
Returns cOverhang, where cOverhang * separation defines the minimum.
bool m_align
Horizontal alignment option.
Represents a planar orthogonal drawing algorithm for c-planar, c-connected clustered graphs...
Declaration of ClusterPlanRep class, allowing cluster boundary insertion and shortest path edge inser...
int m_scalingSteps
Number of scaling steps during compaction.
double m_margin
Distance between bounding box and drawing boundary.
void optionProfile(int i)
Sets the option profile, thereby fixing a set of drawing options.
int m_orthoStyle
Type of style (traditional/progressive) used for shape step.
bool m_useScalingCompaction
Switches scaling improvement during compaction.
void costAssoc(int c)
Sets cost of associations which is used in the compactions step.
OrthoDir preferedDir() const
Returns the preferred direction of generalizations.
int costAssoc() const
Returns cost of associations which is used in the compactions step.
void costGen(int c)
Sets cost of generalizations.
void scaling(bool b)
Sets scaling option for compaction step.
double m_cOverhang
Factor for minimum distance between vertex corner an adjacent edges.
int costGen() const
Returns cost of generalizations.
Doubly linked lists (maintaining the length of the list).
Definition: List.h:39
void preferedDir(OrthoDir dir)
Sets the preferred direction of generalizations.
Planarized representations for clustered graphs.
Declares CPlanarEdgeInserter class.
int m_costAssoc
Compaction cost of association type edges.
double m_separation
Minimum distance between edges and vertices.
OrthoDir
Definition: OrthoRep.h:52
virtual void separation(double sep) override
Sets the minimum distance between edges and vertices.
double margin() const
Returns the distance from the tight bounding box to the boundary of the drawing.
Interface for planar cluster layout algorithms.
void cOverhang(double c)
Sets cOverhang value.
virtual void setOptions(int optionField) override
Sets generic options by setting field bits.
The namespace for all OGDF objects.
virtual double separation() const override
Returns the minimum distance between edges and vertices.
int m_costGen
Compaction cost of generalizations type edges.
Class for adjacency list elements.
Definition: Graph_d.h:78
Stores a layout of a graph (coordinates of nodes, bend points of edges).
Definition: Layout.h:46