31.01.2014 Views

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

const list& P.segments( )<br />

returns the sequence of bounding segments<br />

of P in counterclockwise ordering.<br />

list P.intersection(const SEGMENT & s)<br />

list P.intersection(const LINE& l)<br />

POLYGON P.intersect halfplane(const LINE& l)<br />

int P.size( ) returns the size of P .<br />

returns the proper crossings between P and<br />

s as a list of points.<br />

returns the proper crossings between P and<br />

l as a list of points.<br />

returns the intersection of P with the halfspace<br />

on the positive side of l.<br />

bool P.empty( ) returns true if P is empty, false otherwise.<br />

POLYGON<br />

POLYGON<br />

P.translate(RAT TYPE dx, RAT TYPE dy)<br />

returns P translated by vector (dx, dy).<br />

P.translate(INT TYPE dx, INT TYPE dy, INT TYPE dw)<br />

returns P translated by vector<br />

(dx/dw, dy/dw).<br />

POLYGON P.translate(const VECTOR& v)<br />

returns P translated by vector v.<br />

POLYGON P + const VECTOR& v returns P translated by vector v.<br />

POLYGON<br />

P − const VECTOR& v returns P translated by vector −v.<br />

POLYGON P.rotate90(const POINT & q, int i = 1)<br />

POLYGON P.reflect(const POINT & p, const POINT & q)<br />

POLYGON P.reflect(const POINT & p)<br />

RAT TYPE P.sqr dist(const POINT & p)<br />

returns P rotated about q by an angle of i ×<br />

90 degrees. If i > 0 the rotation is counterclockwise<br />

otherwise it is clockwise.<br />

returns P reflected across the straight line<br />

passing through p and q.<br />

returns P reflected across point p.<br />

returns the square of the minimal Euclidean<br />

distance between a segment in P and p. Returns<br />

zero if P is empty.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!