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.

ool P.inside(const POINT & p)<br />

bool P.on boundary(const POINT & p)<br />

bool P.outside(const POINT & p)<br />

bool P.contains(const POINT & p)<br />

returns true if p lies to the left of P , i.e.,<br />

side of (p) == +1.<br />

returns true if p lies on P , i.e., side of (p)==<br />

0.<br />

returns true if p lies to the right of P , i.e.,<br />

side of (p) == −1.<br />

returns true if p lies to the left of or on P .<br />

RAT TYPE P.area( ) returns the signed area of the bounded region<br />

of P . <strong>The</strong> sign of the area is positive if<br />

the bounded region is the positive side of P .<br />

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

void<br />

P.bounding box(POINT& xmin, POINT & ymin, POINT & xmax,<br />

POINT& ymax)<br />

returns the coordinates of a rectangular<br />

bounding box of P .<br />

Iterations Macros<br />

forall vertices(v, P ) { “the vertices of P are successively assigned to rat point v” }<br />

forall segments(s, P ) { “the edges of P are successively assigned to rat segment s” }<br />

Non-Member Functions<br />

POLYGON<br />

reg n gon(int n, CIRCLE C, double epsilon)<br />

generates a (nearly) regular n-gon<br />

whose vertices lie on the circle<br />

C. <strong>The</strong> i-th point is generated by<br />

C.point of circle(2πi/n, epsilon). With<br />

the rational kernel the vertices of the n-gon<br />

are guaranteed to lie on the circle, with<br />

the floating point kernel they are only<br />

guaranteed to lie near C.

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

Saved successfully!

Ooh no, something went wrong!