An instance of data type Line_d is an oriented line in d-dimensional Euclidean space.
Line_d<Kernel>::LA | |
the linear algebra layer.
|
Line_d<Kernel> l; | |||
introduces a variable l of
type Line_d<Kernel>.
| |||
Line_d<Kernel> l ( Point_d<Kernel> p, Point_d<Kernel> q); | |||
introduces a
line through p and q and oriented from p to
q.
| |||
Line_d<Kernel> l ( Point_d<Kernel> p, Direction_d<Kernel> dir); | |||
introduces
a line through p with direction dir.
| |||
Line_d<Kernel> l ( 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().
| |||
Line_d<Kernel> l ( 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).
|
int | l.dimension () | returns the dimension of the ambient space. | ||
Point_d<Kernel> | l.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. | ||
Line_d<Kernel> | l.opposite () | returns the line (point(2),point(1)) of opposite direction. | ||
Direction_d<Kernel> | l.direction () | returns the direction of l. | ||
Line_d<Kernel> | l.transform ( Aff_transformation_d<Kernel> t) | |||
returns t(l).
| ||||
Line_d<Kernel> | l + Vector_d<Kernel> v |
returns
l+v, i.e., l translated by vector v.
| ||
Point_d<Kernel> | l.projection ( Point_d<Kernel> p) | |||
returns the
point of intersection of l with the hyperplane that is
orthogonal to l and that contains p.
| ||||
bool | l.has_on ( Point_d<Kernel> p) |
returns true if p lies
on l and false otherwise.
|
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()).