Open
Graph Drawing
Framework

 v. snapshot-2017-02-16
 

ogdf::DPolyline Class Reference

Polylines with real coordinates. More...

#include <ogdf/basic/geometry.h>

+ Inheritance diagram for ogdf::DPolyline:

Public Member Functions

 DPolyline ()
 Creates an empty integer polyline. More...
 
 DPolyline (const DPolyline &dpl)
 Copy constructor. More...
 
void convertToInt ()
 Converts all coordinates rounded to s_prec decimal digits. More...
 
double length () const
 Returns the euclidean length of the polyline. More...
 
void normalize ()
 Deletes all redundant points on the polyline that lie on a straight line given by their adajcent points. More...
 
void normalize (DPoint src, DPoint tgt)
 Deletes all redundant points on the polyline that lie on a straight line given by their adajcent points. More...
 
DPolyline & operator= (const DPolyline &dpl)
 Assignment operator. More...
 
DPoint position (const double fraction, double len=-1.0) const
 Returns a point on the polyline which is fraction * len away from the start point. More...
 
void unify ()
 Deletes all successive points with equal coordinates. More...
 
- Public Member Functions inherited from ogdf::List< DPoint >
 List ()
 Constructs an empty doubly linked list. More...
 
 List (std::initializer_list< DPoint > init)
 Constructs a doubly linked list containing the elements in init. More...
 
 List (const List< DPoint > &L)
 Constructs a doubly linked list that is a copy of L. More...
 
 List (List< DPoint > &&L)
 Constructs a doubly linked list containing the elements of L (move semantics). More...
 
int size () const
 Returns the number of elements in the list. More...
 
const ListPure< DPoint > & getListPure () const
 Conversion to const ListPure. More...
 
List< DPoint > & operator= (const List< DPoint > &L)
 Assignment operator. More...
 
List< DPoint > & operator= (List< DPoint > &&L)
 Assignment operator (move semantics). More...
 
bool operator== (const List< DPoint > &L) const
 
bool operator!= (const List< DPoint > &L) const
 
iterator pushFront (const DPoint &x)
 
iterator emplaceFront (Args &&... args)
 
iterator pushBack (const DPoint &x)
 
iterator emplaceBack (Args &&... args)
 
iterator insert (const DPoint &x, iterator it, Direction dir=Direction::after)
 
iterator insertBefore (const DPoint &x, iterator it)
 
iterator insertAfter (const DPoint &x, iterator it)
 
void popFront ()
 
DPoint popFrontRet ()
 
void popBack ()
 
DPoint popBackRet ()
 
void del (iterator it)
 
bool removeFirst (const DPoint &x)
 
void clear ()
 
void moveToFront (iterator it, List< DPoint > &L2)
 
void moveToBack (iterator it, List< DPoint > &L2)
 
void moveToSucc (iterator it, List< DPoint > &L2, iterator itBefore)
 
void moveToPrec (iterator it, List< DPoint > &L2, iterator itAfter)
 
void conc (List< DPoint > &L2)
 
void concFront (List< DPoint > &L2)
 
void swap (List< DPoint > &other)
 
void split (iterator it, List< DPoint > &L1, List< DPoint > &L2, Direction dir=Direction::before)
 

Static Private Attributes

static const double s_prec
 The conversion-precision. More...
 

Detailed Description

Polylines with real coordinates.

This class represents real polylines by a list of real points. Such polylines are, e.g., used in layouts for representing bend point lists.

Definition at line 350 of file geometry.h.

Constructor & Destructor Documentation

◆ DPolyline() [1/2]

ogdf::DPolyline::DPolyline ( )
inline

Creates an empty integer polyline.

Definition at line 354 of file geometry.h.

◆ DPolyline() [2/2]

ogdf::DPolyline::DPolyline ( const DPolyline &  dpl)
inline

Copy constructor.

Definition at line 357 of file geometry.h.

Member Function Documentation

◆ convertToInt()

void ogdf::DPolyline::convertToInt ( )

Converts all coordinates rounded to s_prec decimal digits.

◆ length()

double ogdf::DPolyline::length ( ) const

Returns the euclidean length of the polyline.

◆ normalize() [1/2]

void ogdf::DPolyline::normalize ( )

Deletes all redundant points on the polyline that lie on a straight line given by their adajcent points.

◆ normalize() [2/2]

void ogdf::DPolyline::normalize ( DPoint  src,
DPoint  tgt 
)

Deletes all redundant points on the polyline that lie on a straight line given by their adajcent points.

◆ operator=()

DPolyline& ogdf::DPolyline::operator= ( const DPolyline &  dpl)
inline

Assignment operator.

Definition at line 360 of file geometry.h.

◆ position()

DPoint ogdf::DPolyline::position ( const double  fraction,
double  len = -1.0 
) const

Returns a point on the polyline which is fraction * len away from the start point.

Parameters
fractiondefines the fraction of len to be considered.
lenis the given length, or the length of the polyline if len < 0.

◆ unify()

void ogdf::DPolyline::unify ( )

Deletes all successive points with equal coordinates.

Member Data Documentation

◆ s_prec

const double ogdf::DPolyline::s_prec
staticprivate

The conversion-precision.

Definition at line 351 of file geometry.h.


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