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.

16.10 Rational Lines in 3D-Space ( d3 rat line )<br />

1. Definition<br />

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

space.<br />

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

2. Creation<br />

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

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

through points p1 , p2 .<br />

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

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

supporting segment s.<br />

d3 rat line l;<br />

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

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

3. Operations<br />

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

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

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

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

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

d3 rat segment l.seg( ) returns a segment on l.<br />

bool l.project xy(rat line& m)<br />

bool l.project xz(rat line& m)<br />

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 />

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.

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

Saved successfully!

Ooh no, something went wrong!