Open
Graph Drawing
Framework

 v. 2022.02 (Dogwood)
 

ogdf::OrthoLayout Class Reference

The Orthogonal layout algorithm for planar graphs. More...

#include <ogdf/orthogonal/OrthoLayout.h>

+ Inheritance diagram for ogdf::OrthoLayout:

Public Member Functions

 OrthoLayout ()
 Creates an instance of Orthogonal layout and sets options to default values. More...
 
virtual void call (PlanRep &PG, adjEntry adjExternal, Layout &drawing) override
 Calls the layout algorithm for planarized representation PG. More...
 
Optional parameters
double separation () const override
 Returns the minimum distance between edges and vertices. More...
 
void separation (double sep) override
 Sets the minimum distance between vertices. More...
 
double cOverhang () const
 Returns the option m_cOverhang, which specifies the minimal distance of incident edges to the corner of a vertex. More...
 
void cOverhang (double c)
 Sets the option m_cOverhang, which specifies the minimal distance of incident edges to the corner of a vertex. More...
 
double margin () const
 Returns the desired margin around the drawing. More...
 
void margin (double m)
 Sets the desired margin around the drawing. More...
 
bool progressive () const
 Returns whether the currently selected orthogonaliaztion model is progressive. More...
 
void progressive (bool b)
 Selects if the progressive (true) or traditional (false) orthogonalization model is used. More...
 
bool scaling () const
 Returns whether scaling is used in the compaction phase. More...
 
void scaling (bool b)
 Selects if scaling is used in the compaction phase. More...
 
void bendBound (int i)
 Set bound on the number of bends. More...
 
- Public Member Functions inherited from ogdf::LayoutPlanRepModule
 LayoutPlanRepModule ()
 Initializes a planar layout module. More...
 
virtual ~LayoutPlanRepModule ()
 Destructor. More...
 
const DPointgetBoundingBox () const
 Returns the bounding box of the computed layout. More...
 
void operator() (PlanRep &PG, adjEntry adjExternal, Layout &drawing)
 Computes a planar layout of PG in drawing. More...
 

Private Member Functions

void computeBoundingBox (const PlanRep &PG, Layout &drawing)
 

Private Attributes

int m_bendBound
 bounds the number of bends per edge in ortho shaper More...
 
double m_cOverhang
 distance to corner (relative to node size) More...
 
double m_margin
 margin around drawing More...
 
bool m_progressive
 use progressive ortho style (prefer 180 degree angles on deg-2 vertices). More...
 
int m_scalingSteps
 number of scaling steps (NOT REALLY USED!) More...
 
double m_separation
 minimum distance between obkects More...
 
bool m_useScalingCompaction
 use scaling for compaction More...
 

Additional Inherited Members

- Protected Member Functions inherited from ogdf::LayoutPlanRepModule
void setBoundingBox (PlanRep &PG, Layout &drawing)
 Computes and sets the bounding box variable m_boundingBox. More...
 
- Protected Attributes inherited from ogdf::LayoutPlanRepModule
DPoint m_boundingBox
 Stores the bounding box of the computed layout. More...
 

Detailed Description

The Orthogonal layout algorithm for planar graphs.

Definition at line 41 of file OrthoLayout.h.

Constructor & Destructor Documentation

◆ OrthoLayout()

ogdf::OrthoLayout::OrthoLayout ( )

Creates an instance of Orthogonal layout and sets options to default values.

Member Function Documentation

◆ bendBound()

void ogdf::OrthoLayout::bendBound ( int  i)
inline

Set bound on the number of bends.

Definition at line 120 of file OrthoLayout.h.

◆ call()

virtual void ogdf::OrthoLayout::call ( PlanRep PG,
adjEntry  adjExternal,
Layout drawing 
)
overridevirtual

Calls the layout algorithm for planarized representation PG.

Precondition
PG is embedded and adjExternal is an adjecenty entry in PG.
Parameters
PGis the planarized representation for which a layout shall be computed. PG may be modified during the call.
adjExternalis an adjaceny entry in PG that shall be on the external face of the drawing.
drawingis assigned the final layout.

