Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

LayoutPlanRepModule.h
Go to the documentation of this file.
1 
33 #pragma once
34 
35 #include <ogdf/basic/Layout.h>
36 #include <ogdf/planarity/PlanRep.h>
37 
38 namespace ogdf {
39 
40 
42 
46 public:
49 
51  virtual ~LayoutPlanRepModule() { }
52 
54 
62  virtual void call(PlanRep& PG, adjEntry adjExternal, Layout& drawing) = 0;
63 
65  void operator()(PlanRep& PG, adjEntry adjExternal, Layout& drawing) {
66  call(PG, adjExternal, drawing);
67  }
68 
70  const DPoint& getBoundingBox() const { return m_boundingBox; }
71 
73  virtual double separation() const = 0;
74 
76  virtual void separation(double sep) = 0;
77 
78 protected:
80 
84 
86 
90  void setBoundingBox(PlanRep& PG, Layout& drawing) {
91  m_boundingBox = drawing.computeBoundingBox(PG);
92  }
93 
95 };
96 
97 }
ogdf
The namespace for all OGDF objects.
Definition: AugmentationModule.h:36
ogdf::GenericPoint< double >
ogdf::PlanRep
Planarized representations (of a connected component) of a graph.
Definition: PlanRep.h:57
Layout.h
Declaration of class Layout.
ogdf::LayoutPlanRepModule::m_boundingBox
DPoint m_boundingBox
Stores the bounding box of the computed layout.
Definition: LayoutPlanRepModule.h:83
ogdf::LayoutPlanRepModule::LayoutPlanRepModule
LayoutPlanRepModule()
Initializes a planar layout module.
Definition: LayoutPlanRepModule.h:48
ogdf::LayoutPlanRepModule::operator()
void operator()(PlanRep &PG, adjEntry adjExternal, Layout &drawing)
Computes a planar layout of PG in drawing.
Definition: LayoutPlanRepModule.h:65
ogdf::LayoutPlanRepModule::~LayoutPlanRepModule
virtual ~LayoutPlanRepModule()
Destructor.
Definition: LayoutPlanRepModule.h:51
PlanRep.h
Declaration of a base class for planar representations of graphs and cluster graphs.
ogdf::AdjElement
Class for adjacency list elements.
Definition: Graph_d.h:135
ogdf::Layout
Stores a layout of a graph (coordinates of nodes, bend points of edges).
Definition: Layout.h:46
OGDF_MALLOC_NEW_DELETE
#define OGDF_MALLOC_NEW_DELETE
Makes the class use malloc for memory allocation.
Definition: memory.h:91
ogdf::LayoutPlanRepModule
Interface for planar layout algorithms (used in the planarization approach).
Definition: LayoutPlanRepModule.h:45
ogdf::LayoutPlanRepModule::getBoundingBox
const DPoint & getBoundingBox() const
Returns the bounding box of the computed layout.
Definition: LayoutPlanRepModule.h:70
OGDF_EXPORT
#define OGDF_EXPORT
Specifies that a function or class is exported by the OGDF DLL.
Definition: config.h:101
ogdf::LayoutPlanRepModule::setBoundingBox
void setBoundingBox(PlanRep &PG, Layout &drawing)
Computes and sets the bounding box variable m_boundingBox.
Definition: LayoutPlanRepModule.h:90
ogdf::Layout::computeBoundingBox
DPoint computeBoundingBox(PlanRep &PG) const
Computes the bounding box of the layout, which is a drawing of PG.