Open
Graph Drawing
Framework

 v.2007.11
 

ogdf::DPolyline Class Reference

Polylines with real coordinates. More...

#include <geometry.h>

Inheritance diagram for ogdf::DPolyline:

ogdf::List< E > ogdf::ListPure< E > ogdf::DPolygon

List of all members.

Public Member Functions

 DPolyline ()
 Creates an empty integer polyline.
 DPolyline (const DPolyline &dpl)
 Copy constructor.
DPolylineoperator= (const DPolyline &dpl)
 Assignment operator.
double length () const
 Returns the euclidean length of the polyline.
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.
void writeGML (const char *filename) const
 Writes the polyline as graph in gml-format to file filename.
void writeGML (ostream &stream) const
 Writes the polyline as graph in gml-format to output stream stream.
void unify ()
 Deletes all successive points with equal coordinates.
void normalize ()
 Deletes all redundant points on the polyline that lie on a straight line given by their adajcent points.
void convertToInt ()
 Converts all coordinates rounded to s_prec decimal digits.

Static Private Attributes

static const double s_prec
 The conversion-precision.


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 335 of file geometry.h.


Constructor & Destructor Documentation

ogdf::DPolyline::DPolyline (  )  [inline]

Creates an empty integer polyline.

Definition at line 339 of file geometry.h.

ogdf::DPolyline::DPolyline ( const DPolyline dpl  )  [inline]

Copy constructor.

Definition at line 342 of file geometry.h.


Member Function Documentation

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

Assignment operator.

Definition at line 345 of file geometry.h.

double ogdf::DPolyline::length (  )  const

Returns the euclidean length of the polyline.

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:
fraction defines the fraction of lento be considered.
len is the given length, or the length of the polyline if len < 0.

void ogdf::DPolyline::writeGML ( const char *  filename  )  const

Writes the polyline as graph in gml-format to file filename.

Reimplemented in ogdf::DPolygon.

void ogdf::DPolyline::writeGML ( ostream &  stream  )  const

Writes the polyline as graph in gml-format to output stream stream.

Reimplemented in ogdf::DPolygon.

void ogdf::DPolyline::unify (  ) 

Deletes all successive points with equal coordinates.

Reimplemented in ogdf::DPolygon.

void ogdf::DPolyline::normalize (  ) 

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

Reimplemented in ogdf::DPolygon.

void ogdf::DPolyline::convertToInt (  ) 

Converts all coordinates rounded to s_prec decimal digits.


Member Data Documentation

const double ogdf::DPolyline::s_prec [static, private]

The conversion-precision.

Definition at line 336 of file geometry.h.


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

© 1999-2007 by oreas GmbH, © 2005-2007 by University Dortmund and University Cologne.

Generated on Thu Nov 22 19:40:07 2007 by doxygen 1.5.4.