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.

ational s.y abs( ) returns the y-abscissa of line(s), i.e., s.y proj(0).<br />

Precondition: s is not vertical.<br />

bool s.contains(const rat point& p)<br />

decides whether s contains p.<br />

bool s.intersection(const rat segment& t)<br />

decides whether s and t intersect.<br />

bool s.intersection(const rat segment& t, rat point& p)<br />

decides whether s and t intersect.<br />

intersection is assigned to p.<br />

If so, some point of<br />

bool<br />

s.intersection(const rat segment& t, rat segment& inter)<br />

decides whether s and t intersect. If so, the segment formed<br />

by the points of intersection is assigned to inter.<br />

bool s.intersection of lines(const rat segment& t, rat point& p)<br />

bool s.overlaps(const rat segment& t)<br />

decides if the lines supporting s and t intersect in a single<br />

point. If so, the point of intersection is assigned to p.<br />

Precondition: s and t are nontrivial.<br />

decides whether s and t overlap, i.e. they have a non-trivial<br />

intersection.<br />

rat segment s.translate(const rational& dx, const rational& dy)<br />

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

rat segment s.translate(const integer& dx, const integer& dy, const integer& dw)<br />

rat segment s.translate(const rat vector& v)<br />

rat segment s + const rat vector& v<br />

rat segment s − const rat vector& v<br />

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

returns s + v, i.e., s translated by vector v.<br />

Precondition: v.dim() = 2.<br />

returns s translated by vector v.<br />

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

rat segment s.rotate90(const rat point& q, int i = 1)<br />

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

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

clockwise.

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

Saved successfully!

Ooh no, something went wrong!