 ## 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 l ( Point_3 p, Point_3 q); introduces a line l passing through the points p and q. Line l is directed from p to q. Line_3 l ( Point_3 p, Direction_3 d); introduces a line l passing through point p with direction d. Line_3 l ( Point_3 p, Vector_3 v); introduces a line l passing through point p and oriented by v. Line_3 l ( Segment_3 s); returns the line supporting the segment s, oriented from source to target. Line_3 l ( Ray_3 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 l.projection ( Point_3 p) returns the orthogonal projection of p on l. Point_3 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 p) returns true iff p lies on l.

### Miscellaneous

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