Navigation: Up, Table of Contents, Bibliography, Index, Title Page

## CGAL::Line_3<Kernel>

### Definition

An object l of the data type Line_3<Kernel> is a directed straight line in the three-dimensional Euclidean space 3.

### Creation

Line_3<Kernel> l ( Point_3<Kernel> p, Point_3<Kernel> q);
| introduces a line l passing through the points p and q. Line l is directed from p to q.
Line_3<Kernel> l ( Point_3<Kernel> p, Direction_3<Kernel> d);
| introduces a line l passing through point p with direction d.
Line_3<Kernel> l ( Point_3<Kernel> p, Vector_3<Kernel> v);
| introduces a line l passing through point p and oriented by v.
Line_3<Kernel> l ( Segment_3<Kernel> s);
| returns the line supporting the segment s, oriented from source to target.
Line_3<Kernel> l ( Ray_3<Kernel> r);
| returns the line supporting the ray r, with the same orientation.

### Operations

bool | l.operator== ( h)
|  | Test for equality: two lines are equal, iff they have a non empty intersection and the same direction.
bool | l.operator!= ( h)
|  | Test for inequality.
Point_3<Kernel> | l.projection ( Point_3<Kernel> p)
|  | returns the orthogonal projection of p on l.
Point_3<Kernel> | l.point ( int i) | returns an arbitrary point on l. It holds point(i) = point(j), iff i=j.

### Predicates

bool | l.is_degenerate () | returns true iff line l is degenerated to a point.
bool | l.has_on ( Point_3<Kernel> p)
|  | returns true iff p lies on l.

### Miscellaneous

Plane_3<Kernel> | l.perpendicular_plane ( Point_3<Kernel> p)
|  | returns the plane perpendicular to l passing through p.
Line_3<Kernel> | l.opposite () | returns the line with opposite direction.
Vector_3<Kernel> | l.to_vector () | returns a vector having the same direction as l.
Direction_3<Kernel>
| l.direction () | returns the direction of l.
Line_3<Kernel> | l.transform ( Aff_transformation_3<Kernel> t)
|  | returns the line obtained by applying t on a point on l and the direction of l.

### See Also

Kernel::Line_3

Next: Plane_3<Kernel>

Navigation: Table of Contents, Bibliography, Index, Title Page

The CGAL Project . Tue, December 21, 2004 .