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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

int P.side of(const POINT & p)<br />

region kind P.region of(const POINT & p)<br />

bool 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 +1 if p lies to the left of P , 0 if p lies<br />

on P , and −1 if p lies to the right of P .<br />

returns BOUNDED REGION if p lies<br />

in the bounded region of P , returns<br />

ON REGION if p lies on P , and returns<br />

UNBOUNDED REGION if p lies in the unbounded<br />

region. <strong>The</strong> bounded region of the<br />

full polygon is the entire plane.<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 />

Precondition: P is not the full polygon.<br />

All binary boolean operations are regularized, i.e., the result R of the standard boolean<br />

operation is replaced by the interior of the closure of R. We use reg X to denote the<br />

regularization of a set X.<br />

GEN POLYGON P.unite(const GEN POLYGON & Q)<br />

returns reg(P ∪ Q).<br />

GEN POLYGON P.intersection(const GEN POLYGON & Q)<br />

returns reg(P ∩ Q).<br />

GEN POLYGON P.diff(const GEN POLYGON & Q)<br />

returns reg(P \ Q).<br />

GEN POLYGON P.sym diff(const GEN POLYGON & Q)<br />

returns reg((P ∪ Q) − (P ∩ Q)).

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

Saved successfully!

Ooh no, something went wrong!