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.

CHECK TYPE P.check simplicity( )<br />

checks P for simplicity. <strong>The</strong> result can be SIMPLE,<br />

WEAKLY SIMPLE or NOT WEAKLY SIMPLE.<br />

bool P.is convex( ) returns true iff P is convex.<br />

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

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

list P.vertices( ) returns the vertices of P .<br />

list P.intersection(const r circle segment& s)<br />

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

r circle polygon P.intersection halfplane(const rat line& l)<br />

r circle polygon P.translate(rational dx, rational dy)<br />

r circle polygon P.translate(const rat vector& v)<br />

r circle polygon P + const rat vector& v<br />

r circle polygon P − const rat vector& v<br />

returns a chain of segments that bound P . <strong>The</strong> orientation<br />

of the chain corresponds to the orientation of<br />

P .<br />

returns the list of all proper intersections between s<br />

and the boundary of P .<br />

returns the list of all proper intersections between l<br />

and the boundary of P .<br />

clips P against the halfplane on the positive side of<br />

l. Observe that the result is only guaranteed to be<br />

weakly simple if P is convex.<br />

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

returns P translated by vector v.<br />

returns P translated by vector v.<br />

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

r circle polygon P.rotate90(const rat point& q, int i = 1)<br />

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

If i > 0 the rotation is counter-clockwise otherwise it<br />

is clockwise.<br />

r circle polygon P.reflect(const rat point& p, const rat point& q)<br />

returns P reflected across the straight line passing<br />

through p and q.

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

Saved successfully!

Ooh no, something went wrong!