CGAL 4.6.2 - dD Geometry Kernel
|
#include <CGAL/Kernel_d/Line_d.h>
An instance of data type Line_d
is an oriented line in \( d\)-dimensional Euclidean space.
Implementation
Lines are implemented by a pair of points as an item type. All operations like creation, initialization, tests, direction calculation, input and output on a line \( l\) take time \( O(l.dimension())\). dimension()
, coordinate and point access, and identity test take constant time. The operations for intersection calculation also take time \( O(l.dimension())\). The space requirement is \( O(l.dimension())\).
Related Functions | |
(Note that these are not member functions.) | |
bool | weak_equality (const Line_d< Kernel > &l1, const Line_d< Kernel > &l2) |
Test for equality as unoriented lines. More... | |
bool | parallel (const Line_d< Kernel > &l1, const Line_d< Kernel > &l2) |
returns true if l1 and l2 are parallel as unoriented lines and false otherwise. More... | |
Types | |
typedef unspecified_type | LA |
the linear algebra layer. | |
Creation | |
Line_d () | |
introduces a variable l of type Line_d<Kernel> . | |
Line_d (Point_d< Kernel > p, Point_d< Kernel > q) | |
introduces a line through p and q and oriented from p to q . More... | |
Line_d (Point_d< Kernel > p, Direction_d< Kernel > dir) | |
introduces a line through p with direction dir . More... | |
Line_d (Segment_d< Kernel > s) | |
introduces a variable l of type Line_d<Kernel> and initializes it to the line through s.source() and s.target() with direction from s.source() to s.target() . More... | |
Line_d (Ray_d< Kernel > r) | |
introduces a variable l of type Line_d<Kernel> and initializes it to the line through r.point(1) and r.point(2) . | |
Operations | |
int | dimension () |
returns the dimension of the ambient space. | |
Point_d< Kernel > | point (int i) |
returns an arbitrary point on l . More... | |
Line_d< Kernel > | opposite () |
returns the line (point(2),point(1)) of opposite direction. | |
Direction_d< Kernel > | direction () |
returns the direction of l . | |
Line_d< Kernel > | transform (const Aff_transformation_d< Kernel > &t) |
returns \( t(l)\). More... | |
Line_d< Kernel > | operator+ (const Vector_d< Kernel > &v) |
returns l+v , i.e., l translated by vector \( v\). More... | |
Point_d< Kernel > | projection (const Point_d< Kernel > &p) |
returns the point of intersection of l with the hyperplane that is orthogonal to l and that contains p . More... | |
bool | has_on (const Point_d< Kernel > &p) |
returns true if \( p\) lies on l and false otherwise. More... | |
CGAL::Line_d< Kernel >::Line_d | ( | Point_d< Kernel > | p, |
Point_d< Kernel > | q | ||
) |
introduces a line through p
and q
and oriented from p
to q
.
CGAL::Line_d< Kernel >::Line_d | ( | Point_d< Kernel > | p, |
Direction_d< Kernel > | dir | ||
) |
introduces a line through p
with direction dir
.
p.dimension()==dir.dimension()
, dir
is not degenerate. CGAL::Line_d< Kernel >::Line_d | ( | Segment_d< Kernel > | s) |
bool CGAL::Line_d< Kernel >::has_on | ( | const Point_d< Kernel > & | p) |
returns true if \( p\) lies on l
and false otherwise.
l.dimension()==p.dimension()
. Line_d<Kernel> CGAL::Line_d< Kernel >::operator+ | ( | const Vector_d< Kernel > & | v) |
returns l+v
, i.e., l
translated by vector \( v\).
l.dimension()==v.dimension()
. Point_d<Kernel> CGAL::Line_d< Kernel >::point | ( | int | i) |
returns an arbitrary point on l
.
It holds that point(i) == point(j)
, iff i==j
. Furthermore, l
is directed from point(i)
to point(j)
, for all i < j
.
Point_d<Kernel> CGAL::Line_d< Kernel >::projection | ( | const Point_d< Kernel > & | p) |
returns the point of intersection of l
with the hyperplane that is orthogonal to l
and that contains p
.
l.dimension()==p.dimension()
. Line_d<Kernel> CGAL::Line_d< Kernel >::transform | ( | const Aff_transformation_d< Kernel > & | t) |
returns \( t(l)\).
l.dimension()==t.dimension()
.
|
related |
returns true if l1
and l2
are parallel as unoriented lines and false otherwise.
l1.dimension()==l2.dimension()
.