Implements ogdf::LayoutPlanRepModule.

◆ computeBoundingBox()

void ogdf::OrthoLayout::computeBoundingBox ( const PlanRep PG,
Layout drawing 
)
private

◆ cOverhang() [1/2]

double ogdf::OrthoLayout::cOverhang ( ) const
inline

Returns the option m_cOverhang, which specifies the minimal distance of incident edges to the corner of a vertex.

m_cOverhang * m_separation is the minimum distance between the glue point of an edge and a corner of the vertex boundary.

Definition at line 82 of file OrthoLayout.h.

◆ cOverhang() [2/2]

void ogdf::OrthoLayout::cOverhang ( double  c)
inline

Sets the option m_cOverhang, which specifies the minimal distance of incident edges to the corner of a vertex.

Definition at line 87 of file OrthoLayout.h.

◆ margin() [1/2]

double ogdf::OrthoLayout::margin ( ) const
inline

Returns the desired margin around the drawing.

This is the distance between the tight bounding box and the boundary of the drawing.

Definition at line 95 of file OrthoLayout.h.

◆ margin() [2/2]

void ogdf::OrthoLayout::margin ( double  m)
inline

Sets the desired margin around the drawing.

Definition at line 100 of file OrthoLayout.h.

◆ progressive() [1/2]

bool ogdf::OrthoLayout::progressive ( ) const
inline

Returns whether the currently selected orthogonaliaztion model is progressive.

Definition at line 105 of file OrthoLayout.h.

◆ progressive() [2/2]

void ogdf::OrthoLayout::progressive ( bool  b)
inline

Selects if the progressive (true) or traditional (false) orthogonalization model is used.

In the progressive model, 180 degree angles at degree-2 nodes are preferred.

Definition at line 111 of file OrthoLayout.h.

◆ scaling() [1/2]

bool ogdf::OrthoLayout::scaling ( ) const
inline

Returns whether scaling is used in the compaction phase.

Definition at line 114 of file OrthoLayout.h.

◆ scaling() [2/2]

void ogdf::OrthoLayout::scaling ( bool  b)
inline

Selects if scaling is used in the compaction phase.

Definition at line 117 of file OrthoLayout.h.

◆ separation() [1/2]

double ogdf::OrthoLayout::separation ( ) const
inlineoverridevirtual

Returns the minimum distance between edges and vertices.

Implements ogdf::LayoutPlanRepModule.

Definition at line 69 of file OrthoLayout.h.

◆ separation() [2/2]

void ogdf::OrthoLayout::separation ( double  sep)
inlineoverridevirtual

Sets the minimum distance between vertices.

Implements ogdf::LayoutPlanRepModule.

Definition at line 74 of file OrthoLayout.h.

Member Data Documentation

◆ m_bendBound

int ogdf::OrthoLayout::m_bendBound
private

bounds the number of bends per edge in ortho shaper

Definition at line 138 of file OrthoLayout.h.

◆ m_cOverhang

double ogdf::OrthoLayout::m_cOverhang
private

distance to corner (relative to node size)

Definition at line 134 of file OrthoLayout.h.

◆ m_margin

double ogdf::OrthoLayout::m_margin
private

margin around drawing

Definition at line 135 of file OrthoLayout.h.

◆ m_progressive

bool ogdf::OrthoLayout::m_progressive
private

use progressive ortho style (prefer 180 degree angles on deg-2 vertices).

Definition at line 137 of file OrthoLayout.h.

◆ m_scalingSteps

int ogdf::OrthoLayout::m_scalingSteps
private

number of scaling steps (NOT REALLY USED!)

Definition at line 141 of file OrthoLayout.h.

◆ m_separation

double ogdf::OrthoLayout::m_separation
private

minimum distance between obkects

Definition at line 133 of file OrthoLayout.h.

◆ m_useScalingCompaction

bool ogdf::OrthoLayout::m_useScalingCompaction
private

use scaling for compaction

Definition at line 140 of file OrthoLayout.h.


The documentation for this class was generated from the following file: