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.

16.4 Straight Lines in 3D-Space ( d3 line )<br />

1. Definition<br />

An instance l of the data type d3 line is a directed straight line in three-dimensional<br />

space.<br />

#include < <strong>LEDA</strong>/geo/d3 line.h ><br />

2. Creation<br />

d3 line l(const d3 point& p1 , const d3 point& p2 );<br />

d3 line l(const d3 segment& s);<br />

introduces a variable l of type d3 line. l is initialized to the line<br />

through points p1 , p2 .<br />

Precondition : p1 != p2 .<br />

introduces a variable l of type d3 line. l is initialized to the line<br />

supporting segment s.<br />

Precondition : s is not trivial.<br />

d3 line l;<br />

introduces a variable l of type d3 line. l is initialized to the line<br />

through points (0, 0, 0) and (1, 0, 0).<br />

3. Operations<br />

bool l.contains(const d3 point& p)<br />

returns true if p lies on l.<br />

d3 point l.point1( ) returns a point on l.<br />

d3 point l.point2( ) returns a second point on l.<br />

d3 segment l.seg( ) returns a non-trivial segment on l with the same direction.<br />

bool<br />

bool<br />

bool<br />

l.project xy(line& m) if the projection of l into the xy plane is not a point,<br />

the function returns true and assignes the projection<br />

to m. Otherwise false is returned.<br />

l.project xz(line& m) if the projection of l into the xz plane is not a point,<br />

the function returns true and assignes the projection<br />

to m. Otherwise false is returned.<br />

l.project yz(line& m) if the projection of l into the yz plane is not a point,<br />

the function returns true and assignes the projection<br />

to m. Otherwise false is returned.

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

Saved successfully!

Ooh no, something went wrong!