Open
Graph Drawing
Framework

 v. 2020.02 (Catalpa)
 

ClusterOrthoLayout.h
Go to the documentation of this file.
1 
33 #pragma once
34 
39 
40 namespace ogdf {
41 
43 
47 {
48 public:
51 
52 
59  void call(ClusterPlanRep &PG, adjEntry adjExternal, Layout &drawing);
60 
62  virtual void call(
63  ClusterPlanRep &PG,
64  adjEntry adjExternal,
65  Layout &drawing,
66  List<edge>& origEdges,
67  Graph& originalGraph) override;
68 
69 
70  //
71  // options
72 
74  virtual double separation() const override {
75  return m_separation;
76  }
78  virtual void separation(double sep) override {
79  m_separation = sep;
80  }
81 
83  //distance between the glue point of an edge and a corner of the vertex boundary
84  double cOverhang() const {
85  return m_cOverhang;
86  }
88  void cOverhang(double c) {
89  m_cOverhang = c;
90  }
91 
92 
94  double margin() const {
95  return m_margin;
96  }
98  void margin(double m) {
99  m_margin = m;
100  }
101 
102 
105  return m_preferedDir;
106  }
108  void preferedDir(OrthoDir dir) {
109  m_preferedDir = dir;
110  }
111 
113  int costAssoc() const {
114  return m_costAssoc;
115  }
117  void costAssoc(int c) {
118  m_costAssoc = c;
119  }
120 
122  int costGen() const {
123  return m_costGen;
124  }
126  void costGen(int c) {
127  m_costGen = c;
128  }
129 
131  void optionProfile(int i) {m_optionProfile = i;}
132 
134  void align(bool b) {m_align = b;}
135 
137  void scaling(bool b) {m_useScalingCompaction = b;}
138 
140  //Necessary to allow setting over base class pointer
141  //bit 0 = alignment
142  //bit 1 = scaling
143  //bit 2 = progressive/traditional
144  //=> 0 is standard
145  virtual void setOptions(int optionField) override {
146  m_align = (optionField & 1) != 0;
147  m_useScalingCompaction = (optionField & 2) != 0;
148  m_orthoStyle = (optionField & 4) != 0;
149  // m_orthoStyle = 0 is traditional
150  }
151 
152 
153 private:
154  // compute bounding box and move final drawing such that it is 0 aligned
155  // respecting margins
156  void computeBoundingBox(const ClusterPlanRep &PG, Layout &drawing);
157 
158 
159  // options
160  double m_separation;
161  double m_cOverhang;
162  double m_margin;
166  int m_costGen;
167  //align merger sons on same level
168  bool m_align;
169  //settings for scaling compaction
173 };
174 
175 }
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:492
#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.
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:51
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:79
Stores a layout of a graph (coordinates of nodes, bend points of edges).
Definition: Layout.h:46