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.

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

double p.distance(const d3 point& q)<br />

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

and q.<br />

returns the Euclidean distance between p and q.<br />

int p.cmp distances(const d3 point& p1 , const d3 point& p2 )<br />

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

compares the distances of p1 and p2 to p and returns<br />

the result.<br />

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

along the normal direction.<br />

int p.intersection(const d3 point p1 , const d3 point p2 , d3 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, if l<br />

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

in p the result is 2.<br />

int p.intersection(const d3 plane& Q, d3 point& i1 , d3 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, if<br />

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

the result is 2.<br />

d3 plane<br />

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

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

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

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

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

d3 plane p + const vector& v returns p translated by vector v.<br />

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

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

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

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

returns p reflected across plane Q.<br />

returns p reflected across point q.<br />

returns q reflected across plane p.<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!