#include <geometry.h>

Public Member Functions | |
| DPolyline () | |
| Creates an empty integer polyline. | |
| DPolyline (const DPolyline &dpl) | |
| Copy constructor. | |
| DPolyline & | operator= (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. | |
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.
| ogdf::DPolyline::DPolyline | ( | ) | [inline] |
| ogdf::DPolyline::DPolyline | ( | const DPolyline & | dpl | ) | [inline] |
| 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.
| 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 |
| 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 | ( | ) |
| 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.
const double ogdf::DPolyline::s_prec [static, private] |