Open
Graph Drawing
Framework

 v. 2023.09 (Elderberry)
 

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 107 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 77 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 80 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 86 of file OrthoLayout.h.

◆ margin() [2/2]

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

Sets the desired margin around the drawing.

Definition at line 89 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 92 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 98 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 101 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 104 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 68 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 71 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 127 of file OrthoLayout.h.

◆ m_cOverhang

double ogdf::OrthoLayout::m_cOverhang
private

distance to corner (relative to node size)

Definition at line 123 of file OrthoLayout.h.

◆ m_margin

double ogdf::OrthoLayout::m_margin
private

margin around drawing

Definition at line 124 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 126 of file OrthoLayout.h.

◆ m_scalingSteps

int ogdf::OrthoLayout::m_scalingSteps
private

number of scaling steps (NOT REALLY USED!)

Definition at line 130 of file OrthoLayout.h.

◆ m_separation

double ogdf::OrthoLayout::m_separation
private

minimum distance between obkects

Definition at line 122 of file OrthoLayout.h.

◆ m_useScalingCompaction

bool ogdf::OrthoLayout::m_useScalingCompaction
private

use scaling for compaction

Definition at line 129 of file OrthoLayout.h.


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