\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.7 - 2D and 3D Linear Geometry Kernel
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
CGAL::Line_3< Kernel > Class Template Reference

#include <CGAL/Line_3.h>

Definition

An object l of the data type Line_3 is a directed straight line in the three-dimensional Euclidean space \( \E^3\).

See also
Kernel::Line_3

Creation

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

Operations

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

Predicates

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

Miscellaneous

Plane_3< Kernelperpendicular_plane (const Point_3< Kernel > &p) const
 returns the plane perpendicular to l passing through p. More...
 
Line_3< Kernelopposite () const
 returns the line with opposite direction. More...
 
Vector_3< Kernelto_vector () const
 returns a vector having the same direction as l. More...
 
Direction_3< Kerneldirection () const
 returns the direction of l. More...
 
Line_3< Kerneltransform (const Aff_transformation_3< Kernel > &t) const
 returns the line obtained by applying t on a point on l and the direction of l. More...
 

Constructor & Destructor Documentation

template<typename Kernel >
CGAL::Line_3< Kernel >::Line_3 ( const Point_3< Kernel > &  p,
const Point_3< Kernel > &  q 
)

introduces a line l passing through the points p and q.

Line l is directed from p to q.

template<typename Kernel >
CGAL::Line_3< Kernel >::Line_3 ( const Point_3< Kernel > &  p,
const Direction_3< Kernel > &  d 
)

introduces a line l passing through point p with direction d.

template<typename Kernel >
CGAL::Line_3< Kernel >::Line_3 ( const Point_3< Kernel > &  p,
const Vector_3< Kernel > &  v 
)

introduces a line l passing through point p and oriented by v.

template<typename Kernel >
CGAL::Line_3< Kernel >::Line_3 ( const Segment_3< Kernel > &  s)

returns the line supporting the segment s, oriented from source to target.

template<typename Kernel >
CGAL::Line_3< Kernel >::Line_3 ( const Ray_3< Kernel > &  r)

returns the line supporting the ray r, with the same orientation.

Member Function Documentation

template<typename Kernel >
Direction_3<Kernel> CGAL::Line_3< Kernel >::direction ( ) const

returns the direction of l.

template<typename Kernel >
bool CGAL::Line_3< Kernel >::has_on ( const Point_3< Kernel > &  p) const

returns true iff p lies on l.

template<typename Kernel >
bool CGAL::Line_3< Kernel >::is_degenerate ( ) const

returns true iff line l is degenerated to a point.

template<typename Kernel >
bool CGAL::Line_3< Kernel >::operator!= ( const Line_3< Kernel > &  h) const

Test for inequality.

template<typename Kernel >
bool CGAL::Line_3< Kernel >::operator== ( const Line_3< Kernel > &  h) const

Test for equality: two lines are equal, iff they have a non empty intersection and the same direction.

template<typename Kernel >
Line_3<Kernel> CGAL::Line_3< Kernel >::opposite ( ) const

returns the line with opposite direction.

template<typename Kernel >
Plane_3<Kernel> CGAL::Line_3< Kernel >::perpendicular_plane ( const Point_3< Kernel > &  p) const

returns the plane perpendicular to l passing through p.

template<typename Kernel >
Point_3<Kernel> CGAL::Line_3< Kernel >::point ( int  i) const

returns an arbitrary point on l.

It holds point(i) = point(j), iff i=j.

template<typename Kernel >
Point_3<Kernel> CGAL::Line_3< Kernel >::projection ( const Point_3< Kernel > &  p) const

returns the orthogonal projection of p on l.

template<typename Kernel >
Vector_3<Kernel> CGAL::Line_3< Kernel >::to_vector ( ) const

returns a vector having the same direction as l.

template<typename Kernel >
Line_3<Kernel> CGAL::Line_3< Kernel >::transform ( const Aff_transformation_3< Kernel > &  t) const

returns the line obtained by applying t on a point on l and the direction of l.