An instance of data type Point_d<Kernel> is a point of Euclidean space in dimension . A point in -dimensional space can be represented by homogeneous coordinates of number type RT such that , which is of type FT. The homogenizing coordinate is positive.
We call , the -th Cartesian coordinate and , , the -th homogeneous coordinate. We call the dimension of the point.
| |||||
introduces a variable p of
type Point_d<Kernel>.
| |||||
| |||||
introduces a variable
p of type Point_d<Kernel> in -dimensional space,
initialized to the origin.
| |||||
| |||||
| |||||
introduces a variable
p of type Point_d<Kernel> in dimension d. If size [first,last) == d this creates a point with Cartesian coordinates
set [first,last). If size [first,last) == d+1 the range
specifies the homogeneous coordinates where the sign chosen is the
sign of .
| |||||
| |||||
| |||||
introduces a
variable p of type Point_d<Kernel> in dimension d
initialized to the point with homogeneous coordinates as defined by
H = set [first,last) and D: . The sign
chosen is the sign of .
| |||||
| |||||
introduces a variable
p of type Point_d<Kernel> in -dimensional space.
| |||||
| |||||
introduces a
variable p of type Point_d<Kernel> in -dimensional
space.
|
|
| returns the dimension of p. | ||
|
|
returns the -th Cartesian
coordinate of p.
| ||
|
|
returns the -th Cartesian
coordinate of p.
| ||
|
|
returns the -th homogeneous
coordinate of p.
| ||
|
| returns an iterator pointing to the zeroth Cartesian coordinate of p. | ||
|
| returns an iterator pointing beyond the last Cartesian coordinate of p. | ||
|
| returns an iterator pointing to the zeroth homogeneous coordinate of p. | ||
|
| returns an iterator pointing beyond the last homogeneous coordinate of p. | ||
|
| |||
returns . |
|
| returns the vector . | ||
|
|
returns .
| ||
|
|
returns .
| ||
|
|
returns .
| ||
|
|
adds v
to p.
| ||
|
|
subtracts
v from p.
| ||
|
| returns true if p is the origin. |
Points are implemented by arrays of RT items. All operations like creation, initialization, tests, point - vector arithmetic, input and output on a point take time . dimension(), coordinate access and conversions take constant time. The space requirement for points is .