next up previous contents index
Next: Integer Rectangles ( IRect Up: Simple Geometry Previous: Integer Line Segments (   Contents   Index


Integer Polylines ( IPolyline )

Baseclasses


\begin{picture}(6.5,2.5)
\thicklines
\put(0,1.5){\framebox (5,1){\bf list{\tt ...
...2){\vector(0,-1){1}}\put(1.5,0){\framebox (5,1){\bf IPolyline}}
\end{picture}

Definition

An instance ipl of type IPolyline is a list ip1,..., ipn of integer points ipi.

#include < AGD/IPolyline.h >

Creation

IPolyline ipl creates an instance ipl of type IPolyline initialized to an empty list.

Operations

IPoint& ipl.get_point(int i) returns a reference to ipi if ipl is ip1,..., ipn. Precondition: 1 < = i < = n

IPoint& ipl.get_rev_point(int i) returns a reference to ipn - i + 1 if ipl is ip1,..., ipn. Precondition: 1 < = i < = n

ISegment ipl.get_segment(int i) returns the integer segment [ipi, ipi + 1] if ipl is ip1,..., ipn. Precondition: 1 < = i < n

ISegment ipl.get_rev_segment(int i)
    returns the integer segment [ipn - i + 1, ipn - i] if ipl is ip1,..., ipn. Precondition: 1 < = i < n

void ipl.reverse() reverses the list of integer points.


next up previous contents index
Next: Integer Rectangles ( IRect Up: Simple Geometry Previous: Integer Line Segments (   Contents   Index

© Copyright 1998-2001, Algorithmic Solutions Software GmbH. All rights reserved.
2001-08-13