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.

d3 plane p.to float( ) returns a floating point approximation of p.<br />

rational p.sqr dist(const d3 rat point& q)<br />

rat vector p.normal project(const d3 rat point& q)<br />

returns the square of the Euclidean distance between p<br />

and q.<br />

returns the vector pointing from q to its projection on<br />

p along the normal direction.<br />

int p.intersection(const d3 rat point p1 , const d3 rat point p2 ,<br />

d3 rat point& q)<br />

if the line l through p1 and p2 intersects p in a single<br />

point this point is assigned to q and the result is 1,<br />

if l and p do not intersect the result is 0, and if l is<br />

contained in p the result is 2.<br />

int p.intersection(const d3 rat plane& Q, d3 rat point& i1 , d3 rat point& i2 )<br />

if p and plane Q intersect in a line L then (i1, i2) are<br />

assigned two different points on L and the result is 1,<br />

if p and Q do not intersect the result is 0, and if p = Q<br />

the result is 2.<br />

d3 rat plane<br />

d3 rat plane<br />

p.translate(const rational& dx, const rational& dy, const rational& dz)<br />

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

p.translate(integer dx, integer dy, integer dz, integer dw)<br />

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

d3 rat plane p.translate(const rat vector& v)<br />

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

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

d3 rat plane<br />

p + const rat vector& v<br />

returns p translated by vector v.<br />

d3 rat plane p.reflect(const d3 rat plane& Q)<br />

returns p reflected across plane Q.<br />

d3 rat plane p.reflect(const d3 rat point& q)<br />

returns p reflected across point q.<br />

d3 rat point p.reflect point(const d3 rat point& q)<br />

returns q reflected across plane p.<br />

int p.side of(const d3 rat point& q)<br />

computes the side of p on which q lies.

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

Saved successfully!

Ooh no, something went wrong!