diff --git a/.gitattributes b/.gitattributes index 78ff83d4b0b..1532975cf14 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2374,6 +2374,74 @@ Jet_fitting_3/doc_tex/Jet_fitting_3_ref/Eigen_svd.tex -text Jet_fitting_3/doc_tex/Jet_fitting_3_ref/template_dependence.jpg -text svneol=unset#image/jpeg Jet_fitting_3/doc_tex/Jet_fitting_3_ref/template_dependence.pdf -text svneol=unset#application/pdf Jet_fitting_3/examples/Jet_fitting_3/data/ellipe0.003.off -text svneol=unset#application/octet-stream +Kernel_23/doc/Kernel_23/CGAL/Aff_transformation_2.h -text +Kernel_23/doc/Kernel_23/CGAL/Aff_transformation_3.h -text +Kernel_23/doc/Kernel_23/CGAL/Bbox_2.h -text +Kernel_23/doc/Kernel_23/CGAL/Bbox_3.h -text +Kernel_23/doc/Kernel_23/CGAL/Cartesian.h -text +Kernel_23/doc/Kernel_23/CGAL/Cartesian_converter.h -text +Kernel_23/doc/Kernel_23/CGAL/Circle_2.h -text +Kernel_23/doc/Kernel_23/CGAL/Circle_3.h -text +Kernel_23/doc/Kernel_23/CGAL/Dimension.h -text +Kernel_23/doc/Kernel_23/CGAL/Direction_2.h -text +Kernel_23/doc/Kernel_23/CGAL/Direction_3.h -text +Kernel_23/doc/Kernel_23/CGAL/Exact_predicates_exact_constructions_kernel.h -text +Kernel_23/doc/Kernel_23/CGAL/Exact_predicates_exact_constructions_kernel_with_sqrt.h -text +Kernel_23/doc/Kernel_23/CGAL/Exact_predicates_inexact_constructions_kernel.h -text +Kernel_23/doc/Kernel_23/CGAL/Filtered_kernel.h -text +Kernel_23/doc/Kernel_23/CGAL/Filtered_predicate.h -text +Kernel_23/doc/Kernel_23/CGAL/Homogeneous.h -text +Kernel_23/doc/Kernel_23/CGAL/Homogeneous_converter.h -text +Kernel_23/doc/Kernel_23/CGAL/Iso_cuboid_3.h -text +Kernel_23/doc/Kernel_23/CGAL/Iso_rectangle_2.h -text +Kernel_23/doc/Kernel_23/CGAL/Kernel_traits.h -text +Kernel_23/doc/Kernel_23/CGAL/Line_2.h -text +Kernel_23/doc/Kernel_23/CGAL/Line_3.h -text +Kernel_23/doc/Kernel_23/CGAL/Origin.h -text +Kernel_23/doc/Kernel_23/CGAL/Plane_3.h -text +Kernel_23/doc/Kernel_23/CGAL/Point_2.h -text +Kernel_23/doc/Kernel_23/CGAL/Point_3.h -text +Kernel_23/doc/Kernel_23/CGAL/Projection_traits_xy_3.h -text +Kernel_23/doc/Kernel_23/CGAL/Ray_2.h -text +Kernel_23/doc/Kernel_23/CGAL/Ray_3.h -text +Kernel_23/doc/Kernel_23/CGAL/Segment_2.h -text +Kernel_23/doc/Kernel_23/CGAL/Segment_3.h -text +Kernel_23/doc/Kernel_23/CGAL/Simple_cartesian.h -text +Kernel_23/doc/Kernel_23/CGAL/Simple_homogeneous.h -text +Kernel_23/doc/Kernel_23/CGAL/Sphere_3.h -text +Kernel_23/doc/Kernel_23/CGAL/Tetrahedron_3.h -text +Kernel_23/doc/Kernel_23/CGAL/Triangle_2.h -text +Kernel_23/doc/Kernel_23/CGAL/Triangle_3.h -text +Kernel_23/doc/Kernel_23/CGAL/Vector_2.h -text +Kernel_23/doc/Kernel_23/CGAL/Vector_3.h -text +Kernel_23/doc/Kernel_23/CGAL/aff_transformation_tags.h -text +Kernel_23/doc/Kernel_23/CGAL/cartesian_homogeneous_conversion.h -text +Kernel_23/doc/Kernel_23/CGAL/enum.h -text +Kernel_23/doc/Kernel_23/CGAL/global_functions.h -text +Kernel_23/doc/Kernel_23/CGAL/intersections.h -text +Kernel_23/doc/Kernel_23/CGAL/rational_rotation.h -text +Kernel_23/doc/Kernel_23/CGAL/squared_distance_2.h -text +Kernel_23/doc/Kernel_23/CGAL/squared_distance_3.h -text +Kernel_23/doc/Kernel_23/Concepts/Kernel.h -text +Kernel_23/doc/Kernel_23/Kernel_23.txt -text +Kernel_23/doc/Kernel_23/PackageDescription.txt -text +Kernel_23/doc/Kernel_23/fig/IsoCuboid.gif -text svneol=unset#image/gif +Kernel_23/doc/Kernel_23/fig/IsoCuboid.pdf -text svneol=unset#application/pdf +Kernel_23/doc/Kernel_23/fig/arrlinthree.gif -text svneol=unset#image/gif +Kernel_23/doc/Kernel_23/fig/arrlintwo.gif -text svneol=unset#image/gif +Kernel_23/doc/Kernel_23/fig/arrthree.gif -text svneol=unset#image/gif +Kernel_23/doc/Kernel_23/fig/arrthree2.gif -text svneol=unset#image/gif +Kernel_23/doc/Kernel_23/fig/arrtwo.gif -text svneol=unset#image/gif +Kernel_23/doc/Kernel_23/fig/arrtwo2.gif -text svneol=unset#image/gif +Kernel_23/doc/Kernel_23/fig/compare1.gif -text svneol=unset#image/gif +Kernel_23/doc/Kernel_23/fig/compare1.pdf -text svneol=unset#application/pdf +Kernel_23/doc/Kernel_23/fig/compare2.gif -text svneol=unset#image/gif +Kernel_23/doc/Kernel_23/fig/compare2.pdf -text svneol=unset#application/pdf +Kernel_23/doc/Kernel_23/fig/compare_x_at_y.gif -text svneol=unset#image/gif +Kernel_23/doc/Kernel_23/fig/compare_x_at_y.pdf -text svneol=unset#application/pdf +Kernel_23/doc/Kernel_23/fig/pointSegmentTriangle.png -text svneol=unset#image/png +Kernel_23/doc/Kernel_23/fig/transvecthree.gif -text svneol=unset#image/gif +Kernel_23/doc/Kernel_23/fig/transvectwo.gif -text svneol=unset#image/gif Kernel_23/doc_tex/Kernel_23/fig/pointSegmentTriangle.png -text Kernel_23/doc_tex/Kernel_23_ref/Kernel_ConstructRadicalLine_2.tex -text Kernel_23/doc_tex/Kernel_23_ref/compare_lexicographically.tex -text diff --git a/Kernel_23/doc/Kernel_23/CGAL/Aff_transformation_2.h b/Kernel_23/doc/Kernel_23/CGAL/Aff_transformation_2.h new file mode 100644 index 00000000000..258234b0fb0 --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/Aff_transformation_2.h @@ -0,0 +1,290 @@ +namespace CGAL { + +/*! +\ingroup PkgKernel23 + +The class `Aff_transformation_2` represents two-dimensional affine transformations. +The general form of an affine transformation is based on a homogeneous +representation of points. Thereby all transformations can be realized by +matrix multiplications. + +Multiplying the transformation matrix by a scalar does not change the +represented transformation. Therefore, any transformation represented +by a matrix with rational entries can be represented by a +transformation matrix with integer entries as well. (Multiply the +matrix with the common denominator of the rational entries.) Hence, it +is sufficient to use the number type `Kernel::RT` to represent +the entries of the transformation matrix. + +\cgal offers several specialized affine transformations. Different +constructors are provided to create them. They are parameterized with +a symbolic name to denote the transformation type, followed by +additional parameters. The symbolic name tags solve ambiguities in the +function overloading and they make the code more readable, i.e., what +type of transformation is created. + +Since two-dimensional points have three homogeneous coordinates, we +have a \f$ 3\times 3\f$ matrix \f$ {(m_{ij})}_{i,\,j=0\ldots 2}\f$. + +If the homogeneous representations are normalized (the homogenizing +coordinate is 1), then the upper left \f$ 2\times 2\f$ matrix realizes +linear transformations. In the matrix form of a translation, the +translation vector \f$ (v_0,\,v_1,\,1)\f$ appears in the last column of the +matrix. The entries \f$ m_{20}\f$ and \f$ m_{21}\f$ are always zero and +therefore do not appear in the constructors. + +\sa `Identity_transformation` +\sa `Rotation` +\sa `Scaling` +\sa `Translation` +\sa `rational_rotation_approximation` + +Example +-------------- + +\code +typedef Cartesian K; +typedef Aff_transformation_2 Transformation; +typedef Point_2 Point; +typedef Vector_2 Vector; +typedef Direction_2 Direction; + +Transformation rotate(ROTATION, sin(pi), cos(pi)); +Transformation rational_rotate(ROTATION,Direction(1,1), 1, 100); +Transformation translate(TRANSLATION, Vector(-2, 0)); +Transformation scale(SCALING, 3); + +Point q(0, 1); +q = rational_rotate(q); + +Point p(1, 1); + +p = rotate(p); + +p = translate(p); + +p = scale(p); +\endcode + +The same would have been achieved with + +\code +Transformation transform = scale * (translate * rotate); +p = transform(Point(1.0, 1.0)); +\endcode + +\sa `CGAL::Aff_transformation_3` +\sa `CGAL::Identity_transformation` +\sa `CGAL::Reflection` +\sa `CGAL::Rotation` +\sa `CGAL::Scaling` +\sa `CGAL::Translation` + +*/ +template< typename Kernel > +class Aff_transformation_2 { +public: + +/// \name Creation +/// @{ + +/*! +introduces an identity transformation. +*/ +Aff_transformation_2(const Identity_transformation& ); + +/*! +introduces a translation by a vector \f$ v\f$. +*/ +Aff_transformation_2(const Translation, +const Vector_2 &v); + +/*! +approximates the rotation over the angle indicated by direction +\f$ d\f$, such that the differences between the sines and cosines +of the rotation given by d and the approximating rotation +are at most \f$ num/den\f$ each. +\pre \f$ num/den>0\f$ and \f$ d != 0\f$. +*/ +Aff_transformation_2(const Rotation, +const Direction_2 &d, +const Kernel::RT &num, +const Kernel::RT &den = RT(1)); + +/*! +introduces a rotation by the angle `rho`. +\pre \f$ sine\_rho^2 + cosine\_rho^2 == hw^2\f$. +*/ +Aff_transformation_2(const Rotation, +const Kernel::RT &sine_rho, +const Kernel::RT &cosine_rho, +const Kernel::RT &hw = RT(1)); + +/*! +introduces a scaling by a scale factor \f$ s/hw\f$. +*/ +Aff_transformation_2(const Scaling, +const Kernel::RT &s, +const Kernel::RT &hw = RT(1)); + +/*! +introduces a general affine transformation in the +\f$3 \times 3\f$ matrix form +\f$ +\small \mbox{\( \left(\begin{array}{ccc} + m_{00} & m_{01} & m_{02}\\ + m_{10} & m_{11} & m_{12}\\ + 0 & 0 & hw + \end{array}\right) \)} +\f$. + +The sub-matrix +\f$1\over hw\f$ \f$\small \mbox{\( \left(\begin{array}{cc} + m_{00} & m_{01}\\ + m_{10} & m_{11} + \end{array}\right) \) } +\f$ contains the scaling and rotation +information, the vector +\f$ \small + \left( + \begin{array}{c} + m_{02}\\ + m_{12} + \end{array} + \right) +\f$ +contains the translational part of the transformation. +*/ +Aff_transformation_2( +const Kernel::RT &m00, const Kernel::RT &m01, const Kernel::RT &m02, +const Kernel::RT &m10, const Kernel::RT &m11, const Kernel::RT &m12, +const Kernel::RT &hw = RT(1)); + +/*! +introduces a general linear transformation +\f$\small \mbox{\(\left(\begin{array}{ccc} + m_{00} & m_{01} & 0\\ + m_{10} & m_{11} & 0\\ + 0 & 0 & hw + \end{array}\right)\)}\f$ + +i.e.\ there is no translational part. +*/ +Aff_transformation_2( +const Kernel::RT &m00, const Kernel::RT &m01, +const Kernel::RT &m10, const Kernel::RT &m11, +const Kernel::RT &hw = RT(1)); + +/// @} + +/*! +\name Operations + +The main thing to do with transformations is to apply them on +geometric objects. Each class `Class_2` representing a +geometric object has a member function: +\code +Class_2 transform(Aff_transformation_2 t)`. +\endcode + +The transformation classes provide a member function `transform()` for +points, vectors, directions, and lines. The same functionality is also +available through `operator()` overloads. +/// @{ + +/*! + +*/ +Point_2 transform(const Point_2 &p) const; + +/*! + +*/ +Vector_2 transform(const Vector_2 &p) const; + +/*! + +*/ +Direction_2 transform(const Direction_2 &p) const; + +/*! + +*/ +Line_2 transform(const Line_2 &p) const; + +/*! + +*/ +Point_2 operator()(const Point_2 &p) const; + +/*! + +*/ +Vector_2 operator()(const Vector_2 &p) const; + +/*! + +*/ +Direction_2 operator()(const Direction_2 &p) const; + +/*! + +*/ +Line_2 operator()(const Line_2 &p) const; + +/// @} + +/// \name Miscellaneous +/// @{ + +/*! +composes two affine transformations. +*/ +Aff_transformation_2 operator*(const Aff_transformation_2 &s) const; + +/*! +gives the inverse transformation. +*/ +Aff_transformation_2 inverse() const; + +/*! +returns `true`, if the transformation is not reflecting, +i.e. the determinant of the involved linear transformation is +non-negative. +*/ +bool is_even() const; + +/*! +returns `true`, if the transformation is reflecting. +*/ +bool is_odd() const; + +/// @} + +/// \name Matrix Entry Access +/// @{ + +/*! + +*/ +Kernel::FT cartesian(int i, int j) const; + +/*! +returns entry \f$ m_{ij}\f$ in a matrix representation in which \f$ m_{22}\f$ is 1. +*/ +Kernel::FT m(int i, int j) const; + +/*! + +*/ +Kernel::RT homogeneous(int i, int j) const; + +/*! +returns entry \f$ m_{ij}\f$ in some fixed matrix representation. +*/ +Kernel::RT hm(int i, int j) const; + +/// @} + +}; /* end Aff_transformation_2 */ +} /* end namespace CGAL */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Aff_transformation_3.h b/Kernel_23/doc/Kernel_23/CGAL/Aff_transformation_3.h new file mode 100644 index 00000000000..2b4fa3159ca --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/Aff_transformation_3.h @@ -0,0 +1,222 @@ +namespace CGAL { + +/*! +\ingroup PkgKernel23 + +The class `Aff_transformation_3` represents three-dimensional affine transformations. +The general form of an affine transformation is based on a homogeneous +representation of points. Thereby all transformations can be realized by +matrix multiplication. + +Multiplying the transformation matrix by a scalar does not change the +represented transformation. Therefore, any transformation represented +by a matrix with rational entries can be represented by a +transformation matrix with integer entries as well. (Multiply the +matrix with the common denominator of the rational entries.) Hence, it +is sufficient to use the number type `Kernel::RT` to represent +the entries of the transformation matrix. + +\cgal offers several specialized affine transformations. Different +constructors are provided to create them. They are parameterized with +a symbolic name to denote the transformation type, followed by +additional parameters. The symbolic name tags solve ambiguities in the +function overloading and they make the code more readable, i.e., what +type of transformation is created. + +In three-dimensional space we have a \f$ 4\times 4\f$ matrix +\f$ {(m_{ij})}_{i,\,j=0\ldots 3}\f$. Entries \f$ m_{30}\f$, \f$ m_{31}\f$, and +\f$ m_{32}\f$ are always zero and therefore do not appear in the +constructors. + +\sa `CGAL::Aff_transformation_2` +\sa `CGAL::Identity_transformation` +\sa `CGAL::Reflection` +\sa `CGAL::Rotation` +\sa `CGAL::Scaling` +\sa `CGAL::Translation` + +*/ +template< typename Kernel > +class Aff_transformation_3 { +public: + +/// \name Creation +/// @{ + +/*! +introduces an identity transformation. +*/ +Aff_transformation_3(const Identity_transformation& ); + +/*! +introduces a translation by a vector \f$ v\f$. +*/ +Aff_transformation_3(const Translation, +const Vector_3 &v); + +/*! +introduces a scaling by a scale factor \f$ s/hw\f$. +*/ +Aff_transformation_3(const Scaling, +const Kernel::RT &s, +const Kernel::RT &hw = RT(1)); + +/*! +introduces a general affine transformation of the matrix +form +\f$ +\small \mbox{\(\left(\begin{array}{cccc} + m_{00} & m_{01} & m_{02} & m_{03}\\ + m_{10} & m_{11} & m_{12} & m_{13}\\ + m_{20} & m_{21} & m_{22} & m_{23}\\ + 0 & 0 & 0 & hw + \end{array}\right)\)} +\f$. + +The part \f$1\over hw\f$ \f$ \small \mbox{\(\left(\begin{array}{ccc} + m_{00} & m_{01} & m_{02}\\ + m_{10} & m_{11} & m_{12}\\ + m_{20} & m_{21} & m_{22}\\ + \end{array}\right)\)} \f$ defines the scaling +and rotational part of the transformation, +while the vector \f$1\over hw\f$ \f$\small \mbox{\(\left(\begin{array}{c} + m_{03}\\ + m_{13}\\ + m_{23} + \end{array}\right)\)}\f$ contains the translational part. +*/ +Aff_transformation_3( +const Kernel::RT &m00, const Kernel::RT &m01, const Kernel::RT &m02, const Kernel::RT &m03, +const Kernel::RT &m10, const Kernel::RT &m11, const Kernel::RT &m12, const Kernel::RT &m13, +const Kernel::RT &m20, const Kernel::RT &m21, const Kernel::RT &m22, const Kernel::RT &m23, +const Kernel::RT &hw = RT(1)); + +/*! +introduces a general linear transformation of the +matrix form \f$ +\small \mbox{\(\left(\begin{array}{cccc} + m_{00} & m_{01} & m_{02} & 0\\ + m_{10} & m_{11} & m_{12} & 0\\ + m_{20} & m_{21} & m_{22} & 0\\ + 0 & 0 & 0 & hw + \end{array}\right)\)} +\f$, i.e.\ an affine transformation without translational part. +*/ +Aff_transformation_3( +const Kernel::RT &m00, const Kernel::RT &m01, const Kernel::RT& m02, +const Kernel::RT &m10, const Kernel::RT &m11, const Kernel::RT& m12, +const Kernel::RT &m20, const Kernel::RT &m21, const Kernel::RT& m22, +const Kernel::RT &hw = RT(1)); + +/// @} + +/*! +\name Operations + +The main thing to do with transformations is to apply them on +geometric objects. Each class `Class_2` representing a +geometric object has a member function: + +\code +Class_3 transform(Aff_transformation_3 t) +\endcode + +The transformation classes provide a member function `transform()` for +points, vectors, directions, and planes. The same functionality is also +available through `operator()` overloads. +*/ +/// @{ + +/*! + +*/ +Point_3 transform(const Point_3 &p) const; + +/*! + +*/ +Vector_3 transform(const Vector_3 &p) const; + +/*! + +*/ +Direction_3 transform(const Direction_3 &p) const; + +/*! + +*/ +Plane_3 transform(const Plane_3 &p) const; + +/*! + +*/ +Point_3 operator()(const Point_3 &p) const; + +/*! + +*/ +Vector_3 operator()(const Vector_3 &p) const; + +/*! + +*/ +Direction_3 operator()(const Direction_3 &p) const; + +/*! + +*/ +Plane_3 operator()(const Plane_3 &p) const; + +/*! +composes two affine transformations. +*/ +Aff_transformation_3 +operator*(const Aff_transformation_3 &s) const; + +/*! +gives the inverse transformation. +*/ +Aff_transformation_3 inverse() const; + +/*! +returns `true`, if the transformation is not reflecting, +i.e. the determinant of the involved linear transformation is +non-negative. +*/ +bool is_even() const; + +/*! +returns `true`, if the transformation is reflecting. +*/ +bool is_odd() const; + +/// @} + +/// \name Matrix Entry Access +/// @{ + + +/*! + +*/ +Kernel::FT cartesian(int i, int j) const; + +/*! +returns entry \f$ m_{ij}\f$ in a matrix representation in which \f$ m_{33}\f$ is 1. +*/ +Kernel::FT m(int i, int j) const; + +/*! + +*/ +Kernel::RT homogeneous(int i, int j) const; + +/*! +returns entry \f$ m_{ij}\f$ in some fixed matrix representation. +*/ +Kernel::RT hm(int i, int j) const; + +/// @} + +}; /* end Aff_transformation_3 */ +} /* end namespace CGAL */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Bbox_2.h b/Kernel_23/doc/Kernel_23/CGAL/Bbox_2.h new file mode 100644 index 00000000000..4a8c80e2b08 --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/Bbox_2.h @@ -0,0 +1,99 @@ + +namespace CGAL { + +/*! +\ingroup PkgKernel23 + +An object `b` of the class `Bbox_2` is a bounding +box in the two-dimensional Euclidean plane \f$ \E^2\f$. This class is not templated. + +\sa `CGAL::Bbox_3` +\sa `CGAL::do_overlap` + +*/ + +class Bbox_2 { +public: + +/// \name Creation +/// @{ + +/*! +introduces a bounding box `b` with lower left corner at +`(xmin, ymin)` and with upper right corner at +`(xmax, ymax)`. +*/ +Bbox_2(double x_min, double y_min, +double x_max, double y_max); + +/// @} + +/// \name Operations +/// @{ + +/*! +Test for equality. +*/ +bool operator==(const Bbox_2 &c) const; + +/*! +Test for inequality. +*/ +bool operator!=(const Bbox_2 &q) const; + +/*! +Returns 2. +*/ +int dimension() const; + +/*! + +*/ +double xmin() const; + +/*! + +*/ +double ymin() const; + +/*! + +*/ +double xmax() const; + +/*! + +*/ +double ymax() const; + +/*! +Returns `xmin()` if `i==0` or `ymin()` if `i==1`. +\pre i==0 or i==1 +*/ +double min(int i) const; + +/*! +Returns `xmax()` if `i==0` or `ymax()` if `i==1`. +\pre i==0 or i==1 +*/ +double max(int i) const; + +/*! +returns a bounding box of `b` and `c`. +*/ +Bbox_2 operator+(const Bbox_2 &c) const; + +/// @} + +}; /* end Bbox_2 */ + +/*! +returns `true` iff `bb1` and `bb2` overlap, i.e., iff their +intersection is non-empty. + +\relates Bbox_2 +*/ +bool do_overlap(const Bbox_2 &bb1, const Bbox_2 &bb2); + + +} /* end namespace CGAL */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Bbox_3.h b/Kernel_23/doc/Kernel_23/CGAL/Bbox_3.h new file mode 100644 index 00000000000..a0a9598315e --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/Bbox_3.h @@ -0,0 +1,111 @@ + +namespace CGAL { + +/*! +\ingroup PkgKernel23 + +An object `b` of the class `Bbox_3` is a bounding +box in the three-dimensional Euclidean space \f$ \E^3\f$. + +\sa `CGAL::Bbox_2` +\sa `CGAL::do_overlap` + +*/ + +class Bbox_3 { +public: + +/// \name Creation +/// @{ + +/*! +introduces a bounding box `b` with lexicographically +smallest corner point at `(xmin, ymin, zmin)` +lexicographically largest corner point at +`(xmax, ymax, zmax)`. +*/ +Bbox_3(double x_min, double y_min, double z_min, +double x_max, double y_max, double z_max); + +/// @} + +/// \name Operations +/// @{ + +/*! +Test for equality. +*/ +bool operator==(const Bbox_3 &c) const; + +/*! +Test for inequality. +*/ +bool operator!=(const Bbox_3 &q) const; + +/*! +Returns 3. +*/ +int dimension() const; + +/*! + +*/ +double xmin() const; + +/*! + +*/ +double ymin() const; + +/*! + +*/ +double zmin() const; + +/*! + +*/ +double xmax() const; + +/*! + +*/ +double ymax() const; + +/*! + +*/ +double zmax() const; + +/*! +Returns `xmin()` if `i==0` or `ymin()` if `i==1` +or `zmin()` if `i==2`. +\pre i<=0 and i<=2 +*/ +double min(int i) const; + +/*! +Returns `xmax()` if `i==0` or `ymax()` if `i==1` +or `zmax()` if `i==2`. +\pre i==0 and i<=2 +*/ +double max(int i) const; + +/*! +returns a bounding box of `b` and `c`. +*/ +Bbox_3 operator+(const Bbox_3 &c) const; + +/// @} + +}; /* end Bbox_3 */ + +/*! +returns `true` iff `bb1` and `bb2` overlap, i.e., iff their +intersection is non-empty. + +\relates Bbox_3 +*/ +bool do_overlap(const Bbox_3 &bb1, const Bbox_3 &bb2); + +} /* end namespace CGAL */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Cartesian.h b/Kernel_23/doc/Kernel_23/CGAL/Cartesian.h new file mode 100644 index 00000000000..9e2bf6b9b40 --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/Cartesian.h @@ -0,0 +1,49 @@ + +namespace CGAL { + +/*! +\ingroup PkgKernel23 + +A model for `Kernel` that uses Cartesian coordinates to represent the +geometric objects. In order for `Cartesian` to model Euclidean geometry +in \f$ E^2\f$ and/or \f$ E^3\f$, for some mathematical field \f$ E\f$ (e.g., +the rationals \f$\mathbb{Q}\f$ or the reals \f$\mathbb{R}\f$), the template parameter `FieldNumberType` +must model the mathematical field \f$ E\f$. That is, the field operations on this +number type must compute the mathematically correct results. If the number +type provided as a model for `FieldNumberType` is only an approximation of a +field (such as the built-in type `double`), then the geometry provided by +the kernel is only an approximation of Euclidean geometry. + +\models ::Kernel + +Implementation +-------------- + +All geometric objects in `Cartesian` are reference counted. + +\sa `CGAL::Simple_cartesian` +\sa `CGAL::Homogeneous` +\sa `CGAL::Simple_homogeneous` + +*/ +template< typename FieldNumberType > +class Cartesian { +public: + +/// \name Types +/// @{ + +/*! + +*/ +typedef FieldNumberType FT; + +/*! + +*/ +typedef FieldNumberType RT; + +/// @} + +}; /* end Cartesian */ +} /* end namespace CGAL */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Cartesian_converter.h b/Kernel_23/doc/Kernel_23/CGAL/Cartesian_converter.h new file mode 100644 index 00000000000..f446db4b0c5 --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/Cartesian_converter.h @@ -0,0 +1,60 @@ + +namespace CGAL { + +/*! +\ingroup PkgKernel23 + +`Cartesian_converter`converts objects from the kernel traits `K1` to +the kernel traits `K2` using `Converter` to do the conversion. +Those traits must be of the form +`Cartesian` and `Cartesian` (or the equivalent with +`Simple_cartesian`). It then provides the following operators to convert +objects from `K1` to `K2`. + +The third template parameter `NTConverter` is a function object that must +provide `K2::FT operator()(K1::FT n)` that converts `n` to an +`K2::FT` which has the same value. + +The default value of this parameter is `CGAL::NT_converter`. + +Example +-------------- + +In the following example, we compute exactly +the intersection point between a line and a triangle, +and we then create a double approximation of this point. + +\cgalexample{cartesian_converter.cpp} + +\sa `CGAL::Cartesian` +\sa `CGAL::Simple_cartesian` + +*/ +template< typename K1, typename K2, typename NTConverter > +class Cartesian_converter { +public: + +/// \name Creation +/// @{ + +/*! +Default constructor. +*/ +Cartesian_converter<>(); + +/// @} + +/// \name Operations +/// Similar operators are defined for the other kernel traits types `Point_3`, `Vector_2`... +/// @{ + +/*! +returns a `K2::Point_2` which coordinates are those of `p`, +converted by `NTConverter`. +*/ +K2::Point_2 operator()(const K1::Point_2&p); + +/// @} + +}; /* end Cartesian_converter */ +} /* end namespace CGAL */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Circle_2.h b/Kernel_23/doc/Kernel_23/CGAL/Circle_2.h new file mode 100644 index 00000000000..27a71c09ca6 --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/Circle_2.h @@ -0,0 +1,196 @@ +namespace CGAL { + +/*! +\ingroup PkgKernel23 + +An object of type `Circle_2` is a circle in the +two-dimensional Euclidean plane \f$ \E^2\f$. The circle is oriented, i.e. +its boundary has clockwise or counterclockwise orientation. The +boundary splits \f$ \E^2\f$ into a positive and a negative side, where the +positive side is to the left of the boundary. The boundary also +splits \f$ \E^2\f$ into a bounded and an unbounded side. Note that the +circle can be degenerated, i.e. the squared radius may be zero. + +\sa `Kernel::Circle_2` + +*/ +template< typename Kernel > +class Circle_2 { +public: + +/// \name Creation +/// @{ + +/*! + +introduces a variable `c` of type `Circle_2`. +It is initialized to the circle with center `center`, +squared radius `squared_radius` and orientation +`ori`. +\pre `ori` \f$ \neq\f$ `COLLINEAR`, and further, `squared_radius` \f$ \geq\f$ 0. +*/ +Circle_2( Point_2 const& center, +Kernel::FT const& squared_radius, +Orientation const& ori = COUNTERCLOCKWISE); + +/*! + +introduces a variable `c` of type `Circle_2`. +It is initialized to the unique circle which passes through +the points `p`, `q` and `r`. The orientation of +the circle is the orientation of the point triple `p`, +`q`, `r`. +\pre `p`, `q`, and `r` are not collinear. +*/ +Circle_2( Point_2 const& p, +Point_2 const& q, +Point_2 const& r); + +/*! + +introduces a variable `c` of type `Circle_2`. +It is initialized to the circle with diameter \f$ \overline{pq}\f$ +and orientation `ori`. +\pre `ori` \f$ \neq\f$ `COLLINEAR`. +*/ +Circle_2( Point_2 const& p, +Point_2 const& q, +Orientation const& ori += COUNTERCLOCKWISE); + +/*! + +introduces a variable `c` of type `Circle_2`. +It is initialized to the circle with center `center`, squared +radius zero and orientation `ori`. +\pre `ori` \f$ \neq\f$ `COLLINEAR`. +\post `c`.`is_degenerate()` = `true`. +*/ +Circle_2( Point_2 const& center, +Orientation const& ori += COUNTERCLOCKWISE); + +/// @} + +/// \name Access Functions +/// @{ + +/*! + +returns the center of `c`. +*/ +Point_2 const& center( ) const; + +/*! + +returns the squared radius of `c`. +*/ +Kernel::FT const& squared_radius( ) const; + +/*! + +returns the orientation of `c`. +*/ +Orientation const& orientation( ) const; + +/*! + +returns `true`, iff `c` and `circle2` are equal, +i.e. if they have the same center, same squared radius and +same orientation. +*/ +bool operator == ( Circle_2 const& circle2) const; + +/*! + +returns `true`, iff `c` and `circle2` are not equal. +*/ +bool operator != ( Circle_2 const& circle2) const; + +/// @} + +/// \name Predicates +/// @{ + +/*! + +returns `true`, iff `c` is degenerate, i.e. if `c` has squared radius zero. +*/ +bool is_degenerate( ) const; + +/*! + +returns either the constant `ON_ORIENTED_BOUNDARY`, +`ON_POSITIVE_SIDE`, or `ON_NEGATIVE_SIDE`, +iff `p` lies on the boundary, properly on the +positive side, or properly on the negative side +of `c`, resp. +*/ +Oriented_side +oriented_side( Point_2 const& p) const; + +/*! + +returns `ON_BOUNDED_SIDE`, +`ON_BOUNDARY`, or `ON_UNBOUNDED_SIDE` +iff `p` lies properly inside, on the boundary, or properly +outside of `c`, resp. +*/ +Bounded_side +bounded_side( Point_2 const& p) const; + +/*! + +*/ +bool has_on_positive_side(const Point_2 &p) const; + +/*! + +*/ +bool has_on_negative_side(const Point_2 &p) const; + +/*! + +*/ +bool has_on_boundary(const Point_2 &p) const; + +/*! + +*/ +bool has_on_bounded_side(const Point_2 &p) const; + +/*! + +*/ +bool has_on_unbounded_side(const Point_2 &p) const; + +/// @} + +/// \name Miscellaneous +/// @{ + +/*! + +returns the circle with the same center and squared radius as +`c` but with opposite orientation. +*/ +Circle_2 opposite() const; + +/*! + +returns the circle obtained by applying \f$ at\f$ on `c`. +\pre `at` is an orthogonal transformation. +*/ +Circle_2 orthogonal_transform( +Aff_transformation_2 const& at) const; + +/*! + +returns a bounding box containing `c`. +*/ +Bbox_2 bbox() const; + +/// @} + +}; /* end Circle_2 */ +} /* end namespace CGAL */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Circle_3.h b/Kernel_23/doc/Kernel_23/CGAL/Circle_3.h new file mode 100644 index 00000000000..5049773675f --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/Circle_3.h @@ -0,0 +1,169 @@ +namespace CGAL { + +/*! +\ingroup PkgKernel23 + +An object of type `Circle_3` is a circle in the +three-dimensional Euclidean space \f$ \E^3\f$. Note that the +circle can be degenerate, i.e. the squared radius may be zero. + +\sa `Kernel::Circle_3` + +*/ +template< typename Kernel > +class Circle_3 { +public: + +/// \name Creation +/// @{ + +/*! +introduces a variable `c` of type `Circle_3`. +It is initialized to the circle of center `center` and +squared radius `sq_r` in plane `plane`. +\pre `center` lies in `plane` and `sq_r` \f$ \geq\f$ 0. +*/ +Circle_3(Point_3 const& center, +Kernel::FT const& sq_r, +Plane_3 const& plane); + +/*! +introduces a variable `c` of type `Circle_3`. +It is initialized to the circle of center `center` and +squared radius `sq_r` in a plane normal to +the vector `n`. +\pre `sq_r` \f$ \geq\f$ 0. +*/ +Circle_3(Point_3 const& center, +Kernel::FT const& sq_r, +Vector_3 const& n); + +/*! +introduces a variable `c` of type `Circle_3`. +It is initialized to the circle passing through the three points. +\pre The three points are not collinear. +*/ +Circle_3(Point_3 const& p, +Point_3 const& q, Point_3 const& r); + +/*! +introduces a variable `c` of type `Circle_3`. +It is initialized to the circle along which the two spheres intersect. +\pre The two spheres intersect along a circle. +*/ +Circle_3(Sphere_3 const& sphere1, +Sphere_3 const& sphere2); + +/*! +introduces a variable `c` of type `Circle_3`. +It is initialized to the circle along which the sphere and the +plane intersect. +\pre The sphere and the plane intersect along a circle. +*/ +Circle_3(Sphere_3 const& sphere, +Plane_3 const& plane); + +/*! +introduces a variable `c` of type `Circle_3`. +It is initialized to the circle along which the sphere and the +plane intersect. +\pre The sphere and the plane intersect along a circle. +*/ +Circle_3(Plane_3 const& plane, +Sphere_3 const& sphere); + +/// @} + +/// \name Access Functions +/// @{ + +/*! + +returns the center of `c`. +*/ +Point_3 const& center( ) const; + +/*! + +returns the squared radius of `c`. +*/ +Kernel::FT const& squared_radius( ) const; + +/*! + +returns the supporting plane of `c`. +*/ +Plane_3 const& supporting_plane( ) const; + +/*! + +returns the diametral sphere of `c`. +*/ +Sphere_3 const& diametral_sphere( ) const; + +/*! + +returns the area of `c`, divided by \f$ \pi\f$. +*/ +Kernel::FT const& area_divided_by_pi( ) const; + +/*! + +returns an approximation of the area of `c`. +*/ +double const& approximate_area( ) const; + +/*! + +returns the squared length of `c`, divided by \f$ \pi^2\f$. +*/ +Kernel::FT const& squared_length_divided_by_pi_square( ) const; + +/*! + +returns an approximation of the squared length (i.e. perimeter) of `c`. +*/ +double const& approximate_squared_length( ) const; + +/// @} + +/// \name Predicates +/// @{ + +/*! + +*/ +bool has_on(Point_3 const& p) const; + +/// @} + +/// \name Operations +/// @{ + +/*! + +returns a bounding box containing `c`. +*/ +Bbox_3 bbox() const; + +/// @} + +}; /* end Circle_3 */ + +/*! +returns `true`, iff `c1` and `c2` are equal, +i.e. if they have the same center, the same squared radius +and the same supporting plane. +\relates Circle_3 +*/ +bool operator == (Circle_3 const& c1, +Circle_3 const& c2); + +/*! + +\relates Circle_3 +*/ +bool operator != (Circle_3 const& c1, +Circle_3 const& c2); + +} /* end namespace CGAL */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Dimension.h b/Kernel_23/doc/Kernel_23/CGAL/Dimension.h new file mode 100644 index 00000000000..9e2a8024393 --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/Dimension.h @@ -0,0 +1,200 @@ + +namespace CGAL { + +/// \defgroup kernel_dimension Dimension Handling +/// \ingroup PkgKernel23 +/// Tools to handle the dimension of a Kernel. +/// @{ + +/*! +The class `Ambient_dimension` allows to retrieve the dimension of the ambient space of +a type `T` in a kernel `K`. + +Parameters +-------------- + +The parameter `K` has the default value `Kernel_traits::Kernel>`. + +Example +-------------- + +The following retrieves the dimension of a point type. + +
 
+typedef K::Point_2 Point; 
+int dimension = Ambient_dimension::value; 
+assert(dimension == 2); 
+
+ +\sa `CGAL::Dimension_tag` +\sa `CGAL::Dynamic_dimension_tag` +\sa `CGAL::Feature_dimension` + +*/ +template< typename T, typename K > +class Ambient_dimension { +public: + +/// \name Constants +/// @{ + +/*! +The dimension value as a compile-time +integral constant. It is implemented as `K::Dimension::type::value`. +It exists only when the dimension is a compile-time constant. +*/ +static const int value; + +/// @} + +/// \name Types +/// @{ + +/*! +Either `Dimension_tag` if the dimension is a +compile-time constant of value `dim`, or `Dynamic_dimension_tag` +otherwise. It is implemented as `K::Ambient_dimension::type`. +*/ +typedef Hidden_type type; + +/// @} + +}; /* end Ambient_dimension */ + +/*! + + +An object of the class `Dimension_tag` is an empty object which can be used +for dispatching functions based on the dimension of an object, as provided +by the `dim` parameter. It is useful in cases where it is not more +practical to pass the dimension as a template parameter directly. + +Example +-------------- + +The following code declares two functions constructing two points at the origin, +either in 2D or in 3D. + +
 
+Point_2 get_origin(Dimension_tag<2>) { return Point_2(ORIGIN); } 
+Point_3 get_origin(Dimension_tag<3>) { return Point_3(ORIGIN); } 
+
+std::cout << get_origin(Dimension_tag<2>())) << std::endl; 
+[cccend]
+ +\sa `CGAL::Ambient_dimension` +\sa `CGAL::Feature_dimension` +\sa `CGAL::Dynamic_dimension_tag` + +*/ +template< typename int dim > +class Dimension_tag { +public: + +/// \name Constants +/// @{ + +/*! +The value of the `dim` parameter. +*/ +static const int value; + +/// @} + +}; /* end Dimension_tag */ + +/*! + + +An object of the class `Dynamic_dimension_tag` is an empty object which can be used +for dispatching functions based on the dimension of an object. +`Dynamic_dimension_tag` indicates that the dimension is not known at compile-time. +`Dimension_tag` is the tag class dealing with compile-time dimensions. + +Example +-------------- + +The following code declares two functions constructing two points at the origin, +either in 2D or in 3D. + +
 
+Point_2 get_origin(Dimension_tag<2>) { return Point_2(ORIGIN); } 
+Point_3 get_origin(Dimension_tag<3>) { return Point_3(ORIGIN); } 
+Point_d get_origin(Dynamic_dimension_tag) { return Point_d(ORIGIN); } 
+
+std::cout << get_origin(Dynamic_dimension_tag())) << std::endl; 
+[cccend]
+ +\sa `CGAL::Dimension_tag` +\sa `CGAL::Ambient_dimension` +\sa `CGAL::Feature_dimension` + +*/ + +class Dynamic_dimension_tag { +public: + +/// @} + +}; /* end Dynamic_dimension_tag */ + +/*! + +The class `Feature_dimension` allows to retrieve the geometric dimension of a type `T` +in a kernel `K`. + +Parameters +-------------- + +The parameter `K` has the default value `Kernel_traits::Kernel`. + +Example +-------------- + +The following retrieves the dimension of a point type. + +
[cccbegin] 
+typedef K::Point_2 Point; 
+int dimension = Feature_dimension::value; 
+assert(dimension == 0); 
+
+ +\sa `CGAL::Dimension_tag` +\sa `CGAL::Dynamic_dimension_tag` +\sa `CGAL::Ambient_dimension` + +*/ +template< typename T, typename K > +class Feature_dimension { +public: + +/// \name Constants +/// @{ + +/*! +The dimension value as a compile-time +integral constant. It is implemented as `K::Feature_dimension::type::value`. +It exists only when the dimension is a compile-time constant. +*/ +static const int value; + +/// @} + +/// \name Types +/// @{ + +/*! +Either `Dimension_tag` if the dimension is a +compile-time constant of value `dim`, or `Dynamic_dimension_tag` +otherwise. It is implemented as `K::Feature_dimension::type`. +*/ +typedef Hidden_type type; + +/// @} + +}; /* end Feature_dimension */ + +/// @} + +} /* end namespace CGAL */ + diff --git a/Kernel_23/doc/Kernel_23/CGAL/Direction_2.h b/Kernel_23/doc/Kernel_23/CGAL/Direction_2.h new file mode 100644 index 00000000000..af3cf88db46 --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/Direction_2.h @@ -0,0 +1,141 @@ +namespace CGAL { +/*! +\ingroup PkgKernel23 + +An object of the class `Direction_2` is a vector in the two-dimensional +vector space \f$ \R^2\f$ where we forget about its length. They can be +viewed as unit vectors, although there is no normalization internally, +since this is error prone. Directions are used whenever the length of +a vector does not matter. +They also characterize a set of parallel oriented lines that have the same +orientations. +For example, you can ask for the direction +orthogonal to an oriented plane, or the direction of an oriented line. +Further, they can be used to indicate angles. The slope of a direction +is `dy()/dx()`. + +\sa `Kernel::Direction_2` + +*/ +template< typename Kernel > +class Direction_2 { +public: + +/// \name Creation +/// @{ + +/*! +introduces the direction `d` of vector \f$ v\f$. +*/ +Direction_2(const Vector_2 &v); + +/*! +introduces the direction `d` of line \f$ l\f$. +*/ +Direction_2(const Line_2 &l); + +/*! +introduces the direction `d` of ray \f$ r\f$. +*/ +Direction_2(const Ray_2 &r); + +/*! +introduces the direction `d` of segment \f$ s\f$. +*/ +Direction_2(const Segment_2 &s); + +/*! +introduces a direction `d` passing through the origin +and the point with Cartesian coordinates \f$ (x, y)\f$. +*/ +Direction_2(const Kernel::RT &x, const Kernel::RT &y); + +/// @} + +/// \name Operations +/// There is a total order on directions. We compare the angles +/// between the positive \f$ x\f$-axis and the directions in +/// counterclockwise order. +/// @{ + +/*! +returns values, such that `d``== Direction_2(delta(0),delta(1))`. +\pre : \f$ 0 \leq i \leq1\f$. +*/ +Kernel::RT delta(int i) const; + +/*! +returns `delta(0)`. +*/ +Kernel::RT dx() const; + +/*! +returns `delta(1)`. +*/ +Kernel::RT dy() const; + +/*! + +*/ +bool operator==(const Direction_2 &e) const; + +/*! + +*/ +bool operator!=(const Direction_2 &e) const; + +/*! + +*/ +bool operator<(const Direction_2 &e) const; + +/*! + +*/ +bool operator>(const Direction_2 &e) const; + +/*! + +*/ +bool operator<=(const Direction_2 &e) const; + +/*! + +*/ +bool operator>=(const Direction_2 &e) const; + +/*! +returns true, iff `d` is not equal to `d1`, and +while rotating counterclockwise starting at `d1`, +`d` is reached strictly before `d2` is reached. +Note that true is returned if `d1` == `d2`, unless +also `d` == `d1`. + +*/ +bool counterclockwise_in_between(const Direction_2 &d1, +const Direction_2 &d2) const; + +/*! +The direction opposite to `d`. +*/ +Direction_2 operator-() const; + +/// @} + +/// \name Miscellaneous +/// @{ + +/*! +returns a vector that has the same direction as `d`. +*/ +Vector_2 vector() const; + +/*! +returns the direction obtained by applying \f$ t\f$ on `d`. +*/ +Direction_2 transform(const Aff_transformation_2 &t) const; + +/// @} + +}; /* end Direction_2 */ +} /* end namespace CGAL */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Direction_3.h b/Kernel_23/doc/Kernel_23/CGAL/Direction_3.h new file mode 100644 index 00000000000..0c4bd2074e0 --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/Direction_3.h @@ -0,0 +1,107 @@ +namespace CGAL { + +/*! +\ingroup PkgKernel23 + +An object of the class `Direction_3` is a vector in the three-dimensional +vector space \f$ \R^3\f$ where we forget about their length. They can be +viewed as unit vectors, although there is no normalization internally, +since this is error prone. Directions are used whenever the length of +a vector does not matter. +They also characterize a set of parallel lines that have the same orientation +or the direction normal to parallel planes that have the same orientation. +For example, you can ask for the direction +orthogonal to an oriented plane, or the direction of an oriented line. + +\sa `Kernel::Direction_3` + +*/ +template< typename Kernel > +class Direction_3 { +public: + +/// \name Creation +/// @{ + +/*! +introduces a direction `d` initialized with the +direction of vector \f$ v\f$. +*/ +Direction_3(const Vector_3 &v); + +/*! +introduces the direction `d` of line \f$ l\f$. +*/ +Direction_3(const Line_3 &l); + +/*! +introduces the direction `d` of ray \f$ r\f$. +*/ +Direction_3(const Ray_3 &r); + +/*! +introduces the direction `d` of segment \f$ s\f$. +*/ +Direction_3(const Segment_3 &s); + +/*! +introduces a direction `d` initialized with the direction +from the origin to the point with Cartesian coordinates \f$ (x, y, z)\f$. +*/ +Direction_3(const Kernel::RT &x, const Kernel::RT &y, const Kernel::RT &z); + +/// @} + +/// \name Operations +/// @{ + +/*! +returns values, such that `d``== Direction_3(delta(0),delta(1),delta(2))`. +\pre : \f$ 0 \leq i \leq2\f$. +*/ +Kernel::RT delta(int i) const; + +/*! +returns `delta(0)`. +*/ +Kernel::RT dx() const; + +/*! +returns `delta(1)`. +*/ +Kernel::RT dy() const; + +/*! +returns `delta(2)`. +*/ +Kernel::RT dz() const; + +/*! +Test for equality. +*/ +bool operator==(const Direction_3 &e) const; + +/*! +Test for inequality. +*/ +bool operator!=(const Direction_3 &e) const; + +/*! +The direction opposite to `d`. +*/ +Direction_3 operator-() const; + +/*! +returns a vector that has the same direction as `d`. +*/ +Vector_3 vector() const; + +/*! +returns the direction obtained by applying \f$ t\f$ on `d`. +*/ +Direction_3 transform(const Aff_transformation_3 &t) const; + +/// @} + +}; /* end Direction_3 */ +} /* end namespace CGAL */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Exact_predicates_exact_constructions_kernel.h b/Kernel_23/doc/Kernel_23/CGAL/Exact_predicates_exact_constructions_kernel.h new file mode 100644 index 00000000000..7ea9a45661e --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/Exact_predicates_exact_constructions_kernel.h @@ -0,0 +1,31 @@ + +namespace CGAL { + +/*! +\ingroup kernel_predef + +A typedef to a kernel which has the following properties: + +
    +
  • It uses Cartesian representation. +
  • It supports constructions of points from double Cartesian +coordinates. +
  • It provides both exact geometric predicates and exact geometric +constructions. +
+ +\models ::Kernel + +\sa `CGAL::Exact_predicates_exact_constructions_kernel_with_sqrt` +\sa `CGAL::Exact_predicates_inexact_constructions_kernel` +\sa `CGAL::Cartesian` + +*/ + +class Exact_predicates_exact_constructions_kernel { +public: + +/// @} + +}; /* end Exact_predicates_exact_constructions_kernel */ +} /* end namespace CGAL */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Exact_predicates_exact_constructions_kernel_with_sqrt.h b/Kernel_23/doc/Kernel_23/CGAL/Exact_predicates_exact_constructions_kernel_with_sqrt.h new file mode 100644 index 00000000000..d063b2c69bd --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/Exact_predicates_exact_constructions_kernel_with_sqrt.h @@ -0,0 +1,34 @@ + +namespace CGAL { + +/*! +\ingroup kernel_predef + +A typedef to a kernel which has the following properties: + +
    +
  • It uses Cartesian representation. +
  • It supports constructions of points from double Cartesian +coordinates. +
  • It provides both exact geometric predicates and exact geometric +constructions. +
  • Its `FT` nested type supports the square root operation `sqrt()`. +
+ +Note that it requires CORE or LEDA installed. + +\models ::Kernel + +\sa `CGAL::Exact_predicates_exact_constructions_kernel` +\sa `CGAL::Exact_predicates_inexact_constructions_kernel` +\sa `CGAL::Cartesian` + +*/ + +class Exact_predicates_exact_constructions_kernel_with_sqrt { +public: + +/// @} + +}; /* end Exact_predicates_exact_constructions_kernel_with_sqrt */ +} /* end namespace CGAL */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Exact_predicates_inexact_constructions_kernel.h b/Kernel_23/doc/Kernel_23/CGAL/Exact_predicates_inexact_constructions_kernel.h new file mode 100644 index 00000000000..ca516abc2d0 --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/Exact_predicates_inexact_constructions_kernel.h @@ -0,0 +1,31 @@ + +namespace CGAL { + +/*! +\ingroup kernel_predef + +A typedef to a kernel which has the following properties: + +
    +
  • It uses Cartesian representation. +
  • It supports constructions of points from double Cartesian +coordinates. +
  • It provides exact geometric predicates, but inexact geometric +constructions. +
+ +\models ::Kernel + +\sa `CGAL::Exact_predicates_exact_constructions_kernel` +\sa `CGAL::Exact_predicates_exact_constructions_kernel_with_sqrt` +\sa `CGAL::Cartesian` + +*/ + +class Exact_predicates_inexact_constructions_kernel { +public: + +/// @} + +}; /* end Exact_predicates_inexact_constructions_kernel */ +} /* end namespace CGAL */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Filtered_kernel.h b/Kernel_23/doc/Kernel_23/CGAL/Filtered_kernel.h new file mode 100644 index 00000000000..3aef34e95fc --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/Filtered_kernel.h @@ -0,0 +1,134 @@ + +namespace CGAL { + +/*! +\ingroup PkgKernel23 + +`Filtered_kernel_adaptor` is a kernel that uses the filtering technique +\cite cgal:bbp-iayed-01 to obtain a kernel with exact and efficient +predicate functors. +The geometric constructions are exactly those +of the kernel `CK`, which means that they are not necessarily exact. + +In contrast to `Filtered_kernel`, +the global functions are those of `CK`. + +\models ::Kernel + +Example +-------------- + +The following example shows how to produce a kernel whose geometric +objects and constructions are those of `Simple_cartesian` +The predicate functors of the kernel are exact, the global functions +are not. + +\code +#include +#include + +typedef CGAL::Simple_cartesian CK; +typedef CGAL::Filtered_kernel_adaptor K; + +typedef K::Point_2 p(0,0), q(1,1), r(1,5); + +CGAL::orientation(p,q,r); // not exact + +typedef K::Orientation_2 orientation; +orientation(p,q,r); // exact +\endcode + +*/ +template< typename CK > +class Filtered_kernel_adaptor { +public: + +/// @} + +}; /* end Filtered_kernel_adaptor */ +} /* end namespace CGAL */ + +namespace CGAL { + +/*! +\ingroup PkgKernel23 + +`Filtered_kernel` is a kernel that uses the filtering technique based +on interval arithmetic from \cite cgal:bbp-iayed-01 to achieve +exact and efficient predicates. In addition, a few selected important +predicates are implemented using the formally proved, semi-static, filtering +techniques from \cite cgal:mp-fcafg-05. + +The geometric constructions are exactly those +of the kernel `CK`, which means that they are not necessarily exact. + +Parameters +-------------- + +The first parameter, `CK`, is the "Construction Kernel", namely the kernel +from which are taken the types of the geometric objects as well as the +geometric constructions. + +The second parameter, `UseStaticFilters`, is a Boolean value which +activates or not an additional layer of semi-static filters. It defaults to +`true` (activated), unless the `CGAL_NO_STATIC_FILTERS` macro is +defined. This option is mostly for debugging and testing, there should be no +production use for deactivating static filters. + +\models ::Kernel + +Example +-------------- + +The following example shows how to produce a kernel whose geometric +objects and constructions are those of `Simple_cartesian` +but the predicates are exact. + +\code +#include +#include + +typedef CGAL::Simple_cartesian CK; +typedef CGAL::Filtered_kernel K; +\endcode + +Implementation +-------------- + +The implementation uses `CGAL::Filtered_predicate` over +each predicate of the kernel traits interface. Additionally, faster static +filters may be used for a few selected critical predicates. + +*/ +template< typename CK > +class Filtered_kernel { +public: + +/// \name Types +/// @{ + +/*! +The type of the exact kernel. +*/ +typedef EK Exact_kernel; + +/*! +The type of the approximate "filtering" kernel. +*/ +typedef FK Approximate_kernel; + +/// @} + +/// \name Constants +/// @{ + +/*! +A Boolean value corresponding to the +second template argument. Tells whether static filters are provided. +*/ +static const bool Has_static_filters; + +/// @} + +}; /* end Filtered_kernel */ +} /* end namespace CGAL */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Filtered_predicate.h b/Kernel_23/doc/Kernel_23/CGAL/Filtered_predicate.h new file mode 100644 index 00000000000..264c3873cdd --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/Filtered_predicate.h @@ -0,0 +1,80 @@ + +namespace CGAL { + +/*! +\ingroup PkgKernel23 + +`Filtered_predicate`is an adaptor for predicate function objects that allows +one to produce efficient and exact predicates. It is used to build +`CGAL::Filtered_kernel` and can be used for other +predicates too. + +`EP` is the exact but supposedly slow predicate that is able to evaluate +the predicate correctly. It will be called only when the filtering predicate, +`FP`, cannot compute the correct result. This failure of `FP` must be +done by throwing an exception. + +To convert the geometric objects that are the arguments of the predicate, +we use the function objects `C2E` and `C2F`, which must be of the form +`Cartesian_converter` or `Homogeneous_converter`. + +Example +-------------- + +The following example defines an efficient and exact version of the +orientation predicate over three points using the Cartesian representation +with double coordinates and without reference counting +(`Simple_cartesian::Point_2`). +Of course, the orientation predicate can already be found in the kernel, but +you can follow this example to filter your own predicates. +It uses the fast but inexact predicate based on interval arithmetic for +filtering and the slow but exact predicate based on multi-precision floats +when the filtering predicate fails. + +\cgalexample{Filtered_predicate.cpp} + +*/ +template< typename EP, typename FP, typename C2E, typename C2F > +class Filtered_predicate { +public: + +/// \name Types +/// @{ + +/*! +The return type of the function operators. +It must also be the same type as `EP::result_type`. +*/ +typedef FP::result_type result_type; + +/// @} + +/// \name Creation +/// @{ + +/*! +Default constructor. +*/ +Filtered_predicate(); + +/// @} + +/// \name Operations +/// Similar function operators are defined for up to 7 arguments. +/// @{ + +/*! +The unary function operator for unary predicates. +*/ +template result_type operator()(A1 a1); + +/*! +The binary function operator for binary predicates. +*/ +template +result_type operator()(A1 a1, A2 a2); + +/// @} + +}; /* end Filtered_predicate */ +} /* end namespace CGAL */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Homogeneous.h b/Kernel_23/doc/Kernel_23/CGAL/Homogeneous.h new file mode 100644 index 00000000000..7cb796caf9b --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/Homogeneous.h @@ -0,0 +1,49 @@ + +namespace CGAL { + +/*! +\ingroup PkgKernel23 + +A model for a `Kernel` using homogeneous coordinates to represent the +geometric objects. In order for `Homogeneous` to model Euclidean geometry +in \f$ E^2\f$ and/or \f$ E^3\f$, for some mathematical ring \f$ E\f$ (e.g., +the integers \f$\mathbb{Z}\f$ or the rationals \f$\mathbb{Q}\f$), the template parameter `RingNumberType` +must model the mathematical ring \f$ E\f$. That is, the ring operations on this +number type must compute the mathematically correct results. If the number +type provided as a model for `RingNumberType` is only an approximation of a +ring (such as the built-in type `double`), then the geometry provided by +the kernel is only an approximation of Euclidean geometry. + +\models ::Kernel + +Implementation +-------------- + +This model of a kernel uses reference counting. + +\sa `CGAL::Cartesian` +\sa `CGAL::Simple_cartesian` +\sa `CGAL::Simple_homogeneous` + +*/ +template< typename RingNumberType > +class Homogeneous { +public: + +/// \name Types +/// @{ + +/*! + +*/ +typedef Quotient FT; + +/*! + +*/ +typedef RingNumberType RT; + +/// @} + +}; /* end Homogeneous */ +} /* end namespace CGAL */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Homogeneous_converter.h b/Kernel_23/doc/Kernel_23/CGAL/Homogeneous_converter.h new file mode 100644 index 00000000000..94abcedcc53 --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/Homogeneous_converter.h @@ -0,0 +1,58 @@ + +namespace CGAL { + +/*! +\ingroup PkgKernel23 + +`Homogeneous_converter`converts objects from the kernel traits `K1` to +the kernel traits `K2`. Those traits must be of the form +`Homogeneous` and `Homogeneous` (or the equivalent with +`Simple_homogeneous`). It then provides the following operators to +convert objects from `K1` to `K2`. + +The third template parameter `RT_Converter` is a function object that must +provide `K2::RT operator()(const K1::RT &n);` that +converts `n` to an `K2::RT` that has the same value. + +The default value of this parameter is `CGAL::NT_converter`, +which uses the conversion operator from +`K1::RT` to `K2::RT`. + +Similarly, the fourth template parameter must provide +`K2::FT operator()(const K1::FT &n);` that +converts `n` to an `K2::FT` that has the same value. Its +default value is `CGAL::NT_converter`. + +\sa `CGAL::Homogeneous` +\sa `CGAL::Simple_homogeneous` + +*/ +template< typename K1, typename K2, typename RTConverter, typename FTConverter > +class Homogeneous_converter { +public: + +/// \name Creation +/// @{ + +/*! +Default constructor. +*/ +Homogeneous_converter<>(); + +/// @} + +/// \name Operations +/// Similar operators as the one shown are defined for the other +/// kernel traits geometric types `Point_3`, `Vector_2`... +/// @{ + +/*! +returns a `K2::Point_2` which coordinates are those of `p`, +converted by `RTConverter`. +*/ +K2::Point_2 operator()(const K1::Point_2&p); + +/// @} + +}; /* end Homogeneous_converter */ +} /* end namespace CGAL */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Iso_cuboid_3.h b/Kernel_23/doc/Kernel_23/CGAL/Iso_cuboid_3.h new file mode 100644 index 00000000000..21b2582ba1f --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/Iso_cuboid_3.h @@ -0,0 +1,221 @@ +namespace CGAL { +/*! +\ingroup PkgKernel23 + +An object \f$ s\f$ of the data type `Iso_cuboid_3` is a +cuboid in the Euclidean space \f$ \E^3\f$ with edges parallel to the \f$ x\f$, +\f$ y\f$ and \f$ z\f$ axis of the coordinate system. + +Although they are represented in a canonical form by only two +vertices, namely the lexicographically smallest and largest vertex +with respect to Cartesian \f$ xyz\f$ coordinates, we provide +functions for "accessing" the other vertices as well. + +Iso-oriented cuboids and bounding boxes are quite similar. The +difference however is that bounding boxes have always double coordinates, +whereas the coordinate type of an iso-oriented cuboid is chosen by +the user. + +\sa `Kernel::IsoCuboid_3` + +*/ +template< typename Kernel > +class Iso_cuboid_3 { +public: + +/// \name Creation +/// @{ + +/*! +introduces an iso-oriented cuboid `c` with diagonal +opposite vertices \f$ p\f$ and \f$ q\f$. Note that the object is +brought in the canonical form. +*/ +Iso_cuboid_3(const Point_3 &p, +const Point_3 &q); + +/*! +introduces an iso-oriented cuboid `c` with diagonal +opposite vertices \f$ p\f$ and \f$ q\f$. The `int` argument value +is only used to distinguish the two overloaded functions. +\pre \f$ p.x()<=q.x()\f$, \f$ p.y()<=q.y()\f$ and \f$ p.z()<=q.z()\f$. +*/ +Iso_cuboid_3(const Point_3 &p, +const Point_3 &q, int); + +/*! +introduces an iso-oriented cuboid `c` whose +minimal \f$ x\f$ coordinate is the one of `left`, the +maximal \f$ x\f$ coordinate is the one of `right`, the +minimal \f$ y\f$ coordinate is the one of `bottom`, the +maximal \f$ y\f$ coordinate is the one of `top`, the +minimal \f$ z\f$ coordinate is the one of `far`, the +maximal \f$ z\f$ coordinate is the one of `close`. +*/ +Iso_cuboid_3(const Point_3 &left, +const Point_3 &right, +const Point_3 &bottom, +const Point_3 &top, +const Point_3 &far, +const Point_3 &close); + +/*! +introduces an iso-oriented cuboid `c` with diagonal +opposite vertices +(`min_hx/hw`, `min_hy/hw`, `min_hz/hw`) and +(`max_hx/hw`, `max_hy/hw`, `max_hz/hw`). +\pre `hw` \f$ \neq\f$ 0. +*/ +Iso_cuboid_3( +const Kernel::RT& min_hx, const Kernel::RT& min_hy, const Kernel::RT& min_hz, +const Kernel::RT& max_hx, const Kernel::RT& max_hy, const Kernel::RT& max_hz, +const Kernel::RT& hw = RT(1)); + +/// @} + +/// \name Operations +/// @{ + +/*! +Test for equality: two iso-oriented cuboid are equal, iff their +lower left and their upper right vertices are equal. +*/ +bool operator==(const Iso_cuboid_3 &c2) const; + +/*! +Test for inequality. +*/ +bool operator!=(const Iso_cuboid_3 &c2) const; + +/*! +returns the i'th vertex modulo 8 of `c`. +starting with the lower left vertex. +*/ +Point_3 vertex(int i) const; + +/*! +returns `vertex(i)`, as indicated in the figure below: +\image html IsoCuboid.gif +*/ +Point_3 operator[](int i) const; + +/*! +returns the smallest vertex of `c` (= `vertex(0)`). +*/ +Point_3 min() const; + +/*! +returns the largest vertex of `c` (= `vertex(7)`). +*/ +Point_3 max() const; + +/*! +returns smallest Cartesian +\f$ x\f$-coordinate in `c`. +*/ +Kernel::FT xmin() const; + +/*! +returns smallest Cartesian +\f$ y\f$-coordinate in `c`. +*/ +Kernel::FT ymin() const; + +/*! +returns smallest Cartesian +\f$ z\f$-coordinate in `c`. +*/ +Kernel::FT zmin() const; + +/*! +returns largest Cartesian +\f$ x\f$-coordinate in `c`. +*/ +Kernel::FT xmax() const; + +/*! +returns largest Cartesian +\f$ y\f$-coordinate in `c`. +*/ +Kernel::FT ymax() const; + +/*! +returns largest Cartesian +\f$ z\f$-coordinate in `c`. +*/ +Kernel::FT zmax() const; + +/*! +returns \f$ i\f$-th Cartesian coordinate of +the smallest vertex of `c`. +\pre \f$ 0 \leq i \leq2\f$. +*/ +Kernel::FT min_coord(int i) const; + +/*! +returns \f$ i\f$-th Cartesian coordinate of +the largest vertex of `c`. +\pre \f$ 0 \leq i \leq2\f$. +*/ +Kernel::FT max_coord(int i) const; + +/// @} + +/// \name Predicates +/// @{ + +/*! +`c` is degenerate, if all vertices +are coplanar. +*/ +bool is_degenerate() const; + +/*! +returns either `ON_UNBOUNDED_SIDE`, +`ON_BOUNDED_SIDE`, or the constant +`ON_BOUNDARY`, +depending on where point \f$ p\f$ is. +*/ +Bounded_side bounded_side(const Point_3 &p) const; + +/*! + +*/ +bool has_on_boundary(const Point_3 &p) const; + +/*! + +*/ +bool has_on_bounded_side(const Point_3 &p) const; + +/*! + +*/ +bool has_on_unbounded_side(const Point_3 &p) const; + +/// @} + +/// \name Miscellaneous +/// @{ + +/*! +returns the volume of `c`. +*/ +Kernel::FT volume() const; + +/*! +returns a bounding box containing `c`. +*/ +Bbox_3 bbox() const; + +/*! +returns the iso-oriented cuboid obtained by applying \f$ t\f$ on +the smallest and the largest of `c`. +\pre The angle at a rotation must be a multiple of \f$ \pi/2\f$, otherwise the resulting cuboid does not have the same size. Note that rotating about an arbitrary angle can even result in a degenerate iso-oriented cuboid. +*/ +Iso_cuboid_3 transform(const Aff_transformation_3 &t) const; + +/// @} + +}; /* end Iso_cuboid_3 */ +} /* end namespace CGAL */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Iso_rectangle_2.h b/Kernel_23/doc/Kernel_23/CGAL/Iso_rectangle_2.h new file mode 100644 index 00000000000..59327ce8831 --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/Iso_rectangle_2.h @@ -0,0 +1,200 @@ +namespace CGAL { + +/*! +\ingroup PkgKernel23 + +An object \f$ s\f$ of the data type `Iso_rectangle_2` is a +rectangle in the Euclidean plane \f$ \E^2\f$ with sides parallel to the \f$ x\f$ and +\f$ y\f$ axis of the coordinate system. + +Although they are represented in a canonical form by only two +vertices, namely the lower left and the upper right vertex, we provide +functions for "accessing" the other vertices as well. The vertices +are returned in counterclockwise order. + +Iso-oriented rectangles and bounding boxes are quite similar. The +difference however is that bounding boxes have always double coordinates, +whereas the coordinate type of an iso-oriented rectangle is chosen by +the user. + +\sa `Kernel::IsoRectangle_2` + +*/ +template< typename Kernel > +class Iso_rectangle_2 { +public: + +/// \name Creation +/// @{ + +/*! +introduces an iso-oriented rectangle `r` with diagonal +opposite vertices \f$ p\f$ and \f$ q\f$. Note that the object is +brought in the canonical form. +*/ +Iso_rectangle_2(const Point_2 &p, +const Point_2 &q); + +/*! +introduces an iso-oriented rectangle `r` with diagonal +opposite vertices \f$ p\f$ and \f$ q\f$. The `int` argument value +is only used to distinguish the two overloaded functions. +\pre \f$ p.x()<=q.x()\f$ and \f$ p.y()<=q.y()\f$. +*/ +Iso_rectangle_2(const Point_2 &p, +const Point_2 &q, +int); + +/*! +introduces an iso-oriented rectangle `r` whose +minimal \f$ x\f$ coordinate is the one of `left`, the +maximal \f$ x\f$ coordinate is the one of `right`, the +minimal \f$ y\f$ coordinate is the one of `bottom`, the +maximal \f$ y\f$ coordinate is the one of `top`. +*/ +Iso_rectangle_2(const Point_2 &left, +const Point_2 &right, +const Point_2 &bottom, +const Point_2 &top); + +/*! +introduces an iso-oriented rectangle `r` with diagonal +opposite vertices (`min_hx/hw`, `min_hy/hw`) and +(`max_hx/hw`, `max_hy/hw`). +\pre `hw` \f$ \neq\f$ 0. +*/ +Iso_rectangle_2(const Kernel::RT& min_hx, const Kernel::RT& min_hy, +const Kernel::RT& max_hx, const Kernel::RT& max_hy, +const Kernel::RT& hw = RT(1)); + +/// @} + +/// \name Operations +/// @{ + +/*! +Test for equality: two iso-oriented rectangles are equal, iff their +lower left and their upper right vertices are equal. +*/ +bool operator==(const Iso_rectangle_2 &r2) const; + +/*! +Test for inequality. +*/ +bool operator!=(const Iso_rectangle_2 &r2) const; + +/*! +returns the i'th vertex modulo 4 of `r` in counterclockwise order, +starting with the lower left vertex. +*/ +Point_2 vertex(int i) const; + +/*! +returns `vertex(i)`. +*/ +Point_2 operator[](int i) const; + +/*! +returns the lower left vertex of `r` (= `vertex(0)`). +*/ +Point_2 min() const; + +/*! +returns the upper right vertex of `r` (= `vertex(2)`). +*/ +Point_2 max() const; + +/*! +returns the \f$ x\f$ coordinate of lower left vertex of `r`. +*/ +Kernel::FT xmin() const; + +/*! +returns the \f$ y\f$ coordinate of lower left vertex of `r`. +*/ +Kernel::FT ymin() const; + +/*! +returns the \f$ x\f$ coordinate of upper right vertex of `r`. +*/ +Kernel::FT xmax() const; + +/*! +returns the \f$ y\f$ coordinate of upper right vertex of `r`. +*/ +Kernel::FT ymax() const; + +/*! +returns the \f$ i\f$'th Cartesian coordinate of the +lower left vertex of `r`. +\pre \f$ 0 \leq i \leq1\f$. +*/ +Kernel::FT min_coord(int i) const; + +/*! +returns the \f$ i\f$'th Cartesian coordinate of the +upper right vertex of `r`. +\pre \f$ 0 \leq i \leq1\f$. +*/ +Kernel::FT max_coord(int i) const; + +/// @} + +/// \name Predicates +/// @{ + +/*! +`r` is degenerate, if all vertices +are collinear. +*/ +bool is_degenerate() const; + +/*! +returns either `ON_UNBOUNDED_SIDE`, +`ON_BOUNDED_SIDE`, or the constant +`ON_BOUNDARY`, +depending on where point \f$ p\f$ is. +*/ +Bounded_side bounded_side(const Point_2 &p) const; + +/*! + +*/ +bool has_on_boundary(const Point_2 &p) const; + +/*! + +*/ +bool has_on_bounded_side(const Point_2 &p) const; + +/*! + +*/ +bool has_on_unbounded_side(const Point_2 &p) const; + +/// @} + +/// \name Miscellaneous +/// @{ + +/*! +returns the area of `r`. +*/ +Kernel::FT area() const; + +/*! +returns a bounding box containing `r`. +*/ +Bbox bbox() const; + +/*! +returns the iso-oriented rectangle obtained by applying \f$ t\f$ on +the lower left and the upper right corner of `r`. +\pre The angle at a rotation must be a multiple of \f$ \pi/2\f$, otherwise the resulting rectangle does not have the same side length. Note that rotating about an arbitrary angle can even result in a degenerate iso-oriented rectangle. +*/ +Iso_rectangle_2 transform(const Aff_transformation_2 &t) const; + +/// @} + +}; /* end Iso_rectangle_2 */ +} /* end namespace CGAL */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Kernel_traits.h b/Kernel_23/doc/Kernel_23/CGAL/Kernel_traits.h new file mode 100644 index 00000000000..5d140a220e1 --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/Kernel_traits.h @@ -0,0 +1,46 @@ + +namespace CGAL { + +/*! +\ingroup PkgKernel23 + +The class `Kernel_traits` provides access to the kernel model to +which the argument type `T` belongs. (Provided `T` belongs to +some kernel model.) The default implementation assumes there is a +local type `T::Kernel` referring to the kernel model of `T`. +If this type does not exist, a specialization of `Kernel_traits` can be +used to provide the desired information. + +This class is, for example, useful in the following context. Assume +you want to write a generic function that accepts two points \f$ p\f$ and +\f$ q\f$ as argument and constructs the line segment between \f$ p\f$ and \f$ q\f$. +In order to specify the return type of this function, you need to know +what is the segment type corresponding to the Point type representing +\f$ p\f$ and \f$ q\f$. Using `Kernel_traits`, this can be done as follows. + +\code +template < class Point > +typename Kernel_traits::Kernel::Segment +construct_segment(Point p, Point q) +{ ... } +\endcode + +*/ +template< typename T > +class Kernel_traits { +public: + +/// \name Types +/// @{ + +/*! +If `T` is a type +`K::Point_2` of some kernel model `K`, then `Kernel` is +equal to `K`. +*/ +typedef T::R Kernel; + +/// @} + +}; /* end Kernel_traits */ +} /* end namespace CGAL */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Line_2.h b/Kernel_23/doc/Kernel_23/CGAL/Line_2.h new file mode 100644 index 00000000000..428b6019c14 --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/Line_2.h @@ -0,0 +1,230 @@ +/*! +\ingroup PkgKernel23 + +An object `l` of the data type `Line_2` is a directed +straight line in the two-dimensional Euclidean plane \f$ \E^2\f$. It is +defined by the set of points with Cartesian coordinates \f$ (x,y)\f$ +that satisfy the equation + +\f[ l:\; a\, x +b\, y +c = 0. \f] + +The line splits \f$ \E^2\f$ in a positive and a negative +side. A point \f$ p\f$ with Cartesian coordinates +\f$ (px, py)\f$ is on the positive side of `l`, iff +\f$ a\, px + b\, py +c > 0\f$, it is +on the negative side of `l`, iff +\f$ a\, px + b\, py +c < 0\f$. +The positive side is to the left of `l`. + +Example +-------------- + +Let us first define two Cartesian two-dimensional points in the Euclidean +plane \f$ \E^2\f$. Their +dimension and the fact that they are Cartesian is expressed by +the suffix `_2` and the representation type `Cartesian`. + +
[cccbegin] 
+
+Point_2< Cartesian > p(1.0,1.0), q(4.0,7.0); 
+
+ +To define a line \f$ l\f$ we write: + +
 
+
+Line_2< Cartesian > l(p,q); 
+
+ +\sa `Kernel::Line_2` + +*/ +template< typename Kernel > +class Line_2 { +public: + +/// \name Creation +/// @{ + +/*! +introduces a line `l` with the line equation in Cartesian +coordinates \f$ ax +by +c = 0\f$. +*/ +Line_2(const Kernel::RT &a, const Kernel::RT &b, const Kernel::RT &c); + +/*! +introduces a line `l` passing through the points \f$ p\f$ and \f$ q\f$. +Line `l` is directed from \f$ p\f$ to \f$ q\f$. +*/ +Line_2(const Point_2 &p, const Point_2 &q); + +/*! +introduces a line `l` passing through point \f$ p\f$ with +direction \f$ d\f$. +*/ +Line_2(const Point_2 &p, const Direction_2&d); + +/*! +introduces a line `l` passing through point \f$ p\f$ and +oriented by \f$ v\f$. +*/ +Line_2(const Point_2 &p, const Vector_2&v); + +/*! +introduces a line `l` supporting the segment \f$ s\f$, +oriented from source to target. +*/ +Line_2(const Segment_2 &s); + +/*! +introduces a line `l` supporting the ray \f$ r\f$, +with same orientation. +*/ +Line_2(const Ray_2 &r); + +/// @} + +/// \name Operations +/// @{ + +/*! +Test for equality: two lines are equal, iff they have a non +empty intersection and the same direction. +*/ +bool operator==(const Line_2 &h) const; + +/*! +Test for inequality. +*/ +bool operator!=(const Line_2 &h) const; + +/*! +returns the first coefficient of \f$ l\f$. +*/ +Kernel::RT a() const; + +/*! +returns the second coefficient of \f$ l\f$. +*/ +Kernel::RT b() const; + +/*! +returns the third coefficient of \f$ l\f$. +*/ +Kernel::RT c() const; + +/*! +returns an arbitrary point on `l`. It holds +`point(i) == point(j)`, iff `i==j`. +Furthermore, `l` is directed from `point(i)` +to `point(j)`, for all `i` \f$ <\f$ `j`. +*/ +Point_2 point(int i) const; + +/*! +returns the orthogonal projection of \f$ p\f$ onto `l`. +*/ +Point_2 projection(const Point_2 &p) const; + +/*! +returns the \f$ x\f$-coordinate of the point at `l` with +given \f$ y\f$-coordinate. +\pre `l` is not horizontal. +*/ +Kernel::FT x_at_y(const Kernel::FT &y) const; + +/*! +returns the \f$ y\f$-coordinate of the point at `l` with +given \f$ x\f$-coordinate. +\pre `l` is not vertical. +*/ +Kernel::FT y_at_x(const Kernel::FT &x) const; + +/// @} + +/// \name Predicates +/// @{ + +/*! +line `l` is degenerate, if the coefficients `a` and +`b` of the line equation are zero. +*/ +bool is_degenerate() const; + +/*! + +*/ +bool is_horizontal() const; + +/*! + +*/ +bool is_vertical() const; + +/*! +returns `ON_ORIENTED_BOUNDARY`, +`ON_NEGATIVE_SIDE`, or the constant +`ON_POSITIVE_SIDE`, +depending on the position of \f$ p\f$ relative to the oriented line `l`. + +*/ +Oriented_side oriented_side(const Point_2 &p) const; + +/// @} + +/// \name Convenience Boolean Functions +/// @{ + +/*! + +*/ +bool has_on(const Point_2 &p) const; + +/*! + +*/ +bool has_on_positive_side(const Point_2 &p) const; + +/*! + +*/ +bool has_on_negative_side(const Point_2 &p) const; + +/// @} + +/// \name Miscellaneous +/// @{ + +/*! +returns a vector having the direction of `l`. +*/ +Vector_2 to_vector() const; + +/*! +returns the direction of `l`. +*/ +Direction_2 direction() const; + +/*! +returns the line with opposite direction. +*/ +Line_2 opposite() const; + +/*! +returns the line perpendicular to `l` and passing through \f$ p\f$, +where the direction is the direction of `l` rotated +counterclockwise by 90 degrees. +*/ +Line_2 perpendicular(const Point_2 &p) const; + +/*! +returns the line obtained by applying \f$ t\f$ on a point on `l` +and the direction of `l`. +*/ +Line_2 transform(const Aff_transformation_2 &t) const; + +/// @} + +}; /* end Line_2 */ +} /* end namespace CGAL */ + diff --git a/Kernel_23/doc/Kernel_23/CGAL/Line_3.h b/Kernel_23/doc/Kernel_23/CGAL/Line_3.h new file mode 100644 index 00000000000..e0c6f4c1b8d --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/Line_3.h @@ -0,0 +1,125 @@ +namespace CGAL { + +/*! +\ingroup PkgKernel23 + +An object `l` of the data type `Line_3` is a directed +straight line in the three-dimensional Euclidean space \f$ \E^3\f$. + +\sa `Kernel::Line_3` + +*/ +template< typename Kernel > +class Line_3 { +public: + +/// \name Creation +/// @{ + +/*! +introduces a line `l` passing through the points \f$ p\f$ and \f$ q\f$. +Line `l` is directed from \f$ p\f$ to \f$ q\f$. +*/ +Line_3(const Point_3 &p, const Point_3 &q); + +/*! +introduces a line `l` passing through point \f$ p\f$ with +direction \f$ d\f$. +*/ +Line_3(const Point_3 &p, const Direction_3&d); + +/*! +introduces a line `l` passing through point \f$ p\f$ and +oriented by \f$ v\f$. +*/ +Line_3(const Point_3 &p, const Vector_3&v); + +/*! +returns the line supporting the segment \f$ s\f$, +oriented from source to target. +*/ +Line_3(const Segment_3 &s); + +/*! +returns the line supporting the ray \f$ r\f$, with the +same orientation. +*/ +Line_3(const Ray_3 &r); + +/// @} + +/// \name Operations +/// @{ + +/*! +Test for equality: two lines are equal, iff they have a non +empty intersection and the same direction. +*/ +bool operator==(const Line_3 &h) const; + +/*! +Test for inequality. +*/ +bool operator!=(const Line_3 &h) const; + +/*! +returns the orthogonal projection of \f$ p\f$ on `l`. +*/ +Point_3 projection(const Point_3 &p) const; + +/*! +returns an arbitrary point on `l`. It holds +`point(i) = point(j)`, iff `i=j`. +*/ +Point_3 point(int i) const; + +/// @} + +/// \name Predicates +/// @{ + +/*! +returns `true` iff line `l` is degenerated to a point. +*/ +bool is_degenerate() const; + +/*! +returns `true` iff `p` lies on `l`. +*/ +bool has_on(const Point_3 &p) const; + +/// @} + +/// \name Miscellaneous +/// @{ + +/*! +returns the plane perpendicular to `l` passing through \f$ p\f$. +*/ +Plane_3 perpendicular_plane(const Point_3 &p) const; + +/*! +returns the line with opposite direction. +*/ +Line_3 opposite() const; + +/*! +returns a vector having the same direction as `l`. +*/ +Vector_3 to_vector() const; + +/*! +returns the direction of `l`. +*/ +Direction_3 direction() const; + +/*! +returns the line obtained by applying \f$ t\f$ on a point on `l` +and the direction of `l`. +*/ +Line_3 transform(const Aff_transformation_3 &t) const; + +/// @} + +}; /* end Line_3 */ +} /* end namespace CGAL */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Origin.h b/Kernel_23/doc/Kernel_23/CGAL/Origin.h new file mode 100644 index 00000000000..4e158e9df43 --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/Origin.h @@ -0,0 +1,64 @@ + +namespace CGAL { + +/*! +\ingroup PkgKernel23 + +\cgal defines a symbolic constant +`NULL_VECTOR` to construct zero length vectors. +`Null_vector` is the type of this constant. + +\sa `CGAL::Vector_2` +\sa `CGAL::Vector_3` + +*/ + +class Null_vector { +public: +}; /* end Null_vector */ +} /* end namespace CGAL */ + +namespace CGAL { + +/*! +\ingroup PkgKernel23 + +\cgal defines a symbolic constant +`ORIGIN` which denotes the point at the origin. +`Origin` is the type of this constant. +It is used in the conversion between points and vectors. + +\sa `CGAL::Point_2` +\sa `CGAL::Point_3` +\sa `CGAL::Vector_2` +\sa `CGAL::Vector_3` +\sa `CGAL::operator+` +\sa `CGAL::operator-` + +*/ + +class Origin { +public: +}; /* end Origin */ + +/*! +A symbolic constant which denotes the point at the origin. This +constant is used in the conversion between points and vectors. + +Example +-------------- + +\code +Point_2< Cartesian > p(1.0, 1.0), q; +Vector2< Cartesian > v; +v = p - ORIGIN; +q = ORIGIN + v; +assert( p == q ); +\endcode + +\sa `CGAL::Point_2` +\sa `CGAL::Point_3` +*/ +const Origin ORIGIN; + +} /* end namespace CGAL */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Plane_3.h b/Kernel_23/doc/Kernel_23/CGAL/Plane_3.h new file mode 100644 index 00000000000..e3a636e188a --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/Plane_3.h @@ -0,0 +1,259 @@ +namespace CGAL { +/*! +\ingroup PkgKernel23 + +An object `h` of the data type `Plane_3` is an oriented +plane in the three-dimensional Euclidean space \f$ \E^3\f$. It is defined +by the set of points with Cartesian coordinates \f$ (x,y,z)\f$ that satisfy +the plane equation + +\f[h :\; a\, x +b\, y +c\, z + d = 0.\f] + +The plane splits \f$ \E^3\f$ in a positive and a negative side. +A point \f$ p\f$ with Cartesian coordinates \f$ (px, py, pz)\f$ is on the +positive side of `h`, iff \f$ a\, px +b\, py +c\, pz + d > 0\f$. +It is on the negative side, iff \f$ a\, px +b\, py\, +c\, pz + d < 0\f$. + +\sa `Kernel::Plane_3` + +*/ +template< typename Kernel > +class Plane_3 { +public: + +/// \name Creation +/// @{ + +/*! +creates a plane `h` defined by the equation +\f$ a\, px +b\, py +c\, pz + d = 0\f$. +Notice that `h` is degenerate if +\f$ a = b = c = 0\f$. +*/ +Plane_3(const Kernel::RT &a, +const Kernel::RT &b, +const Kernel::RT &c, +const Kernel::RT &d); + +/*! +creates a plane `h` passing through the points `p`, +`q` and `r`. The plane is oriented such that `p`, +`q` and `r` are oriented in a positive sense +(that is counterclockwise) when seen from the positive side of `h`. +Notice that `h` is degenerate if the points are collinear. +*/ +Plane_3(const Point_3 &p, +const Point_3 &q, +const Point_3 &r); + +/*! +introduces a plane `h` that passes through point `p` and +that is orthogonal to `v`. +*/ +Plane_3(const Point_3 &p, +const Vector_3 &v); + +/*! +introduces a plane `h` that passes through point `p` and +that has as an orthogonal direction equal to `d`. +*/ +Plane_3(const Point_3 &p, +const Direction_3&d); + +/*! +introduces a plane `h` that is defined through the three points +`l.point(0)`, `l.point(1)` and `p`. +*/ +Plane_3(const Line_3 &l, +const Point_3 &p); + +/*! +introduces a plane `h` that is defined through the three points +`r.point(0)`, `r.point(1)` and `p`. +*/ +Plane_3(const Ray_3 &r, +const Point_3 &p); + +/*! +introduces a plane `h` that is defined through the three points +`s.source()`, `s.target()` and `p`. +*/ +Plane_3(const Segment_3 &s, +const Point_3 &p); + +/*! +introduces a plane `h` that is defined as the plane containing +the circle. +*/ +Plane_3(const Circle_3 &c); + +/// @} + +/// \name Operations +/// @{ + +/*! +Test for equality: two planes are equal, iff they have a non +empty intersection and the same orientation. +*/ +bool operator==(const Plane_3 &h2) const; + +/*! +Test for inequality. +*/ +bool operator!=(const Plane_3 &h2) const; + +/*! +returns the first coefficient of `h`. +*/ +Kernel::RT a() const; + +/*! +returns the second coefficient of `h`. +*/ +Kernel::RT b() const; + +/*! +returns the third coefficient of `h`. +*/ +Kernel::RT c() const; + +/*! +returns the fourth coefficient of `h`. +*/ +Kernel::RT d() const; + +/*! +returns the line that is perpendicular to `h` and that +passes through point `p`. The line is oriented from +the negative to the positive side of `h`. +*/ +Line_3 perpendicular_line(const Point_3 &p) const; + +/*! +returns the orthogonal projection of \f$ p\f$ on `h`. +*/ +Point_3 projection(const Point_3 &p) const; + +/*! +returns the plane with opposite orientation. +*/ +Plane_3 opposite() const; + +/*! +returns an arbitrary point on `h`. +*/ +Point_3 point() const; + +/*! +returns a vector that is orthogonal to `h` and that +is directed to the positive side of `h`. +*/ +Vector_3 orthogonal_vector() const; + +/*! +returns the direction that is orthogonal to `h` and that +is directed to the positive side of `h`. +*/ +Direction_3 orthogonal_direction() const; + +/*! +returns a vector orthogonal to +`orthogonal_vector()`. +*/ +Vector_3 base1() const; + +/*! +returns a vector that is both orthogonal to `base1()`, +and to `orthogonal_vector()`, and such that the result of +`orientation( point(), point() + base1(), point()+base2(), point() + orthogonal_vector() )` is positive. +*/ +Vector_3 base2() const; + +/// @} + +/// \name 2D Conversion +/// The following functions provide conversion between a plane and +/// \cgal's two-dimensional space. The transformation is affine, but +/// not necessarily an isometry. This means, the transformation +/// preserves combinatorics, but not distances. +/// @{ + +/*! +returns the image point of the projection of `p` +under an affine transformation, which maps `h` onto the +\f$ xy\f$-plane, with the \f$ z\f$-coordinate removed. +*/ +Point_2 to_2d(const Point_3 &p) const; + +/*! +returns a point \f$ q\f$, such that `to_2d( to_3d( p ))` +is equal to `p`. +*/ +Point_3 to_3d(const Point_2 &p) const; + +/// @} + +/// \name Predicates +/// @{ + +/*! +returns either `ON_ORIENTED_BOUNDARY`, or +the constant `ON_POSITIVE_SIDE`, or the constant +`ON_NEGATIVE_SIDE`, +determined by the position of \f$ p\f$ relative to the oriented plane `h`. + +*/ +Oriented_side oriented_side(const Point_3 &p) const; + +/// @} + +/// \name Convenience Boolean Functions +/// @{ + +/*! + +*/ +bool has_on(const Point_3 &p) const; + +/*! + +*/ +bool has_on_positive_side(const Point_3 &p) const; + +/*! + +*/ +bool has_on_negative_side(const Point_3 &p) const; + +/*! + +*/ +bool has_on(const Line_3 &l) const; + +/*! + +*/ +bool has_on(const Circle_3 &l) const; + +/*! +Plane `h` is degenerate, if the coefficients `a`, +`b`, and `c` of the plane equation are zero. +*/ +bool is_degenerate() const; + +/// @} + +/// \name Miscellaneous +/// @{ + +/*! +returns the plane obtained by applying \f$ t\f$ on a point of `h` +and the orthogonal direction of `h`. +*/ +Plane_3 transform(const Aff_transformation_3 &t) const; + +/// @} + +}; /* end Plane_3 */ +} /* end namespace CGAL */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Point_2.h b/Kernel_23/doc/Kernel_23/CGAL/Point_2.h new file mode 100644 index 00000000000..6b2f2fcd78b --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/Point_2.h @@ -0,0 +1,255 @@ +namespace CGAL { + +/*! +\ingroup PkgKernel23 + +An object of the class `Point_2` is a point in the two-dimensional +Euclidean plane \f$ \E^2\f$. + +Remember that `Kernel::RT` and `Kernel::FT` denote a +`RingNumberType` and a `FieldNumberType`, respectively. For the kernel +model `Cartesian`, the two types are the same. For the +kernel model `Homogeneous`, `Kernel::RT` is equal +to `T`, and `Kernel::FT` is equal to +`Quotient`. + +Operators +-------------- + +The following operations can be applied on points: + +Example +-------------- + +The following declaration creates two points with +Cartesian double coordinates. + +
 
+
+Point_2< Cartesian > p, q(1.0, 2.0); 
+
+ +The variable p is uninitialized and should first be used on +the left hand side of an assignment. +
 
+
+p = q; 
+
+std::cout << p.x() << " " << p.y() << std::endl; 
+[cccend]
+ +\sa `Kernel::Point_2` + +*/ +template< typename Kernel > +class Point_2 { +public: + +/// \name Types +/// @{ + +/*! +An iterator for enumerating the +Cartesian coordinates of a point. +*/ +typedef Hidden_type Cartesian_const_iterator; + +/// @} + +/// \name Creation +/// @{ + +/*! +introduces a variable `p` with Cartesian coordinates +\f$ (0,0)\f$. +*/ +Point_2(const Origin &ORIGIN); + +/*! +introduces a point `p` initialized to \f$ (x,y)\f$. +*/ +Point_2(int x, int y); + +/*! +introduces a point `p` initialized to \f$ (x,y)\f$ +provided `RT` supports construction from `double`. +*/ +Point_2(double x, double y); + +/*! +introduces a point `p` initialized to \f$ (hx/hw,hy/hw)\f$. +\pre `hw` \f$ \neq\f$ `Kernel::RT(0)`. +*/ +Point_2(const Kernel::RT &hx, const Kernel::RT &hy, const Kernel::RT &hw = RT(1)); + +/*! +introduces a point `p` initialized to \f$ (x,y)\f$. +*/ +Point_2(const Kernel::FT &x, const Kernel::FT &y); + +/// @} + +/// \name Operations +/// @{ + +/*! +Test for equality. Two points are equal, iff their \f$ x\f$ and \f$ y\f$ +coordinates are equal. The point can be compared with `ORIGIN`. +*/ +bool operator==(const Point_2 &q) const; + +/*! +Test for inequality. The point can be compared with `ORIGIN`. +*/ +bool operator!=(const Point_2 &q) const; + +/// @} + +/// \name Coordinate Access +/// There are two sets of coordinate access functions, namely to the +/// homogeneous and to the Cartesian coordinates. They can be used +/// independently from the chosen kernel model. Note that you do not +/// loose information with the homogeneous representation, because the +/// `FieldNumberType` is a quotient. +/// @{ + +/*! +returns the homogeneous \f$ x\f$ coordinate. +*/ +Kernel::RT hx() const; + +/*! +returns the homogeneous \f$ y\f$ coordinate. +*/ +Kernel::RT hy() const; + +/*! +returns the homogenizing coordinate. +*/ +Kernel::RT hw() const; + +/*! +returns the Cartesian \f$ x\f$ coordinate, that is \f$ hx/hw\f$. +*/ +Kernel::FT x() const; + +/*! +returns the Cartesian \f$ y\f$ coordinate, that is \f$ hy/hw\f$. +*/ +Kernel::FT y() const; + +/// @} + +/// \name Convenience Operations +/// The following operations are for convenience and for compatibility +/// with higher dimensional points. Again they come in a Cartesian and +/// in a homogeneous flavor. +/// @{ + +/*! +returns the i'th homogeneous coordinate of `p`, starting with 0. +\pre \f$ 0\leq i \leq2\f$. +*/ +Kernel::RT homogeneous(int i) const; + +/*! +returns the i'th Cartesian coordinate of `p`, starting with 0. +\pre \f$ 0\leq i \leq1\f$. +*/ +Kernel::FT cartesian(int i) const; + +/*! +returns `cartesian(i)`. +\pre \f$ 0\leq i \leq1\f$. +*/ +Kernel::FT operator[](int i) const; + +/*! +returns an iterator to the Cartesian coordinates +of `p`, starting with the 0th coordinate. +*/ +Cartesian_const_iterator cartesian_begin() const; + +/*! +returns an off the end iterator to the Cartesian +coordinates of `p`. +*/ +Cartesian_const_iterator cartesian_end() const; + +/*! +returns the dimension (the constant 2). +*/ +int dimension() const; + +/*! +returns a bounding box containing `p`. Note that bounding boxes +are not parameterized with whatsoever. +*/ +Bbox_2 bbox() const; + +/*! +returns the point obtained by applying \f$ t\f$ on `p`. +*/ +Point_2 transform(const Aff_transformation_2 &t) const; + +/// @} + +}; /* end Point_2 */ + + +/*! +returns true iff `p` is lexicographically smaller than `q`, +i.e. either if `p.x() < q.x()` or if `p.x() == q.x()` and +`p.y() < q.y()`. +\relates Point_2 +*/ +bool operator<(const Point_2 &p, +const Point_2 &q); + +/*! +returns true iff `p` is lexicographically greater than `q`. +\relates Point_2 +*/ +bool operator>(const Point_2 &p, +const Point_2 &q); + +/*! +returns true iff `p` is lexicographically smaller or equal to `q`. +\relates Point_2 +*/ +bool operator<=(const Point_2 &p, +const Point_2 &q); + +/*! +returns true iff `p` is lexicographically greater or equal to `q`. +\relates Point_2 +*/ +bool operator>=(const Point_2 &p, +const Point_2 &q); + +/*! +returns the difference vector between `q` and `p`. +You can substitute `ORIGIN` for either `p` or `q`, +but not for both. +\relates Point_2 +*/ +Vector_2 operator-(const Point_2 &p, +const Point_2 &q); + +/*! +returns the point obtained by translating `p` by the +vector `v`. +\relates Point_2 +*/ +Point_2 operator+(const Point_2 &p, +const Vector_2 &v); + +/*! +returns the point obtained by translating `p` by the +vector -`v`. +\relates Point_2 +*/ +Point_2 operator-(const Point_2 &p, +const Vector_2 &v); + +} /* end namespace CGAL */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Point_3.h b/Kernel_23/doc/Kernel_23/CGAL/Point_3.h new file mode 100644 index 00000000000..c881ae2abcc --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/Point_3.h @@ -0,0 +1,244 @@ +namespace CGAL { + +/*! +\ingroup PkgKernel23 + +An object of the class `Point_3` is a point in the three-dimensional +Euclidean space \f$ \E^3\f$. + +Remember that `Kernel::RT` and `Kernel::FT` denote a +RingNumberType and a FieldNumberType, respectively. For the kernel +model `Cartesian`, the two types are the same. For the +kernel model `Homogeneous`, `Kernel::RT` is equal +to `T`, and `Kernel::FT` is equal to +`Quotient`. + +Operators +-------------- + +The following operations can be applied on points: + +\sa `Kernel::Point_3` + +*/ +template< typename Kernel > +class Point_3 { +public: + +/// \name Types +/// @{ + +/*! +An iterator for enumerating the +Cartesian coordinates of a point. +*/ +typedef Hidden_type Cartesian_const_iterator; + +/// @} + +/// \name Creation +/// @{ + +/*! +introduces a point with Cartesian coordinates\f$ (0,0,0)\f$. +*/ +Point_3(const Origin &ORIGIN); + +/*! +introduces a point `p` initialized to \f$ (x,y,z)\f$. +*/ +Point_3(int x, int y, int z); + +/*! +introduces a point `p` initialized to \f$ (x,y,z)\f$ +provided `RT` supports it. +*/ +Point_3(double x, double y, double z); + +/*! +introduces a point `p` initialized to \f$ (hx/hw,hy/hw, hz/hw)\f$. +\pre `hw` \f$ \neq\f$ 0. +*/ +Point_3(const Kernel::RT &hx, const Kernel::RT &hy, const Kernel::RT &hz, const Kernel::RT &hw = RT(1)); + +/*! +introduces a point `p` initialized to \f$ (x,y,z)\f$. +*/ +Point_3(const Kernel::FT &x, const Kernel::FT &y, const Kernel::FT &z); + +/// @} + +/// \name Operations +/// @{ + +/*! +Test for equality: Two points are equal, iff their \f$ x\f$, \f$ y\f$ and \f$ z\f$ +coordinates are equal. +*/ +bool operator==(const Point_3 &q) const; + +/*! +Test for inequality. +*/ +bool operator!=(const Point_3 &q) const; + +/// @} + +/// \name Coordinate Access +/// There are two sets of coordinate access functions, namely to the +/// homogeneous and to the Cartesian coordinates. They can be used +/// independently from the chosen kernel model. Note that you do not +/// loose information with the homogeneous representation, because the +/// FieldNumberType is a quotient. +/// @{ + +/*! +returns the homogeneous \f$ x\f$ coordinate. +*/ +Kernel::RT hx() const; + +/*! +returns the homogeneous \f$ y\f$ coordinate. +*/ +Kernel::RT hy() const; + +/*! +returns the homogeneous \f$ z\f$ coordinate. +*/ +Kernel::RT hz() const; + +/*! +returns the homogenizing coordinate. +*/ +Kernel::RT hw() const; + +/*! +returns the Cartesian \f$ x\f$ coordinate, that is \f$ hx/hw\f$. +*/ +Kernel::FT x() const; + +/*! +returns the Cartesian \f$ y\f$ coordinate, that is \f$ hy/hw\f$. +*/ +Kernel::FT y() const; + +/*! +returns the Cartesian \f$ z\f$ coordinate, that is \f$ hz/hw\f$. +*/ +Kernel::FT z() const; + +/// @} + +/// \name Convenience Operators +/// The following operations are for convenience and for compatibility +/// with code for higher dimensional points. Again they come in a +/// Cartesian and in a homogeneous flavor. +/// @{ + +/*! +returns the i'th homogeneous coordinate of `p`, starting with 0. +\pre \f$ 0\leq i \leq3\f$. +*/ +Kernel::RT homogeneous(int i) const; + +/*! +returns the i'th Cartesian coordinate of `p`, starting with 0. +\pre \f$ 0\leq i \leq2\f$. +*/ +Kernel::FT cartesian(int i) const; + +/*! +returns `cartesian(i)`. +\pre \f$ 0\leq i \leq2\f$. +*/ +Kernel::FT operator[](int i) const; + +/*! +returns an iterator to the Cartesian coordinates +of `p`, starting with the 0th coordinate. +*/ +Cartesian_const_iterator cartesian_begin() const; + +/*! +returns an off the end iterator to the Cartesian +coordinates of `p`. +*/ +Cartesian_const_iterator cartesian_end() const; + +/*! +returns the dimension (the constant 3). +*/ +int dimension() const; + +/*! +returns a bounding box containing `p`. +*/ +Bbox_3 bbox() const; + +/*! +returns the point obtained by applying \f$ t\f$ on `p`. +*/ +Point_3 transform(const Aff_transformation_3 &t) const; + +/// @} + +}; /* end Point_3 */ + +/*! +returns true iff `p` is lexicographically smaller than `q` +(the lexicographical order being defined on the Cartesian +coordinates). +\relates Point_3 +*/ +bool operator<(const Point_3 &p, +const Point_3 &q); + +/*! +returns true iff `p` is lexicographically greater than `q`. +\relates Point_3 +*/ +bool operator>(const Point_3 &p, +const Point_3 &q); + +/*! +returns true iff `p` is lexicographically smaller or equal to +`q`. +\relates Point_3 +*/ +bool operator<=(const Point_3 &p, +const Point_3 &q); + +/*! +returns true iff `p` is lexicographically greater or equal to +`q`. +\relates Point_3 +*/ +bool operator>=(const Point_3 &p, +const Point_3 &q); + +/*! +returns the difference vector between `q` and `p`. +You can substitute `ORIGIN` for either `p` or `q`, +but not for both. +\relates Point_3 +*/ +Vector_3 operator-(const Point_3 &p, +const Point_3 &q); + +/*! +returns the point obtained by translating `p` by the +vector `v`. +\relates Point_3 +*/ +Point_3 operator+(const Point_3 &p, +const Vector_3 &v); + +/*! +returns the point obtained by translating `p` by the +vector -`v`. +\relates Point_3 +*/ +Point_3 operator-(const Point_3 &p, +const Vector_3 &v); + +} /* end namespace CGAL */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Projection_traits_xy_3.h b/Kernel_23/doc/Kernel_23/CGAL/Projection_traits_xy_3.h new file mode 100644 index 00000000000..12515d1b1a3 --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/Projection_traits_xy_3.h @@ -0,0 +1,124 @@ + +namespace CGAL { + +/*! +\ingroup PkgKernel23 + +The class `Projection_traits_xy_3` is an adapter to apply 2D algorithms to the projections of 3D data on the `xy`-plane. + +\cgal provides also predefined geometric traits classes +`Projection_traits_yz_3` and +`Projection_traits_xz_3` to +deal with projections on the +`zx`- and the `zy`-plane, +respectively. + +Parameters +-------------- + +The template parameter `K` has to +be instantiated by a model of the `Kernel` concept. +`Projection_traits_xy_3` uses types +and predicates defined in `K`. + +\models The class is a model of several 2D triangulation traits class concepts, + except that it does not provide the type and constructors + required to build the dual Voronoi diagram. +\models ::PolygonTraits_2 +\models ::ConvexHullTraits_2 +\models ::TriangulationTraits_2 +\models ::DelaunayTriangulationTraits_2 +\models ::ConstrainedTriangulationTraits_2 +\models ::PolygonTraits_2 +\models ::ConvexHullTraits_2 + +*/ +template< typename K > +class Projection_traits_xy_3 { +public: + +/// \name Types +/// @{ + +/*! + +*/ +typedef Point_3 Point_2; + +/*! + +*/ +typedef Segment_3 Segment_2; + +/*! + +*/ +typedef Triangle_3 Triangle_2; + +/*! + +*/ +typedef Line_3 Line_2; + +/*! + +*/ +typedef K::Object_3 Object_2; + +/// @} + +/// \name Functors +/// The functors provided by this class are those listed in the +/// concepts, except that it does not provide the type and +/// constructors required to build the dual Voronoi diagram. The +/// functors operate on the 2D projection of their arguments. They +/// come with preconditions that projections of the arguments are +/// non-degenerate, eg. a line segment does not project on a single +/// point, two points do not project on the same point, etc. In the +/// following, we specify the choice of the `z`-coordinate in case a +/// new point is constructed. +/// @{ + +/*! +A construction object. +Provides the operator : + +`Object_2 operator()(Segment_2 s1, Segment_2 s2);` +which returns a 3D object whose projection on the xy-plane +is the intersection of the projections of `s1` and `s2`. +If non empty, the returned object is either a segment or a point. +Its embedding in 3D is computed as the interpolation +between `s1` and `s2`, +meaning that any point `p` of the returned object +is the midpoint of segment `p1p2` where `p1` and `p2` are the two points of `s1` and `s2` respectively, both projecting on `p`. +\pre The projection of `s1` and the projection of `s2` are non-degenerate `2D` segments. + +*/ +typedef Hidden_type Intersect_2; + +/// @} + +/// \name Creation +/// @{ + +/*! + +default constructor. +*/ +Projection_traits_xy_3(); + +/*! +Copy constructor. +*/ +Projection_traits_xy_3( +Projection_traits_xy_3 tr); + +/*! +Assignment operator. +*/ +Projection_traits_xy_3 operator=(Projection_traits_xy_3 tr); + +/// @} + +}; /* end Projection_traits_xy_3 */ +} /* end namespace CGAL */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Ray_2.h b/Kernel_23/doc/Kernel_23/CGAL/Ray_2.h new file mode 100644 index 00000000000..960ca969409 --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/Ray_2.h @@ -0,0 +1,141 @@ +namespace CGAL { + +/*! +\ingroup PkgKernel23 + +An object `r` of the data type `Ray_2` is a directed +straight ray in the two-dimensional Euclidean plane \f$ \E^2\f$. It starts +in a point called the source of `r` and goes to infinity. + +\sa `Kernel::Ray_2` + +*/ +template< typename Kernel > +class Ray_2 { +public: + +/// \name Creation +/// @{ + +/*! +introduces a ray `r` +with source \f$ p\f$ and passing through point \f$ q\f$. +*/ +Ray_2(const Point_2 &p, const Point_2&q); + +/*! +introduces a ray `r` starting at source \f$ p\f$ with +direction \f$ d\f$. +*/ +Ray_2(const Point_2 &p, const Direction_2 &d); + +/*! +introduces a ray `r` starting at source \f$ p\f$ with +the direction of \f$ v\f$. +*/ +Ray_2(const Point_2 &p, const Vector_2 &v); + +/*! +introduces a ray `r` starting at source \f$ p\f$ with +the same direction as \f$ l\f$. +*/ +Ray_2(const Point_2 &p, const Line_2 &l); + +/// @} + +/// \name Operations +/// @{ + +/*! +Test for equality: two rays are equal, iff they have the same +source and the same direction. +*/ +bool operator==(const Ray_2 &h) const; + +/*! +Test for inequality. +*/ +bool operator!=(const Ray_2 &h) const; + +/*! +returns the source of `r`. +*/ +Point_2 source() const; + +/*! +returns a point on `r`. `point(0)` is the source, +`point(i)`, with \f$ i>0\f$, is different from the +source. \pre \f$ i \geq0\f$. +*/ +Point_2 point(int i) const; + +/*! +returns the direction of `r`. +*/ +Direction_2 direction() const; + +/*! +returns a vector giving the direction of `r`. +*/ +Vector_2 to_vector() const; + +/*! +returns the line supporting `r` which has the same direction. +*/ +Line_2 supporting_line() const; + +/*! +returns the ray with the same source and the opposite direction. +*/ +Ray_2 opposite() const; + +/// @} + +/// \name Predicates +/// @{ + +/*! +ray `r` is degenerate, if the source and the second defining +point fall together (that is if the direction is degenerate). +*/ +bool is_degenerate() const; + +/*! + +*/ +bool is_horizontal() const; + +/*! + +*/ +bool is_vertical() const; + +/*! +A point is on `r`, iff it is equal to the source +of `r`, or if it is in the interior of `r`. +*/ +bool has_on(const Point_2 &p) const; + +/*! +checks if point \f$ p\f$ is on `r`. This function is faster +than function `has_on()` if the precondition +checking is disabled. +\pre \f$ p\f$ is on the supporting line of `r`. +*/ +bool collinear_has_on(const Point_2 &p) const; + +/// @} + +/// \name Miscellaneous +/// @{ + +/*! +returns the ray obtained by applying \f$ t\f$ on the source +and on the direction of `r`. +*/ +Ray_2 transform(const Aff_transformation_2 &t) const; + +/// @} + +}; /* end Ray_2 */ +} /* end namespace CGAL */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Ray_3.h b/Kernel_23/doc/Kernel_23/CGAL/Ray_3.h new file mode 100644 index 00000000000..12872e7b337 --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/Ray_3.h @@ -0,0 +1,113 @@ +namespace CGAL { + +/*! +\ingroup PkgKernel23 + +An object `r` of the data type `Ray_3` is a directed +straight ray in the three-dimensional Euclidean space \f$ \E^3\f$. It starts +in a point called the source of `r` and it goes to infinity. + +\sa `Kernel::Ray_3` + +*/ +template< typename Kernel > +class Ray_3 { +public: + +/// \name Creation +/// @{ + +/*! +introduces a ray `r` +with source \f$ p\f$ and passing through point \f$ q\f$. +*/ +Ray_3(const Point_3 &p, const Point_3 &q); + +/*! +introduces a ray `r` with source \f$ p\f$ and with +direction \f$ d\f$. +*/ +Ray_3(const Point_3 &p, const Direction_3 &d); + +/*! +introduces a ray `r` with source \f$ p\f$ and with +a direction given by \f$ v\f$. +*/ +Ray_3(const Point_3 &p, const Vector_3 &v); + +/*! +introduces a ray `r` starting at source \f$ p\f$ with +the same direction as \f$ l\f$. +*/ +Ray_3(const Point_3 &p, const Line_3 &l); + +/// @} + +/// \name Operations +/// @{ + +/*! +Test for equality: two rays are equal, iff they have the same +source and the same direction. +*/ +bool operator==(const Ray_3 &h) const; + +/*! +Test for inequality. +*/ +bool operator!=(const Ray_3 &h) const; + +/*! +returns the source of `r` +*/ +Point_3 source() const; + +/*! +returns a point on `r`. `point(0)` is the source. +`point(i)`, with \f$ i>0\f$, is different from the +source. \pre \f$ i \geq0\f$. +*/ +Point_3 point(int i) const; + +/*! +returns the direction of `r`. +*/ +Direction_3 direction() const; + +/*! +returns a vector giving the direction of `r`. +*/ +Vector_3 to_vector() const; + +/*! +returns the line supporting `r` which has the same direction. +*/ +Line_3 supporting_line() const; + +/*! +returns the ray with the same source and the opposite direction. +*/ +Ray_3 opposite() const; + +/*! +ray `r` is degenerate, if the source and the second defining +point fall together (that is if the direction is degenerate). +*/ +bool is_degenerate() const; + +/*! +A point is on `r`, iff it is equal to the source +of `r`, or if it is in the interior of `r`. +*/ +bool has_on(const Point_3 &p) const; + +/*! +returns the ray obtained by applying \f$ t\f$ on the source +and on the direction of `r`. +*/ +Ray_3 transform(const Aff_transformation_3 &t) const; + +/// @} + +}; /* end Ray_3 */ +} /* end namespace CGAL */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Segment_2.h b/Kernel_23/doc/Kernel_23/CGAL/Segment_2.h new file mode 100644 index 00000000000..b767476461b --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/Segment_2.h @@ -0,0 +1,166 @@ +namespace CGAL { + +/*! +\ingroup PkgKernel23 + +An object \f$ s\f$ of the data type `Segment_2` is a directed +straight line segment in the two-dimensional Euclidean plane \f$ \E^2\f$, i.e. a +straight line segment \f$ [p,q]\f$ connecting two points \f$ p,q \in \R^2\f$. +The segment is topologically closed, i.e. the end +points belong to it. Point \f$ p\f$ is called the source and \f$ q\f$ +is called the target of \f$ s\f$. The length of \f$ s\f$ is the +Euclidean distance between \f$ p\f$ and \f$ q\f$. Note that there is only a function +to compute the square of the length, because otherwise we had to +perform a square root operation which is not defined for all +number types, which is expensive, and may not be exact. + +\sa `Kernel::Segment_2` + +*/ +template< typename Kernel > +class Segment_2 { +public: + +/// \name Creation +/// @{ + +/*! +introduces a segment `s` with source \f$ p\f$ +and target \f$ q\f$. The segment is directed from the source towards +the target. +*/ +Segment_2(const Point_2 &p, const Point_2 &q); + +/// @} + +/// \name Operations +/// @{ + +/*! +Test for equality: Two segments are equal, iff their sources and +targets are equal. +*/ +bool operator==(const Segment_2 &q) const; + +/*! +Test for inequality. +*/ +bool operator!=(const Segment_2 &q) const; + +/*! +returns the source of `s`. +*/ +Point_2 source() const; + +/*! +returns the target of `s`. +*/ +Point_2 target() const; + +/*! +returns the point of `s` with lexicographically smallest coordinate. +*/ +Point_2 min() const; + +/*! +returns the point of `s` with lexicographically largest coordinate. +*/ +Point_2 max() const; + +/*! +returns source or target of `s`: `vertex(0)` returns +the source of `s`, `vertex(1)` returns the target of `s`. +The parameter `i` is taken modulo 2, which gives +easy access to the other vertex. +*/ +Point_2 vertex(int i) const; + +/*! +returns `vertex(i)`. +*/ +Point_2 point(int i) const; + +/*! +returns `vertex(i)`. +*/ +Point_2 operator[](int i) const; + +/*! +returns the squared length of `s`. +*/ +Kernel::FT squared_length() const; + +/*! +returns the direction from source to target of `s`. +*/ +Direction_2 direction() const; + +/*! +returns the vector `s`.`target()` - `s`.`source()`. +*/ +Vector_2 to_vector() const; + +/*! +returns a segment with source and target point interchanged. +*/ +Segment_2 opposite() const; + +/*! +returns the line \f$ l\f$ passing through `s`. Line \f$ l\f$ has the +same orientation as segment `s`. +*/ +Line_2 supporting_line() const; + +/// @} + +/// \name Predicates +/// @{ + +/*! +segment `s` is degenerate, if source and target are equal. +*/ +bool is_degenerate() const; + +/*! + +*/ +bool is_horizontal() const; + +/*! + +*/ +bool is_vertical() const; + +/*! +A point is on `s`, iff it is equal to the source or target +of `s`, or if it is in the interior of `s`. +*/ +bool has_on(const Point_2 &p) const; + +/*! +checks if point \f$ p\f$ is on segment `s`. This function is faster +than function `has_on()`. +\pre \f$ p\f$ is on the supporting line of `s`. +*/ +bool collinear_has_on(const Point_2 &p) const; + +/// @} + +/// \name Miscellaneous +/// @{ + +/*! +returns a bounding box containing `s`. +*/ +Bbox_2 bbox() const; + +/*! +returns the segment obtained by applying \f$ t\f$ on the source +and the target of `s`. +*/ +Segment_2 transform(const Aff_transformation_2 &t) const; + +/// @} + +}; /* end Segment_2 */ +} /* end namespace CGAL */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Segment_3.h b/Kernel_23/doc/Kernel_23/CGAL/Segment_3.h new file mode 100644 index 00000000000..26da046f21b --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/Segment_3.h @@ -0,0 +1,140 @@ +namespace CGAL { + +/*! +\ingroup PkgKernel23 + +An object \f$ s\f$ of the data type `Segment_3` is a directed +straight line segment in the three-dimensional Euclidean space \f$ \E^3\f$, i.e. a +straight line segment \f$ [p,q]\f$ connecting two points \f$ p,q \in +\R^3\f$. The segment is topologically closed, i.e. the end +points belong to it. Point \f$ p\f$ is called the source and \f$ q\f$ +is called the target of \f$ s\f$. The length of \f$ s\f$ is the +Euclidean distance between \f$ p\f$ and \f$ q\f$. Note that there is only a function +to compute the square of the length, because otherwise we had to +perform a square root operation which is not defined for all +number types, which is expensive, and may not be exact. + +\sa `Kernel::Segment_3` + +*/ +template< typename Kernel > +class Segment_3 { +public: + +/// \name Creation +/// @{ + +/*! +introduces a segment `s` with source \f$ p\f$ +and target \f$ q\f$. It is directed from the source towards +the target. +*/ +Segment_3(const Point_3 &p, const Point_3 &q); + +/// @} + +/// \name Operations +/// @{ + +/*! +Test for equality: Two segments are equal, iff their sources and +targets are equal. +*/ +bool operator==(const Segment_3 &q) const; + +/*! +Test for inequality. +*/ +bool operator!=(const Segment_3 &q) const; + +/*! +returns the source of `s`. +*/ +Point_3 source() const; + +/*! +returns the target of `s`. +*/ +Point_3 target() const; + +/*! +returns the point of `s` with smallest coordinate (lexicographically). +*/ +Point_3 min() const; + +/*! +returns the point of `s` with largest coordinate (lexicographically). +*/ +Point_3 max() const; + +/*! +returns source or target of `s`: `vertex(0)` returns +the source, `vertex(1)` returns the target. +The parameter `i` is taken modulo 2, which gives +easy access to the other vertex. +*/ +Point_3 vertex(int i) const; + +/*! +returns `vertex(i)`. +*/ +Point_3 point(int i) const; + +/*! +returns `vertex(i)`. +*/ +Point_3 operator[](int i) const; + +/*! +returns the squared length of `s`. +*/ +Kernel::FT squared_length() const; + +/*! +returns the vector `s`.`target()` - `s`.`source()`. +*/ +Vector_3 to_vector() const; + +/*! +returns the direction from source to target. +*/ +Direction_3 direction() const; + +/*! +returns a segment with source and target interchanged. +*/ +Segment_3 opposite() const; + +/*! +returns the line \f$ l\f$ passing through `s`. Line \f$ l\f$ has the +same orientation as segment `s`, that is +from the source to the target of `s`. +*/ +Line_3 supporting_line() const; + +/*! +segment `s` is degenerate, if source and target fall together. +*/ +bool is_degenerate() const; + +/*! +A point is on `s`, iff it is equal to the source or target +of `s`, or if it is in the interior of `s`. +*/ +bool has_on(const Point_3 &p) const; + +/*! +returns a bounding box containing `s`. +*/ +Bbox_3 bbox() const; + +/*! +returns the segment obtained by applying \f$ t\f$ on the source +and the target of `s`. +*/ +Segment_3 transform(const Aff_transformation_3 &t) const; + +/// @} + +}; /* end Segment_3 */ +} /* end namespace CGAL */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Simple_cartesian.h b/Kernel_23/doc/Kernel_23/CGAL/Simple_cartesian.h new file mode 100644 index 00000000000..24b242dc78c --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/Simple_cartesian.h @@ -0,0 +1,51 @@ + +namespace CGAL { + +/*! +\ingroup PkgKernel23 + +A model for a `Kernel` using Cartesian coordinates to represent the +geometric objects. In order for `Simple_cartesian` to model Euclidean geometry +in \f$ E^2\f$ and/or \f$ E^3\f$, for some mathematical field \f$ E\f$ (e.g., +the rationals \f$\mathbb{Q}\f$ or the reals \f$\mathbb{R}\f$), the template parameter `FieldNumberType` +must model the mathematical field \f$ E\f$. That is, the field operations on this +number type must compute the mathematically correct results. If the number +type provided as a model for `FieldNumberType` is only an approximation of a +field (such as the built-in type `double`), then the geometry provided by +the kernel is only an approximation of Euclidean geometry. + +\models ::Kernel + +Implementation +-------------- + +In contrast to `Cartesian`, no reference counting +is used internally. This eases debugging, but may slow down algorithms +that copy objects intensively. + +\sa `CGAL::Cartesian` +\sa `CGAL::Homogeneous` +\sa `CGAL::Simple_homogeneous` + +*/ +template< typename FieldNumberType > +class Simple_cartesian { +public: + +/// \name Types +/// @{ + +/*! + +*/ +typedef FieldNumberType FT; + +/*! + +*/ +typedef FieldNumberType RT; + +/// @} + +}; /* end Simple_cartesian */ +} /* end namespace CGAL */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Simple_homogeneous.h b/Kernel_23/doc/Kernel_23/CGAL/Simple_homogeneous.h new file mode 100644 index 00000000000..5f836666e85 --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/Simple_homogeneous.h @@ -0,0 +1,51 @@ + +namespace CGAL { + +/*! +\ingroup PkgKernel23 + +A model for a `Kernel` using homogeneous coordinates to represent the +geometric objects. In order for `Simple_homogeneous` to model Euclidean geometry +in \f$ E^2\f$ and/or \f$ E^3\f$, for some mathematical ring \f$ E\f$ (e.g., +the integers \f$\mathbb{Z}\f$ or the rationals \f$\mathbb{Q}\f$), the template parameter `RingNumberType` +must model the mathematical ring \f$ E\f$. That is, the ring operations on this +number type must compute the mathematically correct results. If the number +type provided as a model for `RingNumberType` is only an approximation of a +ring (such as the built-in type `double`), then the geometry provided by +the kernel is only an approximation of Euclidean geometry. + +\models ::Kernel + +Implementation +-------------- + +In contrast to `Homogeneous`, no reference counting +is used internally. This eases debugging, but may slow down algorithms +that copy objects intensively, or slightly speed up others. + +\sa `CGAL::Cartesian` +\sa `CGAL::Homogeneous` +\sa `CGAL::Simple_cartesian` + +*/ +template< typename RingNumberType > +class Simple_homogeneous { +public: + +/// \name Types +/// @{ + +/*! + +*/ +typedef Quotient FT; + +/*! + +*/ +typedef RingNumberType RT; + +/// @} + +}; /* end Simple_homogeneous */ +} /* end namespace CGAL */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Sphere_3.h b/Kernel_23/doc/Kernel_23/CGAL/Sphere_3.h new file mode 100644 index 00000000000..2b5b82dc2ac --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/Sphere_3.h @@ -0,0 +1,224 @@ +namespace CGAL { + +/*! +\ingroup PkgKernel23 + +An object of type `Sphere_3` is a sphere in the +three-dimensional Euclidean space \f$ \E^3\f$. The sphere is oriented, i.e. +its boundary has clockwise or counterclockwise orientation. The +boundary splits \f$ \E^3\f$ into a positive and a negative side, where the +positive side is to the left of the boundary. The boundary also +splits \f$ \E^3\f$ into a bounded and an unbounded side. Note that the +sphere can be degenerated, i.e. the squared radius may be zero. + +\sa `Kernel::Sphere_3` + +*/ +template< typename Kernel > +class Sphere_3 { +public: + +/// \name Creation +/// @{ + +/*! + +introduces a variable `c` of type `Sphere_3`. +It is initialized to the sphere with center `center`, +squared radius `squared_radius` and orientation +`orientation`. +\pre `orientation` \f$ \neq\f$ `COPLANAR`, and furthermore, `squared_radius` \f$ \geq\f$ 0. +*/ +Sphere_3( Point_3 const& center, +Kernel::FT const& squared_radius, +Orientation const& orientation = COUNTERCLOCKWISE); + +/*! + +introduces a variable `c` of type `Sphere_3`. +It is initialized to the unique sphere which passes through +the points `p`, `q`, `r` and `s`. The orientation of +the sphere is the orientation of the point quadruple `p`, +`q`, `r`, `s`. +\pre `p`, `q`, `r`, and `s` are not coplanar. +*/ +Sphere_3( Point_3 const& p, +Point_3 const& q, +Point_3 const& r, +Point_3 const& s); + +/*! + +introduces a variable `c` of type `Sphere_3`. +It is initialized to the smallest sphere which passes through +the points `p`, `q`, and `r`. The orientation of +the sphere is `o`. \pre `o` is not `COPLANAR`. +*/ +Sphere_3( Point_3 const& p, +Point_3 const& q, +Point_3 const& r, +const Orientation& o = COUNTERCLOCKWISE); + +/*! + +introduces a variable `c` of type `Sphere_3`. +It is initialized to the smallest sphere which passes through +the points `p` and `q`. The orientation of +the sphere is `o`. \pre `o` is not `COPLANAR`. +*/ +Sphere_3( Point_3 const& p, +Point_3 const& q, +const Orientation& o = COUNTERCLOCKWISE); + +/*! + +introduces a variable `c` of type `Sphere_3`. +It is initialized to the sphere with center `center`, squared +radius zero and orientation `orientation`. +\pre `orientation` \f$ \neq\f$ `COPLANAR`. +\post `c`.`is_degenerate()` = `true`. +*/ +Sphere_3( Point_3 const& center, +Orientation const& orientation = COUNTERCLOCKWISE); + +/*! + +introduces a variable `c` of type `Sphere_3`. +It is initialized to the diametral sphere of the circle. +*/ +Sphere_3( Circle_3 const& c ); + +/// @} + +/// \name Access Functions +/// @{ + +/*! + +returns the center of `c`. +*/ +Point_3 const& center( ) const; + +/*! + +returns the squared radius of `c`. +*/ +Kernel::FT const& squared_radius( ) const; + +/*! + +returns the orientation of `c`. +*/ +Orientation const& orientation( ) const; + +/*! + +returns `true`, iff `c` and `sphere2` are equal, +i.e. if they have the same center, same squared radius and +same orientation. +*/ +bool operator == ( Sphere_3 const& sphere2) const; + +/*! + +returns `true`, iff `c` and `sphere2` are not equal. +*/ +bool operator != ( Sphere_3 const& sphere2) const; + +/// @} + +/// \name Predicates +/// @{ + +/*! + +returns `true`, iff `c` is degenerate, i.e. if `c` has squared radius zero. +*/ +bool is_degenerate( ) const; + +/*! + +returns either the constant `ON_ORIENTED_BOUNDARY`, +`ON_POSITIVE_SIDE`, or `ON_NEGATIVE_SIDE`, +iff `p` lies on the boundary, properly on the +positive side, or properly on the negative side +of `c`, resp. +*/ +Oriented_side +oriented_side( Point_3 const& p) const; + +/*! + +returns `ON_BOUNDED_SIDE`, +`ON_BOUNDARY`, or `ON_UNBOUNDED_SIDE` +iff `p` lies properly inside, on the boundary, or properly +outside of `c`, resp. +*/ +Bounded_side +bounded_side( Point_3 const& p) const; + +/*! + +*/ +bool has_on_positive_side(const Point_3 &p) const; + +/*! + +*/ +bool has_on_negative_side(const Point_3 &p) const; + +/*! + +*/ +bool has_on_boundary(const Point_3 &p) const; + +/*! + +*/ +bool has_on_bounded_side(const Point_3 &p) const; + +/*! + +*/ +bool has_on_unbounded_side(const Point_3 &p) const; + +/*! + +*/ +bool has_on(const Point_3 &p) const; + +/*! + +*/ +bool has_on(const Circle_3 &p) const; + +/// @} + +/// \name Miscellaneous +/// @{ + +/*! + +returns the sphere with the same center and squared radius as +`c` but with opposite orientation. +*/ +Sphere_3 opposite() const; + +/*! + +returns the sphere obtained by applying \f$ at\f$ on `c`. +\pre `at` is an orthogonal transformation. +*/ +Sphere_3 orthogonal_transform( +Aff_transformation_3 const& at) const; + +/*! + +returns a bounding box containing `c`. +*/ +Bbox_3 bbox() const; + +/// @} + +}; /* end Sphere_3 */ +} /* end namespace CGAL */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Tetrahedron_3.h b/Kernel_23/doc/Kernel_23/CGAL/Tetrahedron_3.h new file mode 100644 index 00000000000..c77f4f2118c --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/Tetrahedron_3.h @@ -0,0 +1,144 @@ +namespace CGAL { + +/*! +\ingroup PkgKernel23 + +An object \f$ t\f$ of the class `Tetrahedron_3` is an oriented +tetrahedron in the three-dimensional Euclidean space \f$ \E^3\f$. + +It is defined by four vertices \f$ p_0\f$, \f$ p_1\f$, \f$ p_2\f$ and \f$ p_3\f$. +The orientation of a tetrahedron is the orientation of its four +vertices. That means it is positive when \f$ p_3\f$ is on the positive +side of the plane defined by \f$ p_0\f$, \f$ p_1\f$ and \f$ p_2\f$. + +The tetrahedron itself splits the space \f$ \E^3\f$ in a positive and +a negative side. + +The boundary of a tetrahedron splits the space in two open regions, a +bounded one and an unbounded one. + +\sa `Kernel::Tetrahedron_3` + +*/ +template< typename Kernel > +class Tetrahedron_3 { +public: + +/// \name Creation +/// @{ + +/*! +introduces a tetrahedron `t` with vertices \f$ p_0\f$, \f$ p_1\f$, \f$ p_2\f$ and \f$ p_3\f$. +*/ +Tetrahedron_3(const Point_3 &p0, +const Point_3 &p1, +const Point_3 &p2, +const Point_3 &p3); + +/// @} + +/// \name Operations +/// @{ + +/*! +Test for equality: two tetrahedra `t` and `t2` are equal, +iff `t` and `t2` have the same orientation and +their sets (not sequences) of vertices are equal. +*/ +bool operator==(const Tetrahedron_3 &t2) const; + +/*! +Test for inequality. +*/ +bool operator!=(const Tetrahedron_3 &t2) const; + +/*! +returns the i'th vertex modulo 4 of `t`. +*/ +Point_3 vertex(int i) const; + +/*! +returns `vertex(int i)`. +*/ +Point_3 operator[](int i) const; + +/// @} + +/// \name Predicates +/// @{ + +/*! +Tetrahedron `t` is degenerate, if the vertices are coplanar. +*/ +bool is_degenerate() const; + +/*! + +*/ +Orientation orientation() const; + +/*! +\pre : `t` is not degenerate. +*/ +Oriented_side oriented_side(const Point_3 &p) const; + +/*! +\pre : `t` is not degenerate. +*/ +Bounded_side bounded_side(const Point_3 &p) const; + +/// @} + +/// \name Convencience Boolean Functions +/// @{ + +/*! + +*/ +bool has_on_positive_side(const Point_3 &p) const; + +/*! + +*/ +bool has_on_negative_side(const Point_3 &p) const; + +/*! + +*/ +bool has_on_boundary(const Point_3 &p) const; + +/*! + +*/ +bool has_on_bounded_side(const Point_3 &p) const; + +/*! + +*/ +bool has_on_unbounded_side(const Point_3 &p) const; + +/// @} + +/// \name Miscellaneous +/// @{ + +/*! +returns the signed volume of `t`. +*/ +Kernel::FT volume() const; + +/*! +returns a bounding box containing `t`. +*/ +Bbox_3 bbox() const; + +/*! +returns the tetrahedron obtained by applying \f$ at\f$ on the three +vertices of `t`. +*/ +Tetrahedron_3 transform(const Aff_transformation_3 &at) const; + +/// @} + +}; /* end Tetrahedron_3 */ +} /* end namespace CGAL */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Triangle_2.h b/Kernel_23/doc/Kernel_23/CGAL/Triangle_2.h new file mode 100644 index 00000000000..0f8ba76d950 --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/Triangle_2.h @@ -0,0 +1,152 @@ +namespace CGAL { + +/*! +\ingroup PkgKernel23 + +An object \f$ t\f$ of the class `Triangle_2` is a triangle +in the two-dimensional Euclidean plane \f$ \E^2\f$. +Triangle \f$ t\f$ is oriented, i.e., its boundary has +clockwise or counterclockwise orientation. We call the side to the left +of the boundary the positive side and the side to the right of the +boundary the negative side. + +The boundary of a triangle splits the plane in +two open regions, a bounded one and an unbounded one. + +\sa `Kernel::Triangle_2` + +*/ +template< typename Kernel > +class Triangle_2 { +public: + +/// \name Creation +/// @{ + +/*! +introduces a triangle `t` with vertices \f$ p\f$, \f$ q\f$ and \f$ r\f$. +*/ +Triangle_2(const Point_2 &p, +const Point_2 &q, +const Point_2 &r); + +/// @} + +/// \name Operations +/// @{ + +/*! +Test for equality: two triangles are equal, iff there exists a +cyclic permutation of the vertices of \f$ t2\f$, such that they are +equal to the vertices of `t`. +*/ +bool operator==(const Triangle_2 &t2) const; + +/*! +Test for inequality. +*/ +bool operator!=(const Triangle_2 &t2) const; + +/*! +returns the i'th vertex modulo 3 of `t`. +*/ +Point_2 vertex(int i) const; + +/*! +returns `vertex(i)`. +*/ +Point_2 operator[](int i) const; + +/// @} + +/// \name Predicates +/// For convenience we provide the following Boolean functions: +/// @{ + +/*! +triangle `t` is degenerate, if the vertices are collinear. +*/ +bool is_degenerate() const; + +/*! +returns the orientation of `t`. +*/ +Orientation orientation() const; + +/*! +returns +`ON_ORIENTED_BOUNDARY`, or +`POSITIVE_SIDE`, +or the constant +`ON_NEGATIVE_SIDE`, +determined by the position of point \f$ p\f$. +\pre `t` is not degenerate. +*/ +Oriented_side oriented_side(const Point_2 &p) const; + +/*! +returns the constant `ON_BOUNDARY`, +`ON_BOUNDED_SIDE`, or else +`ON_UNBOUNDED_SIDE`, +depending on where point \f$ p\f$ is. +\pre `t` is not degenerate. +*/ +Bounded_side bounded_side(const Point_2 &p) const; + +/*! + +*/ +bool has_on_positive_side(const Point_2 &p) const; + +/*! + +*/ +bool has_on_negative_side(const Point_2 &p) const; + +/*! + +*/ +bool has_on_boundary(const Point_2 &p) const; + +/*! + +*/ +bool has_on_bounded_side(const Point_2 &p) const; + +/*! +\pre `t` is not degenerate. +*/ +bool has_on_unbounded_side(const Point_2 &p) const; + +/// @} + +/// \name Miscellaneous +/// @{ + +/*! +returns a triangle where the boundary is oriented the other +way round (this flips the positive and the negative side, but +not the bounded and unbounded side). +*/ +Triangle_2 opposite(); + +/*! +returns the signed area of `t`. +*/ +Kernel::FT area() const; + +/*! +returns a bounding box containing `t`. +*/ +Bbox_2 bbox() const; + +/*! +returns the triangle obtained by applying \f$ at\f$ on the three +vertices of `t`. +*/ +Triangle_2 transform(const Aff_transformation_2 &at) const; + +/// @} + +}; /* end Triangle_2 */ +} /* end namespace CGAL */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Triangle_3.h b/Kernel_23/doc/Kernel_23/CGAL/Triangle_3.h new file mode 100644 index 00000000000..be3cc3e0633 --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/Triangle_3.h @@ -0,0 +1,100 @@ +namespace CGAL { + +/*! +\ingroup PkgKernel23 + +An object \f$ t\f$ of the class `Triangle_3` is a triangle in +the three-dimensional Euclidean space \f$ \E^3\f$. As the triangle is not +a full-dimensional object there is only a test whether a point lies on +the triangle or not. + +\sa `Kernel::Triangle_3` + +*/ +template< typename Kernel > +class Triangle_3 { +public: + +/// \name Creation +/// @{ + +/*! +introduces a triangle `t` with vertices \f$ p\f$, \f$ q\f$ and \f$ r\f$. +*/ +Triangle_3(const Point_3 &p, +const Point_3 &q, +const Point_3 &r); + +/// @} + +/// \name Operations +/// @{ + +/*! +Test for equality: two triangles t and \f$ t_2\f$ are equal, iff there +exists a cyclic permutation of the vertices of \f$ t2\f$, such that +they are equal to the vertices of `t`. +*/ +bool operator==(const Triangle_3 &t2) const; + +/*! +Test for inequality. +*/ +bool operator!=(const Triangle_3 &t2) const; + +/*! +returns the i'th vertex modulo 3 of `t`. +*/ +Point_3 vertex(int i) const; + +/*! +returns `vertex(int i)`. +*/ +Point_3 operator[](int i) const; + +/*! +returns the supporting plane of `t`, with same +orientation. +*/ +Plane_3 supporting_plane(); + +/// @} + +/// \name Predicates +/// @{ + +/*! +`t` is degenerate if its vertices are collinear. +*/ +bool is_degenerate() const; + +/*! +A point is on `t`, if it is on a vertex, an edge or the +face of `t`. +*/ +bool has_on(const Point_3 &p) const; + +/// @} + +/// \name Miscellaneous +/// @{ + +/*! +returns a square of the area of `t`. +*/ +Kernel::FT squared_area() const; + +/*! +returns a bounding box containing `t`. +*/ +Bbox_3 bbox() const; + +/*! +returns the triangle obtained by applying \f$ at\f$ on the three +vertices of `t`. +*/ +Triangle_3 transform(const Aff_transformation_3 &at) const; + +/// @} + +}; /* end Triangle_3 */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Vector_2.h b/Kernel_23/doc/Kernel_23/CGAL/Vector_2.h new file mode 100644 index 00000000000..e7a09f7569e --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/Vector_2.h @@ -0,0 +1,263 @@ +namespace CGAL { + +/*! +\ingroup PkgKernel23 + +An object of the class `Vector_2` is a vector in the two-dimensional +vector space \f$ \R^2\f$. Geometrically spoken, a vector is the difference +of two points \f$ p_2\f$, \f$ p_1\f$ and denotes the direction and the distance +from \f$ p_1\f$ to \f$ p_2\f$. + +\cgal defines a symbolic constant `NULL_VECTOR`. We +will explicitly state where you can pass this constant as an argument +instead of a vector initialized with zeros. + +\sa `Kernel::Vector_2` + +*/ +template< typename Kernel > +class Vector_2 { +public: + +/// \name Types +/// @{ + +/*! +An iterator for enumerating the +Cartesian coordinates of a vector. +*/ +typedef Hidden_type Cartesian_const_iterator; + +/// @} + +/// \name Creation +/// @{ + +/*! +introduces the vector \f$ b-a\f$. +*/ +Vector_2(const Point_2 &a, const Point_2 &b); + +/*! +introduces the vector \f$ s.target()-s.source()\f$. +*/ +Vector_2(const Segment_2 &s); + +/*! +introduces the vector having the same direction as \f$ r\f$. +*/ +Vector_2(const Ray_2 &r); + +/*! +introduces the vector having the same direction as \f$ l\f$. +*/ +Vector_2(const Line_2 &l); + +/*! +introduces a null vector `v`. +*/ +Vector_2(const Null_vector &NULL_VECTOR); + +/*! +introduces a vector `v` initialized to \f$ (x,y)\f$. +*/ +Vector_2(int x, int y); + +/*! +introduces a vector `v` initialized to \f$ (x,y)\f$. +*/ +Vector_2(double x, double y); + +/*! +introduces a vector `v` initialized to \f$ (hx/hw,hy/hw)\f$. +\pre \f$ hw\neq0\f$. +*/ +Vector_2(const Kernel::RT &hx, const Kernel::RT &hy, const Kernel::RT &hw = RT(1)); + +/*! +introduces a vector `v` initialized to \f$ (x,y)\f$. +*/ +Vector_2(const Kernel::FT &x, const Kernel::FT &y); + +/// @} + +/// \name Operations +/// @{ + +/*! +Test for equality: two vectors are equal, iff their \f$ x\f$ and \f$ y\f$ +coordinates are equal. You can compare a vector with the +`NULL_VECTOR`. +*/ +bool operator==(const Vector_2 &w) const; + +/*! +Test for inequality. You can compare a vector with the +`NULL_VECTOR`. +*/ +bool operator!=(const Vector_2 &w) const; + +/// @} + +/// \name Coordinate Access +/// There are two sets of coordinate access functions, namely to the +/// homogeneous and to the Cartesian coordinates. They can be used +/// independently from the chosen kernel model. Note that you do not +/// loose information with the homogeneous representation, because the +/// `FieldNumberType` is a quotient. +/// @{ + +/*! +returns the homogeneous \f$ x\f$ coordinate. +*/ +Kernel::RT hx() const; + +/*! +returns the homogeneous \f$ y\f$ coordinate. +*/ +Kernel::RT hy() const; + +/*! +returns the homogenizing coordinate. +*/ +Kernel::RT hw() const; + +/*! +returns the `x`-coordinate of `v`, that is \f$ hx/hw\f$. +*/ +Kernel::FT x() const; + +/*! +returns the `y`-coordinate of `v`, that is \f$ hy/hw\f$. +*/ +Kernel::FT y() const; + +/// @} + +/// \name Convenience Operators +/// The following operations are for convenience and for compatibility +/// with higher dimensional vectors. Again they come in a Cartesian +/// and homogeneous flavor. +/// @{ + + +/*! +returns the i'th homogeneous coordinate of `v`, starting with 0. +\pre \f$ 0\leq i \leq2\f$. +*/ +Kernel::RT homogeneous(int i) const; + +/*! +returns the i'th Cartesian coordinate of `v`, starting at 0. +\pre \f$ 0\leq i \leq1\f$. +*/ +Kernel::FT cartesian(int i) const; + +/*! +returns `cartesian(i)`. +\pre \f$ 0\leq i \leq1\f$. +*/ +Kernel::FT operator[](int i) const; + +/*! +returns an iterator to the Cartesian coordinates +of `v`, starting with the 0th coordinate. +*/ +Cartesian_const_iterator cartesian_begin() const; + +/*! +returns an off the end iterator to the Cartesian +coordinates of `v`. +*/ +Cartesian_const_iterator cartesian_end() const; + +/*! +returns the dimension (the constant 2). +*/ +int dimension() const; + +/*! +returns the direction which passes through `v`. +*/ +Direction_2 direction() const; + +/*! +returns the vector obtained by applying \f$ t\f$ on `v`. +*/ +Vector_2 transform(const Aff_transformation_2 &t) const; + +/*! +returns the vector perpendicular to `v` in clockwise or +counterclockwise orientation. +*/ +Vector_2 perpendicular(const Orientation &o) const; + +/// @} + +/// \name Operators +/// @{ + +/*! +Addition. +*/ +Vector_2 operator+(const Vector_2 &w) const; + +/*! +Subtraction. +*/ +Vector_2 operator-(const Vector_2 &w) const; + +/*! +returns the opposite vector. +*/ +Vector_2 operator-() const; + +/*! +returns the scalar product (= inner product) of the two vectors. +*/ +Kernel::FT operator*(const Vector_2 &w) const; + +/*! +Division by a scalar. +*/ +Vector_2 operator/(const Kernel::RT &s) const; + +/*! +returns the squared length of `v`. +*/ +Kernel::FT squared_length() const; + +/// @} + +}; /* end Vector_2 */ + + +/*! +Multiplication with a scalar from the right. +\relates Vector_2 +*/ +Vector_2 +operator*(const Vector_2 &v, const Kernel::RT &s); + +/*! +Multiplication with a scalar from the right. +\relates Vector_2 +*/ +Vector_2 +operator*(const Vector_2 &v, const Kernel::FT &s); + +/*! +Multiplication with a scalar from the left. +\relates Vector_2 +*/ +Vector_2 +operator*(const Kernel::RT &s, const Vector_2 &v); + +/*! +Multiplication with a scalar from the left. +\relates Vector_2 +*/ +Vector_2 +operator*(const Kernel::FT &s, const Vector_2 &v); + +} /* end namespace CGAL */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/Vector_3.h b/Kernel_23/doc/Kernel_23/CGAL/Vector_3.h new file mode 100644 index 00000000000..701b2088549 --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/Vector_3.h @@ -0,0 +1,266 @@ +namespace CGAL { + +/*! +\ingroup PkgKernel23 + +An object of the class `Vector_3` is a vector in the three-dimensional +vector space \f$ \R^3\f$. Geometrically spoken a vector is the difference +of two points \f$ p_2\f$, \f$ p_1\f$ and denotes the direction and the distance +from \f$ p_1\f$ to \f$ p_2\f$. + +\cgal defines a symbolic constant `NULL_VECTOR`. We +will explicitly state where you can pass this constant as an argument +instead of a vector initialized with zeros. + +\sa `Kernel::Vector_3` +\sa `CGAL::cross_product` +\sa `CGAL::determinant` + +*/ +template< typename Kernel > +class Vector_3 { +public: + +/// \name Types +/// @{ + +/*! +An iterator for enumerating the +Cartesian coordinates of a vector. +*/ +typedef Hidden_type Cartesian_const_iterator; + +/// @} + +/// \name Creation +/// @{ + +/*! +introduces the vector \f$ b-a\f$. +*/ +Vector_3(const Point_3 &a, const Point_3 &b); + +/*! +introduces the vector \f$ s.target()-s.source()\f$. +*/ +Vector_3(const Segment_3 &s); + +/*! +introduces a vector having the same direction as \f$ r\f$. +*/ +Vector_3(const Ray_3 &r); + +/*! +introduces a vector having the same direction as \f$ l\f$. +*/ +Vector_3(const Line_3 &l); + +/*! +introduces a null vector `v`. +*/ +Vector_3(const Null_vector &NULL_VECTOR); + +/*! +introduces a vector `v` initialized to \f$ (x, y, z)\f$. +*/ +Vector_3(int x, int y, int z); + +/*! +introduces a vector `v` initialized to \f$ (x, y, z)\f$. +*/ +Vector_3(double x, double y, double z); + +/*! +introduces a vector `v` initialized to \f$ (hx/hw, hy/hw, hz/hw)\f$. +*/ +Vector_3(const Kernel::RT &hx, const Kernel::RT &hy, const Kernel::RT &hz, const Kernel::RT &hw = RT(1)); + +/*! +introduces a vector `v` initialized to \f$ (x, y, z)\f$. +*/ +Vector_3(const Kernel::FT &x, const Kernel::FT &y, const Kernel::FT &z); + +/// @} + +/// \name Operations +/// @{ + +/*! +Test for equality: two vectors are equal, iff their \f$ x\f$, \f$ y\f$ +and \f$ z\f$ coordinates are equal. You can compare a vector with the +`NULL_VECTOR`. +*/ +bool operator==(const Vector_3 &w) const; + +/*! +Test for inequality. You can compare a vector with the +`NULL_VECTOR`. +*/ +bool operator!=(const Vector_3 &w) const; + +/// @} + +/// \name Coordinate Access +/// There are two sets of coordinate access functions, namely to the +/// homogeneous and to the Cartesian coordinates. They can be used +/// independently from the chosen kernel model. Note that you do not +/// loose information with the homogeneous representation, because the +/// `FieldNumberType` is a quotient. +/// @{ + +/*! +returns the homogeneous \f$ x\f$ coordinate. +*/ +Kernel::RT hx() const; + +/*! +returns the homogeneous \f$ y\f$ coordinate. +*/ +Kernel::RT hy() const; + +/*! +returns the homogeneous \f$ z\f$ coordinate. +*/ +Kernel::RT hz() const; + +/*! +returns the homogenizing coordinate. +*/ +Kernel::RT hw() const; + +/*! +returns the `x`-coordinate of `v`, that is \f$ hx/hw\f$. +*/ +Kernel::FT x() const; + +/*! +returns the `y`-coordinate of `v`, that is \f$ hy/hw\f$. +*/ +Kernel::FT y() const; + +/*! +returns the `z` coordinate of `v`, that is \f$ hz/hw\f$. +*/ +Kernel::FT z() const; + +/// @} + +/// \name Convenience Operations +/// The following operations are for convenience and for compatibility +/// with higher dimensional vectors. Again they come in a Cartesian +/// and homogeneous flavor. +/// @{ + +/*! +returns the i'th homogeneous coordinate of `v`, starting with 0. +\pre \f$ 0\leq i \leq3\f$. +*/ +Kernel::RT homogeneous(int i) const; + +/*! +returns the i'th Cartesian coordinate of `v`, starting at 0. +\pre \f$ 0\leq i \leq2\f$. +*/ +Kernel::FT cartesian(int i) const; + +/*! +returns `cartesian(i)`. +\pre \f$ 0\leq i \leq2\f$. +*/ +Kernel::FT operator[](int i) const; + +/*! +returns an iterator to the Cartesian coordinates +of `v`, starting with the 0th coordinate. +*/ +Cartesian_const_iterator cartesian_begin() const; + +/*! +returns an off the end iterator to the Cartesian +coordinates of `v`. +*/ +Cartesian_const_iterator cartesian_end() const; + +/*! +returns the dimension (the constant 3). +*/ +int dimension() const; + +/*! +returns the vector obtained by applying \f$ t\f$ on `v`. +*/ +Vector_3 transform(const Aff_transformation_3 &t) const; + +/*! +returns the direction of `v`. +*/ +Direction_3 direction() const; + +/// @} + +/// \name Operators +/// @{ + +/*! +Addition. +*/ +Vector_3 operator+(const Vector_3 &w) const; + +/*! +Subtraction. +*/ +Vector_3 operator-(const Vector_3 &w) const; + +/*! +Returns the opposite vector. +*/ +Vector_3 operator-() const; + +/*! +Division by a scalar. +*/ +Vector_3 operator/(const Kernel::RT &s) const; + +/*! +returns the squared length of `v`. +*/ +Kernel::FT squared_length() const; + +/// @} + +}; /* end Vector_3 */ + +/*! +returns the scalar product (= inner product) of the two vectors. +*/ +Kernel::FT operator*(const Vector_3 &w) const; + +/*! +Multiplication with a scalar from the right. +\relates Vector_3 +*/ +Vector_3 +operator*(const Vector_3 &v, const Kernel::RT &s); + +/*! +Multiplication with a scalar from the right. +\relates Vector_3 +*/ +Vector_3 +operator*(const Vector_3 &v, const Kernel::FT &s); + +/*! +Multiplication with a scalar from the left. +\relates Vector_3 +*/ +Vector_3 +operator*(const Kernel::RT &s, const Vector_3 &v); + +/*! +Multiplication with a scalar from the left. +\relates Vector_3 +*/ +Vector_3 +operator*(const Kernel::FT &s, const Vector_3 &v); + +} /* end namespace CGAL */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/aff_transformation_tags.h b/Kernel_23/doc/Kernel_23/CGAL/aff_transformation_tags.h new file mode 100644 index 00000000000..af68ccf3a85 --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/aff_transformation_tags.h @@ -0,0 +1,120 @@ + +namespace CGAL { + +/*! +\ingroup PkgKernel23 + +Tag class for affine transformations. + +\sa `CGAL::Aff_transformation_2` +\sa `CGAL::Aff_transformation_3` +\sa `CGAL::Reflection` +\sa `CGAL::Rotation` +\sa `CGAL::Scaling` +\sa `CGAL::Translation` + +*/ + +class Identity_transformation { +public: + +/// @} + +}; /* end Identity_transformation */ +} /* end namespace CGAL */ + +namespace CGAL { + +/*! +\ingroup PkgKernel23 + +Tag class for affine transformations. + +\sa `CGAL::Aff_transformation_2` +\sa `CGAL::Aff_transformation_3` +\sa `CGAL::Identity_transformation` +\sa `CGAL::Rotation` +\sa `CGAL::Scaling` +\sa `CGAL::Translation` + +*/ + +class Reflection { +public: + +/// @} + +}; /* end Reflection */ +} /* end namespace CGAL */ + +namespace CGAL { + +/*! +\ingroup PkgKernel23 + +Tag class for affine transformations. + +\sa `CGAL::Aff_transformation_2` +\sa `CGAL::Aff_transformation_3` +\sa `CGAL::Identity_transformation` +\sa `CGAL::Rotation` +\sa `CGAL::Scaling` +\sa `CGAL::Translation` + +*/ + +class Rotation { +public: + +/// @} + +}; /* end Rotation */ +} /* end namespace CGAL */ + +namespace CGAL { + +/*! +\ingroup PkgKernel23 + +Tag class for affine transformations. + +\sa `CGAL::Aff_transformation_2` +\sa `CGAL::Aff_transformation_3` +\sa `CGAL::Identity_transformation` +\sa `CGAL::Reflection` +\sa `CGAL::Rotation` +\sa `CGAL::Translation` + +*/ + +class Scaling { +public: + +/// @} + +}; /* end Scaling */ +} /* end namespace CGAL */ + +namespace CGAL { + +/*! +\ingroup PkgKernel23 + +Tag class for affine transformations. + +\sa `CGAL::Aff_transformation_2` +\sa `CGAL::Aff_transformation_3` +\sa `CGAL::Identity_transformation` +\sa `CGAL::Reflection` +\sa `CGAL::Rotation` +\sa `CGAL::Scaling` + +*/ + +class Translation { +public: + +/// @} + +}; /* end Translation */ +} /* end namespace CGAL */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/cartesian_homogeneous_conversion.h b/Kernel_23/doc/Kernel_23/CGAL/cartesian_homogeneous_conversion.h new file mode 100644 index 00000000000..5ad456eb91c --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/cartesian_homogeneous_conversion.h @@ -0,0 +1,100 @@ +namespace CGAL { + +/*! +\addtogroup kernel_conversion Cartesian/Homogenous Conversion +\ingroup PkgKernel23 + +Functions to convert between Cartesian and Homogeneous Kernels. + +\sa `CGAL::Cartesian` +\sa `CGAL::Cartesian_converter` +\sa `CGAL::Homogeneous` +\sa `CGAL::Homogeneous_converter` +\sa `CGAL::Simple_cartesian` +\sa `CGAL::Simple_homogeneous` +*/ +/// @{ + +/*! + +converts 2d point `cp` with Cartesian representation +into a 2d point with homogeneous representation with the same +number type. + + +*/ +Point_2< Homogeneous > +cartesian_to_homogeneous(const Point_2< Cartesian >& cp); + +/*! + +converts 3d point `cp` with Cartesian representation +into a 3d point with homogeneous representation with the same +number type. +*/ +Point_3< Homogeneous > +cartesian_to_homogeneous(const Point_3< Cartesian >& cp); + + +/*! + +converts 2d point `hp` with homogeneous representation +into a 2d point with Cartesian representation with the same +number type. + +*/ +Point_2< Cartesian > +homogeneous_to_cartesian(const Point_2< Homogeneous >& hp); + +/*! + +converts 3d point `hp` with homogeneous representation +into a 3d point with Cartesian representation with the same +number type. +*/ +Point_3< Cartesian > +homogeneous_to_cartesian(const Point_3< Homogeneous >& hp); + + +/*! + +converts the 2d point `hp` with homogeneous representation +with number type `RT` into a 2d point with Cartesian +representation with number type `Quotient`. +*/ +Point_2< Cartesian > > +homogeneous_to_quotient_cartesian(const Point_2 >& hp); + +/*! + +converts the 3d point `hp` with homogeneous representation +with number type `RT` into a 3d point with Cartesian +representation with number type `Quotient`. +*/ +Point_3< Cartesian > > +homogeneous_to_quotient_cartesian(const Point_3 >& hp); + + +/*! + +converts 2d point `cp` with Cartesian representation +with number type `Quotient` into a 2d point +with homogeneous representation with number type `RT`. +*/ +Point_2< Homogeneous > +quotient_cartesian_to_homogeneous( +const Point_2< Cartesian< Quotient > >& cp); + +/*! + +converts 3d point `cp` with Cartesian representation +with number type `Quotient` into a 3d point +with homogeneous representation with number type `RT`. + +*/ +Point_3< Homogeneous > +quotient_cartesian_to_homogeneous( +const Point_3< Cartesian< Quotient > >& cp); + +} /* namespace CGAL */ + diff --git a/Kernel_23/doc/Kernel_23/CGAL/enum.h b/Kernel_23/doc/Kernel_23/CGAL/enum.h new file mode 100644 index 00000000000..35131c1a2e2 --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/enum.h @@ -0,0 +1,159 @@ +namespace CGAL { + +/*! +\ingroup PkgKernel23 + +converts between the various enums provided by the \cgal kernel. +The conversion preserves the order of the values. + +\sa `CGAL::Sign` +\sa `CGAL::Comparison_result` +\sa `CGAL::Orientation` +\sa `CGAL::Oriented_side` +\sa `CGAL::Bounded_side` +\sa `CGAL::Angle` +\sa `CGAL::Uncertain` +*/ +template < typename T, typename U > +T enum_cast(const U&u); + +/*! +\ingroup PkgKernel23 + +returns the opposite side (for example `ON_POSITIVE_SIDE` if +`o==ON_NEGATIVE_SIDE`), or `ON_ORIENTED_BOUNDARY` if +`o==ON_ORIENTED_BOUNDARY`. +*/ +Oriented_side opposite(const Oriented_side &o); + +/*! +\ingroup PkgKernel23 + +returns the opposite side (for example `BOUNDED_SIDE` if +`o==UNBOUNDED_SIDE`), or returns `ON_BOUNDARY` if +`o==ON_BOUNDARY`. +*/ +Bounded_side opposite(const Bounded_side &o); + +/*! +\ingroup PkgKernel23 +\sa `CGAL::angle` + */ +enum Angle {OBTUSE, RIGHT, ACUTE}; + +/*! +\ingroup PkgKernel23 +\sa `CGAL::opposite(const Bounded_side& o)` +*/ +enum Bounded_side {ON_UNBOUNDED_SIDE, ON_BOUNDARY, ON_BOUNDED_SIDE}; + +/*! +\ingroup PkgKernel23 +*/ +enum Comparison_result { SMALLER, EQUAL, LARGER }; + +/*! +\ingroup PkgKernel23 +\sa CGAL::Orientation +*/ +enum Sign { NEGATIVE, ZERO, POSITIVE }; + +/*! +\ingroup PkgKernel23 +\sa `CGAL::LEFT_TURN` +\sa `CGAL::RIGHT_TURN` +\sa `CGAL::COLLINEAR` +\sa `CGAL::CLOCKWISE` +\sa `CGAL::COUNTERCLOCKWISE` +\sa `CGAL::COPLANAR` +*/ +typedef Sign Orientation; + +/*! +\ingroup PkgKernel23 +*/ +enum Oriented_side {ON_NEGATIVE_SIDE, ON_ORIENTED_BOUNDARY, ON_POSITIVE_SIDE }; + +/*! +\ingroup PkgKernel23 + +\sa `CGAL::COUNTERCLOCKWISE` +*/ +const Orientation CLOCKWISE = NEGATIVE; + +/*! +\ingroup PkgKernel23 +\sa `CGAL::CLOCKWISE` +*/ +const Orientation COUNTERCLOCKWISE = POSITIVE; + +/*! +\ingroup PkgKernel23 +\sa `CGAL::LEFT_TURN` +\sa `CGAL::RIGHT_TURN` +*/ +const Orientation COLLINEAR = ZERO; + +/*! +\ingroup PkgKernel23 + +\sa `CGAL::COLLINEAR` + +\sa `CGAL::RIGHT_TURN` +*/ +const Orientation LEFT_TURN = POSITIVE; + +/*! +\ingroup PkgKernel23 + +\sa `CGAL::COLLINEAR` +\sa `CGAL::LEFT_TURN` + +*/ +const Orientation RIGHT_TURN = NEGATIVE; + +/*! +\ingroup PkgKernel23 +*/ +const Orientation COPLANAR = ZERO; + +/*! +\ingroup PkgKernel23 +*/ +const Orientation DEGENERATE = ZERO; + +/*! +\ingroup PkgKernel23 + +A symbolic constant used to construct zero length vectors. + +\sa `CGAL::Vector_2` +\sa `CGAL::Vector_3` + +*/ +const Null_vector NULL_VECTOR; + +/*! +\ingroup PkgKernel23 + +A symbolic constant which denotes the point at the origin. +This constant is used in the conversion between points and vectors. + +Example +-------------- + +\code + Point_2< Cartesian > p(1.0, 1.0), q; + Vector2< Cartesian > v; + v = p - ORIGIN; + q = ORIGIN + v; + assert( p == q ); +\endcode + +\sa `CGAL::Point_2` +\sa `CGAL::Point_3` + +*/ +const Origin ORIGIN; + +} /* namespace CGAL */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/global_functions.h b/Kernel_23/doc/Kernel_23/CGAL/global_functions.h new file mode 100644 index 00000000000..f9cc7db5c7e --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/global_functions.h @@ -0,0 +1,2560 @@ +namespace CGAL { + +/*! +\addtogroup angle angle +\ingroup PkgKernel23 +*/ +/// @{ + +/*! +returns `OBTUSE`, `RIGHT` or `ACUTE` depending +on the angle formed by the two vectors \f$ u\f$ and \f$ v\f$. +*/ +Angle angle(const Vector_2&u, +const Vector_2&v); + +/*! + +returns `OBTUSE`, `RIGHT` or `ACUTE` depending +on the angle formed by the three points \f$ p\f$, \f$ q\f$, \f$ r\f$ (\f$ q\f$ being the vertex of +the angle). The returned value is the same as `angle(p - q, r - q)`. +*/ +Angle angle(const Point_2& p, +const Point_2& q, +const Point_2& r); + +/*! + +returns `OBTUSE`, `RIGHT` or `ACUTE` depending +on the angle formed by the two vectors \f$ pq\f$, \f$ rs\f$. The returned value is +the same as `angle(q - p, s - r)`. +*/ +Angle angle(const Point_2& p, +const Point_2& q, +const Point_2& r, +const Point_2& s); + +/*! + +returns `OBTUSE`, `RIGHT` or `ACUTE` depending +on the angle formed by the three points \f$ p\f$, \f$ q\f$, \f$ r\f$ (\f$ q\f$ being the vertex of +the angle). +*/ +Angle angle(const Point_3& p, +const Point_3& q, +const Point_3& r); + +/// @} + +/// \addtogroup unit_normal unit_normal +/// \ingroup PkgKernel23 +/// @{ + +/*! +computes the unit normal vector for the vectors `q-p` and `r-p`. +\pre The points `p`, `q`, and `r` must not be collinear. +*/ +Vector_3 unit_normal( const Point_3& p, const Point_3& q, const Point_3& r ); + +/// @} + + +/// \addtogroup area area +/// \ingroup PkgKernel23 +/// @{ + +/*! +returns the signed area of the triangle defined by the points \f$ p\f$, +\f$ q\f$ and \f$ r\f$. +*/ +Kernel::FT area(const Point_2& p, +const Point_2& q, +const Point_2& r); + +/// @} + +/// \addtogroup are_ordered_along_line are_ordered_along_line +/// \ingroup PkgKernel23 +/// \sa `CGAL::are_strictly_ordered_along_line` +/// \sa `CGAL::collinear_are_ordered_along_line` +/// \sa `CGAL::collinear_are_strictly_ordered_along_line` +/// @{ + +/*! + +returns `true`, iff the three points are collinear and +`q` lies between `p` and `r`. +Note that `true` is returned, if `q==p` or +`q==r`. +*/ +bool are_ordered_along_line(const Point_2 &p, +const Point_2 &q, +const Point_2 &r); + +/*! +returns `true`, iff the three points are collinear and +`q` lies between `p` and `r`. +Note that `true` is returned, if `q==p` or +`q==r`. +*/ +bool are_ordered_along_line(const Point_3 &p, +const Point_3 &q, +const Point_3 &r); + + +/// @} + +/// \addtogroup are_strictly_ordered_along_line are_strictly_ordered_along_line +/// \ingroup PkgKernel23 +/// \sa `CGAL::are_ordered_along_line` +/// \sa `CGAL::collinear_are_ordered_along_line` +/// \sa `CGAL::collinear_are_strictly_ordered_along_line` +/// @{ + +/*! +returns `true`, iff the three points are collinear and +`q` lies strictly between `p` and `r`. +Note that `false` is returned, if `q==p` or +`q==r`. +*/ +bool are_strictly_ordered_along_line(const Point_2 &p, +const Point_2 &q, +const Point_2 &r); + +/*! +returns `true`, iff the three points are collinear and +`q` lies strictly between `p` and `r`. +Note that `false` is returned, if `q==p` or +`q==r`. +*/ +bool are_strictly_ordered_along_line(const Point_3 &p, +const Point_3 &q, +const Point_3 &r); + +/// @} + +/// \addtogroup barycenter barycenter +/// \ingroup PkgKernel23 +/// \sa `CGAL::centroid` +/// @{ + +/*! +compute the barycenter of the points \f$ p1\f$ and \f$ p2\f$ with corresponding +weights \f$ w1\f$ and \f$ 1-w1\f$. +*/ +Point_2 +barycenter( const Point_2& p1, const Kernel::FT&w1, +const Point_2& p2); + +/*! +compute the barycenter of the points \f$ p1\f$ and \f$ p2\f$ with corresponding +weights \f$ w1\f$ and \f$ w2\f$. \pre w1+w2 != 0. +*/ +Point_2 +barycenter( const Point_2& p1, const Kernel::FT&w1, +const Point_2& p2, const Kernel::FT&w2); + +/*! +compute the barycenter of the points \f$ p1\f$, \f$ p2\f$ and \f$ p3\f$ with corresponding +weights \f$ w1\f$, \f$ w2\f$ and \f$ 1-w1-w2\f$. +*/ +Point_2 +barycenter( const Point_2& p1, const Kernel::FT&w1, +const Point_2& p2, const Kernel::FT&w2, +const Point_2& p3); + +/*! +compute the barycenter of the points \f$ p1\f$, \f$ p2\f$ and \f$ p3\f$ with corresponding +weights \f$ w1\f$, \f$ w2\f$ and \f$ w3\f$. \pre w1+w2+w3 != 0. +*/ +Point_2 +barycenter( const Point_2& p1, const Kernel::FT&w1, +const Point_2& p2, const Kernel::FT&w2, +const Point_2& p3, const Kernel::FT&w3); + +/*! +compute the barycenter of the points \f$ p1\f$, \f$ p2\f$, \f$ p3\f$ and \f$ p4\f$ with corresponding +weights \f$ w1\f$, \f$ w2\f$, \f$ w3\f$ and \f$ 1-w1-w2-w3\f$. +*/ +Point_2 +barycenter( const Point_2& p1, const Kernel::FT&w1, +const Point_2& p2, const Kernel::FT&w2, +const Point_2& p3, const Kernel::FT&w3, +const Point_2& p4); + +/*! +compute the barycenter of the points \f$ p1\f$, \f$ p2\f$, \f$ p3\f$ and \f$ p4\f$ with corresponding +weights \f$ w1\f$, \f$ w2\f$, \f$ w3\f$ and \f$ w4\f$. \pre w1+w2+w3+w4 != 0. +*/ +Point_2 +barycenter( const Point_2& p1, const Kernel::FT&w1, +const Point_2& p2, const Kernel::FT&w2, +const Point_2& p3, const Kernel::FT&w3, +const Point_2& p4, const Kernel::FT&w4); + +/*! +compute the barycenter of the points \f$ p1\f$ and \f$ p2\f$ with corresponding +weights \f$ w1\f$ and \f$ 1-w1\f$. +*/ +Point_3 +barycenter( const Point_3& p1, const Kernel::FT&w1, +const Point_3& p2); + +/*! +compute the barycenter of the points \f$ p1\f$ and \f$ p2\f$ with corresponding +weights \f$ w1\f$ and \f$ w2\f$. \pre w1+w2 != 0. +*/ +Point_3 +barycenter( const Point_3& p1, const Kernel::FT&w1, +const Point_3& p2, const Kernel::FT&w2); + +/*! +compute the barycenter of the points \f$ p1\f$, \f$ p2\f$ and \f$ p3\f$ with corresponding +weights \f$ w1\f$, \f$ w2\f$ and \f$ 1-w1-w2\f$. +*/ +Point_3 +barycenter( const Point_3& p1, const Kernel::FT&w1, +const Point_3& p2, const Kernel::FT&w2, +const Point_3& p3); + +/*! +compute the barycenter of the points \f$ p1\f$, \f$ p2\f$ and \f$ p3\f$ with corresponding +weights \f$ w1\f$, \f$ w2\f$ and \f$ w3\f$. \pre w1+w2+w3 != 0. +*/ +Point_3 +barycenter( const Point_3& p1, const Kernel::FT&w1, +const Point_3& p2, const Kernel::FT&w2, +const Point_3& p3, const Kernel::FT&w3); + +/*! +compute the barycenter of the points \f$ p1\f$, \f$ p2\f$, \f$ p3\f$ and \f$ p4\f$ with corresponding +weights \f$ w1\f$, \f$ w2\f$, \f$ w3\f$ and \f$ 1-w1-w2-w3\f$. +*/ +Point_3 +barycenter( const Point_3& p1, const Kernel::FT&w1, +const Point_3& p2, const Kernel::FT&w2, +const Point_3& p3, const Kernel::FT&w3, +const Point_3& p4); + +/*! +compute the barycenter of the points \f$ p1\f$, \f$ p2\f$, \f$ p3\f$ and \f$ p4\f$ with corresponding +weights \f$ w1\f$, \f$ w2\f$, \f$ w3\f$ and \f$ w4\f$. \pre w1+w2+w3+w4 != 0. +*/ +Point_3 +barycenter( const Point_3& p1, const Kernel::FT&w1, +const Point_3& p2, const Kernel::FT&w2, +const Point_3& p3, const Kernel::FT&w3, +const Point_3& p4, const Kernel::FT&w4); + +/// @} + +/// \addtogroup bisector bisector +/// \ingroup PkgKernel23 +/// @{ + +/*! +constructs the bisector line of the two points `p` and `q`. +The bisector is oriented in such a way that `p` lies on its +positive side. \pre `p` and `q` are not equal. +*/ +Line_2 bisector(const Point_2 &p, +const Point_2 &q); + +/*! +constructs the bisector of the two lines \f$ l1\f$ and \f$ l2\f$. +In the general case, the bisector has the direction of the vector which +is the sum of the normalized directions of the two lines, and which passes +through the intersection of `l1` and `l2`. +If `l1` and `l2` are parallel, then the bisector is defined as the line +which has the same direction as `l1`, and which is at the same distance +from `l1` and `l2`. +This function requires that `Kernel::RT` supports the `sqrt()` +operation. +*/ +Line_2 bisector(const Line_2 &l1, +const Line_2 &l2); + +/*! +constructs the bisector plane of the two points `p` and `q`. +The bisector is oriented in such a way that `p` lies on its +positive side. \pre `p` and `q` are not equal. +*/ +Plane_3 bisector(const Point_3 &p, +const Point_3 &q); + +/*! +constructs the bisector of the two planes \f$ h1\f$ and \f$ h2\f$. +In the general case, the bisector has a normal vector which has the same +direction as the sum of the normalized normal vectors of the two planes, and +passes through the intersection of `h1` and `h2`. +If `h1` and `h2` are parallel, then the bisector is defined as the +plane which has the same oriented normal vector as `l1`, and which is at +the same distance from `h1` and `h2`. +This function requires that `Kernel::RT` supports the `sqrt()` +operation. +*/ +Plane_3 bisector(const Plane_3 &h1, +const Plane_3 &h2); + +/// @} + +/// \addtogroup centroid centroid +/// \ingroup PkgKernel23 +/// \sa `CGAL::barycenter` +/// @{ + +/*! +compute the centroid of the points \f$ p\f$, \f$ q\f$, and \f$ r\f$. +*/ +Point_2 +centroid( const Point_2& p, +const Point_2& q, +const Point_2& r); + +/*! +compute the centroid of the points \f$ p\f$, \f$ q\f$, \f$ r\f$, and \f$ s\f$. +*/ +Point_2 +centroid( const Point_2& p, +const Point_2& q, +const Point_2& r, +const Point_2& s); + +/*! +compute the centroid of the triangle \f$ t\f$. +*/ +Point_2 +centroid( const Triangle_2& t); + +/*! +compute the centroid of the points \f$ p\f$, \f$ q\f$, and \f$ r\f$. +*/ +Point_3 +centroid( const Point_3& p, +const Point_3& q, +const Point_3& r); + +/*! +compute the centroid of the points \f$ p\f$, \f$ q\f$, \f$ r\f$, and \f$ s\f$. +*/ +Point_3 +centroid( const Point_3& p, +const Point_3& q, +const Point_3& r, +const Point_3& s); + +/*! +compute the centroid of the triangle \f$ t\f$. +*/ +Point_3 +centroid( const Triangle_3& t); + +/*! +compute the centroid of the tetrahedron \f$ t\f$. +*/ +Point_3 +centroid( const Tetrahedron_3& t); + +/// @} + +/// \addtogroup circumcenter circumcenter +/// \ingroup PkgKernel23 +/// @{ + +/*! +compute the center of the smallest circle passing through the points \f$ p\f$ and +\f$ q\f$. Note: this is the same as `CGAL::midpoint(p, q)` but is provided +for homogeneity. +*/ +Point_2 +circumcenter( const Point_2& p, +const Point_2& q); + +/*! +compute the center of the circle passing through the points \f$ p\f$, \f$ q\f$, and \f$ r\f$. +\pre \f$ p\f$, \f$ q\f$, and \f$ r\f$ are not collinear. +*/ +Point_2 +circumcenter( const Point_2& p, +const Point_2& q, +const Point_2& r); + +/*! +compute the center of the circle passing through the vertices of \f$ t\f$. +\pre \f$ t\f$ is not degenerate. +*/ +Point_2 +circumcenter( const Triangle_2& t); + +/*! +compute the center of the smallest sphere passing through the points \f$ p\f$ and +\f$ q\f$. Note: this is the same as `CGAL::midpoint(p, q)` but is provided +for homogeneity. +*/ +Point_3 +circumcenter( const Point_3& p, +const Point_3& q); + +/*! +compute the center of the circle passing through the points \f$ p\f$, \f$ q\f$, and \f$ r\f$. +\pre \f$ p\f$, \f$ q\f$, and \f$ r\f$ are not collinear. +*/ +Point_3 +circumcenter( const Point_3& p, +const Point_3& q, +const Point_3& r); + +/*! +compute the center of the circle passing through the vertices of \f$ t\f$. +\pre \f$ t\f$ is not degenerate. +*/ +Point_3 +circumcenter( const Triangle_3& t); + +/*! +compute the center of the sphere passing through the points \f$ p\f$, \f$ q\f$, \f$ r\f$, and \f$ s\f$. +\pre \f$ p\f$, \f$ q\f$, \f$ r\f$, and \f$ s\f$ are not coplanar. +*/ +Point_3 +circumcenter( const Point_3& p, +const Point_3& q, +const Point_3& r, +const Point_3& s); + +/*! +compute the center of the sphere passing through the vertices of \f$ t\f$. +\pre \f$ t\f$ is not degenerate. +*/ +Point_3 +circumcenter( const Tetrahedron_3& t); + +/// @} + +/// \addtogroup collinear_are_ordered_along_line collinear_are_ordered_along_line +/// \ingroup PkgKernel23 +/// \sa `CGAL::are_ordered_along_line` +/// \sa `CGAL::are_strictly_ordered_along_line` +/// \sa `CGAL::collinear_are_strictly_ordered_along_line` +/// @{ + +/*! +returns `true`, iff `q` lies between `p` +and `r`. \pre `p, q` and `r` are collinear. +*/ +bool collinear_are_ordered_along_line(const Point_2 &p, +const Point_2 &q, +const Point_2 &r); + +/*! +returns `true`, iff `q` lies between `p` +and `r`. \pre `p, q` and `r` are collinear. +*/ +bool collinear_are_ordered_along_line(const Point_3 &p, +const Point_3 &q, +const Point_3 &r); + +/// @} + +/// \addtogroup collinear_are_strictly_ordered_along_line collinear_are_strictly_ordered_along_line +/// \ingroup PkgKernel23 +/// \sa `CGAL::are_ordered_along_line` +/// \sa `CGAL::are_strictly_ordered_along_line` +/// \sa `CGAL::collinear_are_ordered_along_line` +/// @{ + +/*! +returns `true`, iff `q` lies strictly between +`p` and `r`. \pre `p, q` and `r` are collinear. +*/ +bool collinear_are_strictly_ordered_along_line(const Point_2 &p, +const Point_2 &q, +const Point_2 &r); + +/*! +returns `true`, iff `q` lies strictly between `p` +and `r`. \pre `p, q` and `r` are collinear. +*/ +bool collinear_are_strictly_ordered_along_line( +const Point_3 &p, +const Point_3 &q, +const Point_3 &r); + +/// @} + +/// \addtogroup collinear collinear +/// \ingroup PkgKernel23 +/// \sa `CGAL::left_turn` +/// \sa `CGAL::orientation` +/// \sa `CGAL::right_turn` +/// @{ + +/*! +returns `true`, iff \f$ p\f$, \f$ q\f$, and \f$ r\f$ are collinear. +*/ +bool collinear(const Point_2 &p, +const Point_2 &q, +const Point_2 &r); + +/*! +returns `true`, iff \f$ p\f$, \f$ q\f$, and \f$ r\f$ are collinear. +*/ +bool collinear(const Point_3 &p, +const Point_3&q, +const Point_3&r); + +/// @} + + + +/// \addtogroup compare_dihedral_angle compare_dihedral_angle +/// \ingroup PkgKernel23 +/// @{ + +/*! +compares the dihedral angles \f$ \theta_1\f$ and \f$ \theta_2\f$, where +\f$ \theta_1\f$ is the dihedral angle, in \f$ [0, \pi]\f$, of the tetrahedron +\f$ (a_1, b_1, c_1, d_1)\f$ at the edge \f$ (a_1, b_1)\f$, and \f$ \theta_2\f$ is +the angle in \f$ [0, \pi]\f$ such that \f$ cos(\theta_2) = cosine\f$. +The result is the same as `compare_dihedral_angle(b1-a1, c1-a1, d1-a1, cosine)`. +\pre \f$ a_1\f$, \f$ b_1\f$, \f$ c_1\f$ are not collinear, and \f$ a_1\f$, \f$ b_1\f$, \f$ d_1\f$ are not collinear. +*/ +Comparison_result compare_dihedral_angle(const Point_3& a1, +const Point_3& b1, +const Point_3& c1, +const Point_3& d1, +const K::FT& cosine); + +/*! +compares the dihedral angles \f$ \theta_1\f$ and \f$ \theta_2\f$, where +\f$ \theta_i\f$ is the dihedral angle in the tetrahedron \f$ (a_i, b_i, +c_i, d_i)\f$ at the edge \f$ (a_i, b_i)\f$. These two angles are computed +in \f$ [0, \pi]\f$. +The result is the same as `compare_dihedral_angle(b1-a1, c1-a1, d1-a1, b2-a2, c2-a2, d2-a2)`. +\pre For \f$ i \in\{1,2\}\f$, \f$ a_i\f$, \f$ b_i\f$, \f$ c_i\f$ are not collinear, and \f$ a_i\f$, \f$ b_i\f$, \f$ d_i\f$ are not collinear. +*/ +Comparison_result compare_dihedral_angle(const Point_3& a1, +const Point_3& b1, +const Point_3& c1, +const Point_3& d1, +const Point_3& a2, +const Point_3& b2, +const Point_3& c2, +const Point_3& d2); + +/*! +compares the dihedral angles \f$ \theta_1\f$ and \f$ \theta_2\f$, where +\f$ \theta_1\f$ is the dihedral angle, in \f$ [0, \pi]\f$, between the +vectorial planes defined by \f$ (u_1, v_1)\f$ and \f$ (u_1, w_1)\f$, and +\f$ \theta_2\f$ is the angle in \f$ [0, \pi]\f$ such that \f$ cos(\theta_2) = +cosine\f$. +\pre \f$ u_1\f$ and \f$ v_1\f$ are not collinear, and \f$ u_1\f$ and \f$ w_1\f$ are not collinear. +*/ +Comparison_result +compare_dihedral_angle(const K::Vector_3& u1, +const K::Vector_3& v1, +const K::Vector_3& w1, +const K::FT& cosine); + +/*! +compares the dihedral angles \f$ \theta_1\f$ and \f$ \theta_2\f$, where +\f$ \theta_i\f$ is the dihedral angle between the vectorial planes +defined by \f$ (u_i, v_i)\f$ and \f$ (u_i, w_i)\f$. These two angles are +computed in \f$ [0, \pi]\f$. +\pre For \f$ i \in\{1,2\}\f$, \f$ u_i\f$ and \f$ v_i\f$ are not collinear, and \f$ u_i\f$ and \f$ w_i\f$ are not collinear. +*/ +Comparison_result +compare_dihedral_angle(const K::Vector_3& u1, +const K::Vector_3& v1, +const K::Vector_3& w1, +const K::Vector_3& u2, +const K::Vector_3& v2, +const K::Vector_3& w2); + +/// @} + +/// \addtogroup compare_distance_to_point compare_distance_to_point +/// \ingroup PkgKernel23 +/// \sa `CGAL::compare_squared_distance` +/// \sa `CGAL::compare_signed_distance_to_line` +/// \sa `CGAL::compare_signed_distance_to_plane` +/// \sa `CGAL::has_larger_distance_to_point` +/// \sa `CGAL::has_larger_signed_distance_to_line` +/// \sa `CGAL::has_larger_signed_distance_to_plane` +/// \sa `CGAL::has_smaller_distance_to_point` +/// \sa `CGAL::has_smaller_signed_distance_to_line` +/// \sa `CGAL::has_smaller_signed_distance_to_plane` +/// @{ + +/*! +compares the distances of points `q` and +`r` to point `p`. +returns `SMALLER`, iff `q` is closer +to `p` than `r`, `LARGER`, iff +`r` is closer to `p` than `q`, and +`EQUAL` otherwise. +*/ +Comparison_result +compare_distance_to_point(const Point_2& p, +const Point_2& q, +const Point_2& r); + +/*! +compares the distances of points `q` and +`r` to point `p`. +returns `SMALLER`, iff `q` is closer +to `p` than `r`, `LARGER`, iff +`r` is closer to `p` than `q`, and +`EQUAL` otherwise. +*/ +Comparison_result +compare_distance_to_point(const Point_3& p, +const Point_3& q, +const Point_3& r); + +/// @} + + + +/// \addtogroup compare_lexicographically compare_lexicographically +/// \ingroup PkgKernel23 +/// @{ + +/*! +Compares the Cartesian coordinates of points `p` and +`q` lexicographically in \f$ xy\f$ order: first +\f$ x\f$-coordinates are compared, if they are equal, \f$ y\f$-coordinates +are compared. This is the same function as `compare_xy` and exists for compatibility with `Point_d`. +*/ +Comparison_result +compare_lexicographically(const Point_2& p, const Point_2& q); + +/*! +Compares the Cartesian coordinates of points `p` and +`q` lexicographically in \f$ xyz\f$ order: first +\f$ x\f$-coordinates are compared, if they are equal, \f$ y\f$-coordinates +are compared, and if both \f$ x\f$- and \f$ y\f$- coordinate are equal, +\f$ z\f$-coordinates are compared. This is the same function as `compare_xyz` and exists for compatibility with `Point_d`. +*/ +Comparison_result +compare_lexicographically(const Point_3& p, const Point_3& q); + +/// @} + + +/// \addtogroup compare_signed_distance_to_line compare_signed_distance_to_line +/// \ingroup PkgKernel23 +/// \sa `CGAL::compare_distance_to_point` +/// \sa `CGAL::compare_signed_distance_to_plane` +/// \sa `CGAL::has_larger_distance_to_point` +/// \sa `CGAL::has_larger_signed_distance_to_line` +/// \sa `CGAL::has_larger_signed_distance_to_plane` +/// \sa `CGAL::has_smaller_distance_to_point` +/// \sa `CGAL::has_smaller_signed_distance_to_line` +/// \sa `CGAL::has_smaller_signed_distance_to_plane` +/// @{ + +/*! +returns `LARGER` +iff the signed distance of `p` and +`l` is larger than the signed distance of `q` +and `l`, `SMALLER`, iff it is smaller, +and `EQUAL` iff both are equal. +*/ +Comparison_result +compare_signed_distance_to_line(const Line_2& l, +const Point_2& p, +const Point_2& q); + +/*! +returns `LARGER` +iff the signed distance of `r` and +`l` is larger than the signed distance of `s` +and `l`, `SMALLER`, iff it is smaller, +and `EQUAL` iff both are equal, where +`l` is the directed line through `p` and `q`. +*/ +Comparison_result +compare_signed_distance_to_line(const Point_2& p, +const Point_2& q, +const Point_2& r, +const Point_2& s); + +/*! +returns `LARGER` +iff the signed distance of `p` and +`h` is larger than the signed distance of `q` +and `h`, `SMALLER`, iff it is smaller, +and `EQUAL` iff both are equal. +*/ +Comparison_result +compare_signed_distance_to_plane(const Plane_3& h, +const Point_3& p, +const Point_3& q); + +/*! +returns `LARGER` +iff the signed distance of `s` and +`h` is larger than the signed distance of `t` +and `h`, `SMALLER`, iff it is smaller, +and `EQUAL` iff both are equal, where +`h` is the oriented plane through `p`, `q` and +`r`. +*/ +Comparison_result +compare_signed_distance_to_plane(const Point_3& p, +const Point_3& q, +const Point_3& r, +const Point_3& s, +const Point_3& t); + +/// @} + + + +/// \addtogroup compare_slopes compare_slopes +/// \ingroup PkgKernel23 +/// @{ + +/*! +compares the slopes of the lines `l1` and `l2` +*/ +Comparison_result compare_slopes(const Line_2 &l1, +const Line_2 &l2); + +/*! +compares the slopes of the segments `s1` and `s2` +*/ +Comparison_result compare_slopes(const Segment_2 &s1, +const Segment_2 &s2); + +/// @} + +/// \addtogroup compare_squared_distance compare_squared_distance +/// \ingroup PkgKernel23 +/// \sa `CGAL::compare_distance_to_point` +/// \sa `CGAL::compare_signed_distance_to_line` +/// \sa `CGAL::compare_signed_distance_to_plane` +/// \sa `CGAL::has_larger_distance_to_point` +/// \sa `CGAL::has_larger_signed_distance_to_line` +/// \sa `CGAL::has_larger_signed_distance_to_plane` +/// \sa `CGAL::has_smaller_distance_to_point` +/// \sa `CGAL::has_smaller_signed_distance_to_line` +/// \sa `CGAL::has_smaller_signed_distance_to_plane` +/// @{ + +/*! +compares the squared distance of points `p` and +`q` to `d2`. +*/ +Comparison_result +compare_squared_distance(const Point_2& p, +const Point_2& q, +const typename Kernel::FT& d2); + +/*! +compares the squared distance of points `p` and +`q` to `d2`. +*/ +Comparison_result +compare_squared_distance(const Point_3& p, +const Point_3& q, +const typename Kernel::FT& d2); + +/// @} + +/// \addtogroup compare_squared_radius compare_squared_radius +/// \ingroup PkgKernel23 +/// @{ + +/*! +compares the squared radius of the sphere of radius 0 centered at +`p` to `sr`. +This returns the opposite sign of `sr`. +*/ +Comparison_result +compare_squared_radius(const Point_3& p, +const typename Kernel::FT& sr); + +/*! +compares the squared radius of the sphere defined by the +points `p` and `q` to `sr`. +*/ +Comparison_result +compare_squared_radius(const Point_3& p, +const Point_3& q, +const typename Kernel::FT& sr); + +/*! +compares the squared radius of the sphere defined by the +points `p`, `q`, and `r` to `sr`. +*/ +Comparison_result +compare_squared_radius(const Point_3& p, +const Point_3& q, +const Point_3& r, +const typename Kernel::FT& sr); + +/*! +compares the squared radius of the sphere defined by the +points `p`, `q`, `r`, and `r` to `sr`. +*/ +Comparison_result +compare_squared_radius(const Point_3& p, +const Point_3& q, +const Point_3& r, +const Point_3& s, +const typename Kernel::FT& sr); + +/// @} + +/*! +\addtogroup compare_x compare_x +\ingroup PkgKernel23 + +Depending on which \cgal kernel is used, +different versions of this global function are available. This is +described below. + +With the basic 2D and 3D Kernel (see Chapter \ref chapterkernel23) + +\anchor figcompare_x +\image html compare1.gif + +\sa `CGAL::compare_xy` +\sa `CGAL::compare_xyz` +\sa `CGAL::compare_x_at_y` +\sa `CGAL::compare_y` +\sa `CGAL::compare_yx` +\sa `CGAL::compare_y_at_x` +\sa `CGAL::compare_z` +*/ +/// @{ +/*! +compares the \f$ x\f$-coordinates of \f$ p\f$ and \f$ q\f$. +*/ +Comparison_result compare_x(const Point_2 &p, + const Point_2 &q); +/*! +compares the \f$ x\f$-coordinates of \f$ p\f$ and \f$ q\f$. +*/ +Comparison_result compare_x(const Point_3 &p, + const Point_3 &q); +/*! +compares the \f$ x\f$-coordinates of \f$ p\f$ and the intersection +of lines \f$ l1\f$ and \f$ l2\f$. +See Figure \ref figcompare_x (a). +*/ +Comparison_result compare_x(const Point_2 &p, + const Line_2 &l1, + const Line_2 &l2); + +/*! +compares the \f$ x\f$-coordinates of the intersection of line \f$ l\f$ +with line \f$ h1\f$ and with line \f$ h2\f$. + +See Figure \ref figcompare_x (b). +*/ +Comparison_result compare_x(const Line_2 &l, + const Line_2 &h1, + const Line_2 &h2); +/*! +compares the \f$ x\f$-coordinates of the intersection of lines \f$ l1\f$ +and \f$ l2\f$ and the intersection of lines \f$ h1\f$ and \f$ h2\f$. + +See Figure \ref figcompare_x (c). +*/ +Comparison_result compare_x(const Line_2 &l1, + const Line_2 &l2, + const Line_2 &h1, + const Line_2 &h2); + +/*! +\name With the 2D Circular Kernel + +See Chapter \ref chaptercircularkernel. + +\code +#include +\endcode + +If this kernel is used, in addition to the function and the +combination of 2D types described above, another version of the function +is provided. +*/ +/// @{ +/*! +compares the \f$ x\f$-coordinates of \f$ p\f$ and \f$ q\f$. +*/ +Comparison_result + compare_x(const Circular_arc_point_2 &p, + const Circular_arc_point_2 &q); +/*! +compares the \f$ x\f$-coordinates of \f$ p\f$ and \f$ q\f$. +*/ +Comparison_result + compare_x(const Circular_arc_point_2 &p, + const Point_2 &q); + +/// @} + +/*! +\name With the 3D Spherical Kernel + +See Chapter \ref chaptersphericalkernel. + +\code +#include +\endcode + +If this kernel is used, in addition to the function and the +combination of 2D types described above, another version of the function +is provided. +*/ +/// @{ + +/*! +compares the \f$ x\f$-coordinates of \f$ p\f$ and \f$ q\f$. +*/ +Comparison_result + compare_x(const Circular_arc_point_3 &p, + const Circular_arc_point_3 &q); + +/*! +compares the \f$ x\f$-coordinates of \f$ p\f$ and \f$ q\f$. +*/ +Comparison_result + compare_x(const Circular_arc_point_3 &p, + const Point_3 &q); +/// @} + +/// @} + +/*! +\addtogroup compare_xy compare_xy +\ingroup PkgKernel23 + +Depending on which \cgal kernel is used, different versions of this +global function are available. This is described below. + +\sa `CGAL::compare_xyz` +\sa `CGAL::compare_x` +\sa `CGAL::compare_x_at_y` +\sa `CGAL::compare_y` +\sa `CGAL::compare_yx` +\sa `CGAL::compare_y_at_x` +\sa `CGAL::compare_z` + +With the basic 2D and 3D Kernel (see Chapter \ref chapterkernel23) + +*/ +/// @{ + +/*! + +Compares the Cartesian coordinates of points `p` and +`q` lexicographically in \f$ xy\f$ order: first +\f$ x\f$-coordinates are compared, if they are equal, \f$ y\f$-coordinates +are compared. + +*/ +Comparison_result +compare_xy(const Point_2& p, const Point_2& q); + +/*! + +Compares the Cartesian coordinates of points `p` and `q` +lexicographically in \f$ xy\f$ order: first \f$ x\f$-coordinates are +compared, if they are equal, \f$ y\f$-coordinates are compared. + +*/ +Comparison_result +compare_xy(const Point_3& p, const Point_3& q); + +/*! +\name With the 2D Circular Kernel +See Chapter \ref chaptercircularkernel. + +\code +#include +\endcode + +If this kernel is used, in addition to the function and the +combination of 2D types described above, another version of the +function is provided. +*/ +/// @{ + +/*! +Compares the \f$ x\f$ and \f$ y\f$ Cartesian coordinates of points `p` and +`q` lexicographically. +*/ +Comparison_result + compare_xy(const Circular_arc_point_2 &p, + const Circular_arc_point_2 &q); + +/*! +Compares the \f$ x\f$ and \f$ y\f$ Cartesian coordinates of points `p` and +`q` lexicographically. +*/ +Comparison_result +compare_xy(const Circular_arc_point_2 &p, + const Point_2 &q); + +/// @} + +/*! +\name With the 3D Spherical Kernel +See Chapter \ref chaptersphericalkernel. + +\code +#include +\endcode + +If this kernel is used, in addition to the function and the +combination of 2D types described above, another version of the function +is provided. +*/ +/// @{ + +/*! + +Compares the \f$ x\f$ and \f$ y\f$ Cartesian coordinates of points `p` and +`q` lexicographically. +*/ +Comparison_result + compare_xy(const Circular_arc_point_3 &p, + const Circular_arc_point_3 &q); +/*! + +Compares the \f$ x\f$ and \f$ y\f$ Cartesian coordinates of points `p` and +`q` lexicographically. +*/ +Comparison_result + compare_xy(const Circular_arc_point_3 &p, + const Point_3 &q); + +/// @} + +/// @} + +/*! +\addtogroup compare_x_at_y compare_x_at_y +\ingroup PkgKernel23 + +\anchor figcomparexaty +\image html compare_x_at_y.gif + +\sa `CGAL::compare_xy` +\sa `CGAL::compare_xyz` +\sa `CGAL::compare_x` +\sa `CGAL::compare_y` +\sa `CGAL::compare_yx` +\sa `CGAL::compare_y_at_x` +\sa `CGAL::compare_z` +*/ +/// @{ + +/*! +compares the \f$ x\f$-coordinates of \f$ p\f$ and the horizontal projection +of `p` on `h`. +See Figure \ref figcomparexaty (a). +\pre `h` is not horizontal. +*/ +Comparison_result compare_x_at_y(const Point_2 &p, +const Line_2 &h); + +/*! +This function compares the \f$ x\f$-coordinates of the horizontal projection +of `p` on `h1` and on `h2`. +See Figure \ref figcomparexaty (b). +\pre `h1` and `h2` are not horizontal. +*/ +Comparison_result compare_x_at_y(const Point_2 &p, +const Line_2 &h1, +const Line_2 &h2); + +/*! +Let \f$ p\f$ be the intersection of lines \f$ l1\f$ and \f$ l2\f$. +This function compares the \f$ x\f$-coordinates of \f$ p\f$ and +the horizontal projection of `p` on `h`. +See Figure \ref figcomparexaty (c). +\pre `l1` and `l2` intersect and are not horizontal; `h` is not horizontal. +*/ +Comparison_result compare_x_at_y(const Line_2 &l1, +const Line_2 &l2, +const Line_2 &h); + +/*! +Let \f$ p\f$ be the intersection of lines \f$ l1\f$ and \f$ l2\f$. This +function compares the \f$ x\f$-coordinates of the horizontal projection of +`p` on `h1` and on `h2` +See Figure \ref figcomparexaty (d). +\pre `l1` and `l2` intersect and are not horizontal; `h1` and `h2` are not horizontal. +*/ +Comparison_result compare_x_at_y(const Line_2 &l1, +const Line_2 &l2, +const Line_2 &h1, +const Line_2 &h2); + +/// @} + +/*! + \addtogroup compare_y_at_x compare_y_at_x + \ingroup PkgKernel23 + + \anchor figcompareyatx + \image html compare2.gif + + \sa `CGAL::compare_xy` + \sa `CGAL::compare_xyz` + \sa `CGAL::compare_x` + \sa `CGAL::compare_y` + \sa `CGAL::compare_yx` + \sa `CGAL::compare_x_at_y` + \sa `CGAL::compare_z` +*/ +/// @{ + +/*! + compares the \f$y\f$-coordinates of \f$p\f$ and the vertical projection + of `p` on `h`. + See Figure \ref figcompareyatx (d). + + \pre `h` is not vertical. +*/ +Comparison_result compare_y_at_x(const Point_2 &p, + const Line_2 &h); + +/*! + compares the \f$y\f$-coordinates of the vertical projection + of `p` on `h1` and on `h2`. + See Figure \ref figcompareyatx (e). + + \pre `h1` and `h2` are not vertical. +*/ +Comparison_result compare_y_at_x(const Point_2 &p, + const Line_2 &h1, + const Line_2 &h2); + + +/*! + Let \f$p\f$ be the `intersection` of lines \f$l1\f$ and \f$l2\f$. + This function compares the \f$y\f$-coordinates of \f$p\f$ and + the vertical projection of `p` on `h` + See Figure \ref figcompareyatx (f). + + \pre `l1`, `l2` intersect and `h` is not vertical. +*/ +Comparison_result compare_y_at_x(const Line_2 &l1, + const Line_2 &l2, + const Line_2 &h); + +/*! + Let \f$p\f$ be the `intersection` of lines \f$l1\f$ and \f$l2\f$. This function + compares the \f$y\f$-coordinates of the vertical projection of `p` on + `h1` and on `h2`. + See Figure \ref figcompareyatx (g). + \pre `l1` and `l2` intersect; `h1` and `h2` are not vertical. +*/ +Comparison_result compare_y_at_x(const Line_2 &l1, + const Line_2 &l2, + const Line_2 &h1, + const Line_2 &h2); + +/*! + compares the \f$y\f$-coordinates of \f$p\f$ and the vertical projection + of `p` on `s`. If `s` is vertical, then return + `EQUAL` when `p` lies on `s`, `SMALLER` when `p` lies + under {s}, and `LARGER` otherwise. + \pre `p` is within the x range of `s`. +*/ +Comparison_result compare_y_at_x(const Point_2 &p, + const Segment_2 &s); + +/*! + compares the \f$y\f$-coordinates of the vertical projection + of `p` on `s1` and on `s2`. If `s1` or `s2` + is vertical, then return `EQUAL` if they intersect, otherwise return + `SMALLER` if `s1` lies below `s2`, and return `LARGER` + otherwise. + \pre `p` is within the x range of `s1` and `s2`. +*/ +Comparison_result compare_y_at_x(const Point_2 &p, + const Segment_2 &s1, + const Segment_2 &s2); + +/*! + \name With the 2D Circular Kernel + See \ref chaptercircularkernel. + + \code + #include + \endcode + + If this kernel is used, in addition to the function and the + combination of 2D types described above, another version of the function + is provided. +*/ +/// @{ + +/// Same as above, for a point and a circular arc. +Comparison_result +compare_y_at_x(const Circular_arc_point_2 &p, + const Circular_arc_2 &a); + +/// Same as above, for a point and a line segment. +Comparison_result +compare_y_at_x(const Circular_arc_point_2 &p, + const Line_arc_2 &a); + + +/// @} + +/// @} + + +/*! +\addtogroup compare_y compare_y +\ingroup PkgKernel23 + +Depending on which \cgal kernel is used, different versions of this +global function are available. This is described below. + +\sa `CGAL::compare_xy` +\sa `CGAL::compare_xyz` +\sa `CGAL::compare_x` +\sa `CGAL::compare_x_at_y` +\sa `CGAL::compare_yx` +\sa `CGAL::compare_y_at_x` +\sa `CGAL::compare_z` + +With the basic 2D and 3D Kernel +(see Chapter \ref chapterkernel23) + +\anchor figcompare13 +\image html compare1.gif + +*/ +/// @{ + +/*! + compares Cartesian \f$ y\f$-coordinates of \f$ p\f$ and \f$ q\f$. +*/ +Comparison_result compare_y(const Point_2 &p, + const Point_2 &q); +/*! + compares Cartesian \f$ y\f$-coordinates of \f$ p\f$ and \f$ q\f$. +*/ +Comparison_result compare_y(const Point_3 &p, + const Point_3 &q); + +/*! + + compares the \f$ y\f$-coordinates of \f$ p\f$ and the intersection of lines + \f$ l1\f$ and \f$ l2\f$. + See Figure \ref figcompare13 (a). + +*/ +Comparison_result compare_y(const Point_2 &p, + const Line_2 &l1, + const Line_2 &l2); +/*! + + compares the \f$ y\f$-coordinates of the intersection of line \f$ l\f$ + with line \f$ h1\f$ and with line \f$ h2\f$. + See Figure \ref figcompare13 (b). +*/ +Comparison_result compare_y(const Line_2 &l, + const Line_2 &h1, + const Line_2 &h2); +/*! + compares the \f$ y\f$-coordinates of the intersection of lines \f$ l1\f$ + and \f$ l2\f$ and the intersection of lines \f$ h1\f$ and \f$ h2\f$. + See Figure \ref figcompare13 (c). +*/ +Comparison_result compare_y(const Line_2 &l1, + const Line_2 &l2, + const Line_2 &h1, + const Line_2 &h2); + +/*! +\name With the 2D Circular Kernel +See Chapter \ref chaptercircularkernel. + +\code +#include +\endcode + +If this kernel is used, in addition to the function and the +combination of 2D types described above, another version of the function +is provided. +*/ +/// @{ +/*! + compares the \f$ y\f$-coordinates of \f$ p\f$ and \f$ q\f$. +*/ +Comparison_result +compare_y(const Circular_arc_point_2 &p, + const Circular_arc_point_2 &q); + +/*! + compares the \f$ y\f$-coordinates of \f$ p\f$ and \f$ q\f$. +*/ +Comparison_result +compare_y(const Circular_arc_point_2 &p, + const Point_2 &q); + +/// @} + +/*! +\name With the 3D Circular Kernel +See Chapter \ref chaptersphericalkernel. + +\code +#include +\endcode + +If this kernel is used, in addition to the function and the +combination of 2D types described above, another version of the function +is provided. +*/ +/// @{ +/*! +compares the \f$ y\f$-coordinates of \f$ p\f$ and \f$ q\f$. +*/ +Comparison_result + compare_y(const Circular_arc_point_3 &p, + const Circular_arc_point_3 &q); +/*! +compares the \f$ y\f$-coordinates of \f$ p\f$ and \f$ q\f$. +*/ +Comparison_result + compare_y(const Circular_arc_point_3 &p, + const Point_3 &q); +/// @} + +/// @} + + +/*! +\addtogroup compare_xyz compare_xyz +\ingroup PkgKernel23 + +Depending on which \cgal kernel is used, different versions of this +global function are available. This is described below. + +\sa `CGAL::compare_xy` +\sa `CGAL::compare_x` +\sa `CGAL::compare_x_at_y` +\sa `CGAL::compare_y` +\sa `CGAL::compare_yx` +\sa `CGAL::compare_y_at_x` +\sa `CGAL::compare_z` + +*/ +/// @{ + +/*! +Compares the Cartesian coordinates of points `p` and +`q` lexicographically in \f$ xyz\f$ order: first +\f$ x\f$-coordinates are compared, if they are equal, \f$ y\f$-coordinates +are compared, and if both \f$ x\f$- and \f$ y\f$- coordinate are equal, +\f$ z\f$-coordinates are compared. +*/ +Comparison_result +compare_xyz(const Point_3& p, const Point_3& q); + +/*! +\name With the 3D Spherical Kernel +See Chapter \ref chaptersphericalkernel + +\code +#include +\endcode + +If this kernel is used, in addition to the function and the +combination of 2D types described above, another version of the +function is provided. + +*/ +/// @{ + +/*! Compares the Cartesian coordinates of points `p` and `q` lexicographically. +*/ +Comparison_result +compare_xyz(const Circular_arc_point_3 &p, +const Circular_arc_point_3 &q); + +/*! +Compares the Cartesian coordinates of points `p` and `q` lexicographically. +*/ +Comparison_result +compare_xyz(const Circular_arc_point_3 &p, +const Point_3 &q); + +/// @} +/// @} + + +/*! +\addtogroup compare_z compare_z +\ingroup PkgKernel23 + +Depending on which \cgal kernel is used, +different versions of this global function are available. This is +described below. + +\sa `CGAL::compare_xy` +\sa `CGAL::compare_xyz` +\sa `CGAL::compare_x` +\sa `CGAL::compare_x_at_y` +\sa `CGAL::compare_y` +\sa `CGAL::compare_yx` +\sa `CGAL::compare_y_at_x` +*/ +/// @{ + +/*! +compares the \f$ z\f$-coordinates of \f$ p\f$ and \f$ q\f$. +*/ +Comparison_result compare_z(const Point_3 &p, const Point_3 &q); + +/*! +\name With the 3D Spherical Kernel +See Chapter \ref chaptersphericalkernel + +\code +#include +\endcode + +If this kernel is used, in addition to the function and the +combination of 2D types described above, another version of the +function is provided. + +*/ +/// @{ + + +/*! +compares the \f$ z\f$-coordinates of \f$ p\f$ and \f$ q\f$. +*/ +Comparison_result +compare_z(const Circular_arc_point_3 &p, const Circular_arc_point_3 &q); + +/*! +compares the \f$ z\f$-coordinates of \f$ p\f$ and \f$ q\f$. +*/ +Comparison_result +compare_z(const Circular_arc_point_3 &p, const Point_3 &q); + +/// @} +/// @} + +/// \addtogroup compare_yx compare_yx +/// \ingroup PkgKernel23 +/// \sa `CGAL::compare_xy` +/// \sa `CGAL::compare_xyz` +/// \sa `CGAL::compare_x` +/// \sa `CGAL::compare_x_at_y` +/// \sa `CGAL::compare_y` +/// \sa `CGAL::compare_y_at_x` +/// \sa `CGAL::compare_z` +/// @{ + +/*! +Compares the Cartesian coordinates of points `p` and +`q` lexicographically in \f$ yx\f$ order: first +\f$ y\f$-coordinates are compared, if they are equal, \f$ x\f$-coordinates +are compared. +*/ +Comparison_result +compare_yx(const Point_2& p, const Point_2& q); + +/// @} + + +/// \addtogroup bool coplanar bool coplanar +/// \ingroup PkgKernel23 +/// \sa `CGAL::coplanar_orientation` +/// \sa `CGAL::coplanar_side_of_bounded_circle` +/// @{ + +/*! +returns `true`, if \f$ p\f$, \f$ q\f$, \f$ r\f$, and \f$ s\f$ are coplanar. +*/ +bool coplanar(const Point_3 &p, +const Point_3&q, +const Point_3&r, +const Point_3&s); + +/// @} + +/// \addtogroup coplanar_orientation coplanar_orientation +/// \ingroup PkgKernel23 +/// \sa `CGAL::coplanar` +/// \sa `CGAL::coplanar_side_of_bounded_circle` +/// \sa `CGAL::orientation` +/// @{ + +/*! +Let \f$ P\f$ be the plane defined by the points `p`, `q`, +and `r`. Note that the order defines the orientation of +\f$ P\f$. The function computes the orientation of points `p`, +`q`, and `s` in \f$ P\f$: Iff `p`, `q`, `s` are +collinear, `COLLINEAR` is returned. Iff \f$ P\f$ and the plane +defined by `p`, `q`, and `s` have the same orientation, +`POSITIVE` is returned; otherwise `NEGATIVE` is returned. +\pre `p`, `q`, `r`, and `s` are coplanar and `p`, `q`, and `r` are not collinear. +*/ +Orientation coplanar_orientation(const Point_3& p, +const Point_3& q, +const Point_3& r, +const Point_3& s); + +/*! +If `p,q,r` are collinear, then `COLLINEAR` is returned. +If not, then `p,q,r` define a plane \f$ P\f$. The return value in this case is +either `POSITIVE` or `NEGATIVE`, but we don't specify it explicitly. +However, we guarantee that all calls to this predicate over 3 points in \f$ P\f$ +will return a coherent orientation if considered a 2D orientation in \f$ P\f$. +*/ +Orientation coplanar_orientation(const Point_3& p, +const Point_3& q, +const Point_3& r); + +/// @} + + + +/// \addtogroup coplanar_side_of_bounded_circle coplanar_side_of_bounded_circle +/// \ingroup PkgKernel23 +/// \sa `CGAL::coplanar_orientation` +/// \sa `CGAL::side_of_bounded_circle` +/// @{ + +/*! +returns the bounded side of the circle defined +by `p`, `q`, and `r` on which `s` lies. +\pre `p`, `q`, `r`, and `s` are coplanar and `p`, `q`, and `r` are not collinear. +*/ +Bounded_side coplanar_side_of_bounded_circle(const Point_3& p, +const Point_3& q, +const Point_3& r, +const Point_3& s); + +/// @} + + +/// \addtogroup cross_product cross_product +/// \ingroup PkgKernel23 +/// @{ + +/*! +returns the cross product of \f$ u\f$ and \f$ v\f$. +*/ +Vector_3 cross_product( const Vector_3& u, +const Vector_3& v); + +/// @} + +/// \addtogroup determinant determinant +/// \ingroup PkgKernel23 +/// \sa `CGAL::orientation` +/// \sa `CGAL::collinear` +/// \sa `CGAL::left_turn` +/// \sa `CGAL::right_turn` +/// @{ + +/*! +returns the determinant of \f$ v\f$ and \f$ w\f$. +*/ +Kernel::FT determinant(const Vector_2& v, +const Vector_2& w); + +/*! +returns the determinant of \f$ u\f$, \f$ v\f$ and \f$ w\f$. +*/ +Kernel::FT determinant(const Vector_3& u, +const Vector_3& v, +const Vector_3& w); + +/// @} + +/// \addtogroup equidistant_line equidistant_line +/// \ingroup PkgKernel23 +/// @{ + +/*! +constructs the line which is at the same distance from the three points +`p`, `q` and `r`. +\pre `p`, `q` and `r` are not collinear. +*/ +Line_3 equidistant_line(const Point_3 &p, +const Point_3 &q, +const Point_3 &r); + +/// @} + +/// \addtogroup has_larger_distance_to_point has_larger_distance_to_point +/// \ingroup PkgKernel23 +/// \sa `CGAL::compare_distance_to_point` +/// \sa `CGAL::compare_signed_distance_to_line` +/// \sa `CGAL::compare_signed_distance_to_plane` +/// \sa `CGAL::has_larger_signed_distance_to_line` +/// \sa `CGAL::has_larger_signed_distance_to_plane` +/// \sa `CGAL::has_smaller_distance_to_point` +/// \sa `CGAL::has_smaller_signed_distance_to_line` +/// \sa `CGAL::has_smaller_signed_distance_to_plane` +/// @{ + +/*! +returns `true` iff the distance between `q` +and `p` is larger than the distance between `r` +and `p`. +*/ +bool +has_larger_distance_to_point(const Point_2& p, +const Point_2& q, +const Point_2& r); + +/*! +returns `true` iff the distance between `q` +and `p` is larger than the distance between `r` +and `p`. +*/ +bool +has_larger_distance_to_point(const Point_3& p, +const Point_3& q, +const Point_3& r); + +/// @} + +/// \addtogroup has_larger_signed_distance_to_line has_larger_signed_distance_to_line +/// \ingroup PkgKernel23 +/// \sa `CGAL::compare_distance_to_point` +/// \sa `CGAL::compare_signed_distance_to_line` +/// \sa `CGAL::compare_signed_distance_to_plane` +/// \sa `CGAL::has_larger_distance_to_point` +/// \sa `CGAL::has_larger_signed_distance_to_line` +/// \sa `CGAL::has_larger_signed_distance_to_plane` +/// \sa `CGAL::has_smaller_distance_to_point` +/// \sa `CGAL::has_smaller_signed_distance_to_line` +/// \sa `CGAL::has_smaller_signed_distance_to_plane` +/// @{ + +/*! +returns `true` iff the signed distance of `p` +and `l` is larger than the signed distance of +`q` and `l`. +*/ +bool +has_larger_signed_distance_to_line(const Line_2& l, +const Point_2& p, +const Point_2& q); + +/*! +returns `true` iff the signed distance of `r` +and `l` is larger than the signed distance of +`s` and `l`, where `l` is the directed line +through points `p` and `q`. +*/ +bool +has_larger_signed_distance_to_line(const Point_2& p, +const Point_2& q, +const Point_2& r, +const Point_2& s); + +/// @} + + +/// \addtogroup has_larger_signed_distance_to_plane has_larger_signed_distance_to_plane +/// \ingroup PkgKernel23 +/// \sa `CGAL::compare_distance_to_point` +/// \sa `CGAL::compare_signed_distance_to_line` +/// \sa `CGAL::compare_signed_distance_to_plane` +/// \sa `CGAL::has_larger_distance_to_point` +/// \sa `CGAL::has_larger_signed_distance_to_line` +/// \sa `CGAL::has_smaller_distance_to_point` +/// \sa `CGAL::has_smaller_signed_distance_to_line` +/// \sa `CGAL::has_smaller_signed_distance_to_plane` +/// @{ + +/*! +returns `true` iff the signed distance of `p` +and `h` is larger than the signed distance of +`q` and `h`. +*/ +bool +has_larger_signed_distance_to_plane(const Plane_3& h, +const Point_3& p, +const Point_3& q); + +/*! +returns `true` iff the signed distance of `s` +and `h` is larger than the signed distance of +`t` and `h`, where `h` is the oriented +plane through `p`, `q` and `r`. +*/ +bool +has_larger_signed_distance_to_plane(const Point_3& p, +const Point_3& q, +const Point_3& r, +const Point_3& s, +const Point_3& t); + +/// @} + +/// \addtogroup has_smaller_distance_to_point has_smaller_distance_to_point +/// \ingroup PkgKernel23 +/// \sa `CGAL::compare_distance_to_point` +/// \sa `CGAL::compare_signed_distance_to_line` +/// \sa `CGAL::compare_signed_distance_to_plane` +/// \sa `CGAL::has_larger_distance_to_point` +/// \sa `CGAL::has_larger_signed_distance_to_line` +/// \sa `CGAL::has_larger_signed_distance_to_plane` +/// \sa `CGAL::has_smaller_signed_distance_to_line` +/// \sa `CGAL::has_smaller_signed_distance_to_plane` +/// @{ + +/*! +returns `true` iff the distance between `q` +and `p` is smaller than the distance between `r` +and `p`. +*/ +bool +has_smaller_distance_to_point(const Point_2& p, +const Point_2& q, +const Point_2& r); + +/*! +returns `true` iff the distance between `q` +and `p` is smaller than the distance between `r` +and `p`. +*/ +bool +has_smaller_distance_to_point(const Point_3& p, +const Point_3& q, +const Point_3& r); + +/// @} + +/// \addtogroup has_smaller_signed_distance_to_line has_smaller_signed_distance_to_line +/// \ingroup PkgKernel23 +/// \sa `CGAL::compare_distance_to_point` +/// \sa `CGAL::compare_signed_distance_to_line` +/// \sa `CGAL::compare_signed_distance_to_plane` +/// \sa `CGAL::has_larger_distance_to_point` +/// \sa `CGAL::has_larger_signed_distance_to_line` +/// \sa `CGAL::has_larger_signed_distance_to_plane` +/// \sa `CGAL::has_smaller_distance_to_point` +/// \sa `CGAL::has_smaller_signed_distance_to_plane` +/// @{ + +/*! +returns `true` iff the signed distance of `p` +and `l` is smaller than the signed distance of +`q` and `l`. +*/ +bool +has_smaller_signed_distance_to_line(const Line_2& l, +const Point_2& p, +const Point_2& q); + +/*! +returns `true` iff the signed distance of `r` +and `l` is smaller than the signed distance of +`s` and `l`, where `l` is the +oriented line through `p` and `q`. +*/ +bool +has_smaller_signed_distance_to_line(const Point_2& p, +const Point_2& q, +const Point_2& r, +const Point_2& s); + +/// @} + +/// \addtogroup has_smaller_signed_distance_to_plane has_smaller_signed_distance_to_plane +/// \ingroup PkgKernel23 +/// \sa `CGAL::compare_distance_to_point` +/// \sa `CGAL::compare_signed_distance_to_line` +/// \sa `CGAL::compare_signed_distance_to_plane` +/// \sa `CGAL::has_larger_distance_to_point` +/// \sa `CGAL::has_larger_signed_distance_to_line` +/// \sa `CGAL::has_larger_signed_distance_to_plane` +/// \sa `CGAL::has_smaller_distance_to_point` +/// \sa `CGAL::has_smaller_signed_distance_to_line` +/// @{ + +/*! +returns `true` iff the signed distance of `p` +and `h` is smaller than the signed distance of +`q` and `h`. +*/ +bool +has_smaller_signed_distance_to_plane(const Plane_3& h, +const Point_3& p, +const Point_3& q); + +/*! +returns `true` iff the signed distance of `p` +and `h` is smaller than the signed distance of +`q` and `h`, where `h` is the oriented +plane through `p`, `q` and `r`. +*/ +bool +has_smaller_signed_distance_to_plane(const Point_3& p, +const Point_3& q, +const Point_3& r, +const Point_3& s, +const Point_3& t); + +/// @} + +/// \addtogroup left_turn left_turn +/// \ingroup PkgKernel23 + +/// \sa `CGAL::collinear` +/// \sa `CGAL::orientation` +/// \sa `CGAL::right_turn` + +/// @{ + +/*! +returns `true` iff `p`, `q`, and `r` form a left turn. +*/ +bool left_turn(const Point_2 &p, +const Point_2 &q, +const Point_2 &r); + +/// @} + + + +/// \addtogroup lexicographically_xy_larger lexicographically_xy_larger +/// \ingroup PkgKernel23 +/// \sa `CGAL::compare_xy` +/// \sa `CGAL::lexicographically_xy_larger_or_equal` +/// \sa `CGAL::lexicographically_xy_smaller` +/// \sa `CGAL::lexicographically_xy_smaller_or_equal` +/// @{ + +/*! +returns `true` iff `p` is lexicographically larger +than `q` with respect to \f$ xy\f$ order. +*/ +bool +lexicographically_xy_larger(const Point_2& p, +const Point_2& q); + +/// @} + + + +/// \addtogroup lexicographically_xy_larger_or_equal lexicographically_xy_larger_or_equal +/// \ingroup PkgKernel23 + +/// \sa `CGAL::compare_xy` +/// \sa `CGAL::lexicographically_xy_larger` +/// \sa `CGAL::lexicographically_xy_smaller` +/// \sa `CGAL::lexicographically_xy_smaller_or_equal` + +/// @{ + +/*! +returns `true` iff `p` is lexicographically not smaller +than `q` with respect to \f$ xy\f$ order. +*/ +bool +lexicographically_xy_larger_or_equal(const Point_2& p, +const Point_2& q); + +/// @} + +/// \addtogroup lexicographically_xy_smaller lexicographically_xy_smaller +/// \ingroup PkgKernel23 + +/// \sa `CGAL::compare_xy` +/// \sa `CGAL::lexicographically_xy_larger` +/// \sa `CGAL::lexicographically_xy_larger_or_equal` +/// \sa `CGAL::lexicographically_xy_smaller_or_equal` + +/// @{ + +/*! +returns `true` iff `p` is lexicographically smaller +than `q` with respect to \f$ xy\f$ order. +*/ +bool +lexicographically_xy_smaller(const Point_2& p, +const Point_2& q); + +/// @} + + +/// \addtogroup lexicographically_xy_smaller_or_equal lexicographically_xy_smaller_or_equal +/// \ingroup PkgKernel23 + +/// \sa `CGAL::compare_xy` +/// \sa `CGAL::lexicographically_xy_larger` +/// \sa `CGAL::lexicographically_xy_larger_or_equal` +/// \sa `CGAL::lexicographically_xy_smaller` + +/// @{ + +/*! +returns `true` iff `p` is lexicographically not larger +than `q` with respect to \f$ xy\f$ order. +*/ +bool +lexicographically_xy_smaller_or_equal(const Point_2& p, +const Point_2& q); + +/// @} + +/// \addtogroup lexicographically_xyz_smaller lexicographically_xyz_smaller +/// \ingroup PkgKernel23 + +/// \sa `CGAL::compare_xyz` +/// \sa `CGAL::lexicographically_xyz_smaller_or_equal` + +/// @{ + +/*! +returns `true` iff `p` is lexicographically smaller +than `q` with respect to \f$ xyz\f$ order. +*/ +bool +lexicographically_xyz_smaller(const Point_3& p, +const Point_3& q); + +/// @} + +/// \addtogroup lexicographically_xyz_smaller_or_equal lexicographically_xyz_smaller_or_equal +/// \ingroup PkgKernel23 + +/// \sa `CGAL::compare_xyz` +/// \sa `CGAL::lexicographically_xyz_smaller` + +/// @{ + +/*! +returns `true` iff `p` is lexicographically not larger +than `q` with respect to \f$ xyz\f$ order. +*/ +bool +lexicographically_xyz_smaller_or_equal(const Point_3& p, +const Point_3& q); + +/// @} + +/// \addtogroup max_vertex max_vertex +/// \ingroup PkgKernel23 +/// @{ + +/*! +computes the vertex with the lexicographically largest coordinates of the iso rectangle `ir`. +*/ +Point_2 max_vertex( const Iso_box_2& ir ); + +/*! +computes the vertex with the lexicographically largest coordinates of the iso cuboid `ic`. +*/ +Point_3 max_vertex( const Iso_cuboid_3& ic ); + +/// @} + +/// \addtogroup midpoint midpoint +/// \ingroup PkgKernel23 +/// @{ + +/*! +computes the midpoint of the segment \f$ pq\f$. +*/ +Point_2 midpoint( const Point_2& p, +const Point_2& q ); + +/*! +computes the midpoint of the segment \f$ pq\f$. +*/ +Point_3 midpoint( const Point_3& p, const Point_3& q ); + +/// @} + +/// \addtogroup min_vertex min_vertex +/// \ingroup PkgKernel23 +/// @{ + +/*! +computes the vertex with the lexicographically smallest coordinates of the iso rectangle `ir`. +*/ +Point_2 min_vertex( const Iso_box_2& ir ); + +/*! +computes the vertex with the lexicographically smallest coordinates of the iso cuboid `ic`. +*/ +Point_3 min_vertex( const Iso_cuboid_3& ic ); + +/// @} + +/// \addtogroup normal normal +/// \ingroup PkgKernel23 +/// @{ + +/*! +computes the normal vector for the vectors `q-p` and `r-p`. +\pre The points `p`, `q`, and `r` must not be collinear. +*/ +Vector_3 normal( const Point_3& p, const Point_3& q, const Point_3& r ); + +/// @} + +/// \addtogroup operatorminus operator- +/// \ingroup PkgKernel23 +/// \sa `CGAL::operator+` +/// \sa `CGAL::operator*` + +/// @{ + +/*! +returns the difference vector between `q` and `p`. +You can substitute `ORIGIN` for either `p` or `q` +,but not for both. +*/ +Vector_2 operator-(const Point_2 &p, const Point_2 &q); + +/*! +returns the point obtained by translating `p` by the +vector -`v`. +*/ +Point_2 operator-(const Point_2 &p, const Vector_2 &v); + +/*! +returns the difference vector between `q` and `p`. +You can substitute `ORIGIN` for either \f$ p\f$ +or \f$ q\f$, but not both. +*/ +Vector_3 operator-(const Point_3 &p, const Point_3 &q); + +/*! +returns a point obtained by translating `p` by the +vector \f$ -\f$`v`. +*/ +Point_3 operator-(const Point_3 &p, const Vector_3 &v); + +/// @} + +/// \addtogroup operatorplus operator+ +/// \ingroup PkgKernel23 +/// \sa `CGAL::operator-` +/// \sa `CGAL::operator*` +/// @{ + +/*! +returns the point obtained by translating `p` by +vector `v`. +*/ +Point_2 operator+(const Point_2 &p, +const Vector_2 &v); + +/*! +returns a point obtained by translating `p` by +vector `v`. +*/ +Point_3 operator+(const Point_3 &p, +const Vector_3 &v); + +/// @} + +/// \addtogroup operatormult operator +/// \ingroup PkgKernel23 +/// \sa `CGAL::operator+` +/// \sa `CGAL::operator-` +/// @{ + +/*! +Multiplication with a scalar from the left. +*/ +Vector_2 operator*(const Kernel::RT &s, const Vector_2 &w); + +/*! +Multiplication with a scalar from the left. +*/ +Vector_3 operator*(const Kernel::RT &s, const Vector_3 &w); + +/// @} + +/// \addtogroup orientation orientation +/// \ingroup PkgKernel23 + +/// \sa `CGAL::collinear` +/// \sa `CGAL::left_turn` +/// \sa `CGAL::right_turn` + +/// @{ + +/*! +returns `LEFT_TURN`, if \f$ r\f$ lies to the left of the oriented +line \f$ l\f$ defined by \f$ p\f$ and \f$ q\f$, returns `RIGHT_TURN` if \f$ r\f$ +lies to the right of \f$ l\f$, and returns `COLLINEAR` if \f$ r\f$ lies +on \f$ l\f$. +*/ +Orientation orientation(const Point_2& p, +const Point_2& q, +const Point_2& r); + +/*! +returns `LEFT_TURN` if \f$ u\f$ and \f$ v\f$ form a left turn, +returns `RIGHT_TURN` if \f$ u\f$ and \f$ v\f$ form a right turn, +and returns `COLLINEAR` if \f$ u\f$ and \f$ v\f$ are collinear. +*/ +Orientation orientation(const Vector_2& u, +const Vector_2& v); + +/*! +returns `POSITIVE`, if \f$ s\f$ lies on the positive side of the oriented +plane \f$ h\f$ defined by \f$ p\f$, \f$ q\f$, and \f$ r\f$, returns `NEGATIVE` if \f$ s\f$ +lies on the negative side of \f$ h\f$, and returns `COPLANAR` if \f$ s\f$ lies +on \f$ h\f$. +*/ +Orientation orientation(const Point_3 &p, +const Point_3&q, +const Point_3&r, +const Point_3&s); + +/*! +returns `NEGATIVE` if \f$ u\f$, \f$ v\f$ and \f$ w\f$ are negatively oriented, +and returns `COPLANAR` if \f$ u\f$, \f$ v\f$ and \f$ w\f$ are coplanar. +*/ +Orientation orientation(const Vector_3 &u, +const Vector_3 &v, +const Vector_3 &w); + +/// @} + + + +/// \addtogroup orthogonal_vector orthogonal_vector +/// \ingroup PkgKernel23 + +/// @{ + +/*! +computes an orthogonal vector of the plane `p`, which is directed to +the positive side of this plane. +*/ +Vector_3 orthogonal_vector( const Plane_3& p); + +/*! +computes an orthogonal vector of the plane defined by `p`, `q` and `r`, +which is directed to the positive side of this plane. +*/ +Vector_3 orthogonal_vector( const Point_3& p, +const Point_3& q, +const Point_3& r ); + +/// @} + + +/// \addtogroup parallel parallel +/// \ingroup PkgKernel23 + +/// @{ + +/*! +returns `true`, if `l1` and `l2` are parallel or if one +of those (or both) is degenerate. +*/ +bool parallel(const Line_2& l1, +const Line_2& l2); + +/*! +returns `true`, if `r1` and `r2` are parallel or if one +of those (or both) is degenerate. +*/ +bool parallel(const Ray_2& r1, +const Ray_2& r2); + +/*! +returns `true`, if `s1` and `s2` are parallel or if one +of those (or both) is degenerate. +*/ +bool parallel(const Segment_2& s1, +const Segment_2& s2); + +/*! +returns `true`, if `l1` and `l2` are parallel or if one +of those (or both) is degenerate. +*/ +bool parallel(const Line_3& l1, +const Line_3& l2); + +/*! +returns `true`, if `h1` and `h2` are parallel or if one +of those (or both) is degenerate. +*/ +bool parallel(const Plane_3& h1, +const Plane_3& h2); + +/*! +returns `true`, if `r1` and `r2` are parallel or if one +of those (or both) is degenerate. +*/ +bool parallel(const Ray_3& r1, +const Ray_3& r2); + +/*! +returns `true`, if `s1` and `s2` are parallel or if one +of those (or both) is degenerate. +*/ +bool parallel(const Segment_3& s1, +const Segment_3& s2); + +/// @} + + + +/// \addtogroup radical_line radical_line +/// \ingroup PkgKernel23 + +/// @{ + +/*! +returns the radical line of the two circles. +\pre \f$ c1\f$ and \f$ c2\f$ are not cocentric. +*/ +Line_2 radical_line(const Circle_2& c1, +const Circle_2& c2); + +/// @} + + + +/// \addtogroup right_turn right_turn +/// \ingroup PkgKernel23 + +/// \sa `CGAL::collinear` +/// \sa `CGAL::left_turn` +/// \sa `CGAL::orientation` + +/// @{ + +/*! +returns `true` iff `p`, `q`, and `r` form a right turn. +*/ +bool right_turn(const Point_2 &p, +const Point_2 &q, +const Point_2 &r); + +/// @} + + +/// \addtogroup side_of_bounded_circle side_of_bounded_circle +/// \ingroup PkgKernel23 + +/// \sa `CGAL::coplanar_side_of_bounded_circle` +/// \sa `CGAL::side_of_oriented_circle` + +/// @{ + +/*! +returns the relative position of point `t` +to the circle defined by \f$ p\f$, \f$ q\f$ and \f$ r\f$. The order +of the points \f$ p\f$, \f$ q\f$ and \f$ r\f$ does not matter. +\pre `p, q` and `r` are not collinear. +*/ +Bounded_side side_of_bounded_circle( +const Point_2 &p, +const Point_2 &q, +const Point_2 &r, +const Point_2 &t); + +/*! +returns the position of the point `t` relative to the circle +that has \f$ pq\f$ as its diameter. +*/ +Bounded_side side_of_bounded_circle( +const Point_2 &p, +const Point_2 &q, +const Point_2 &t); + +/// @} + + + +/// \addtogroup side_of_bounded_sphere side_of_bounded_sphere +/// \ingroup PkgKernel23 + +/// \sa `CGAL::side_of_oriented_sphere` + +/// @{ + +/*! +returns the relative position of point `t` +to the sphere defined by \f$ p\f$, \f$ q\f$, \f$ r\f$, and \f$ s\f$. The order +of the points \f$ p\f$, \f$ q\f$, \f$ r\f$, and \f$ s\f$ does not matter. +\pre `p, q, r` and `s` are not coplanar. +*/ +Bounded_side side_of_bounded_sphere( +const Point_3 &p, +const Point_3 &q, +const Point_3 &r, +const Point_3 &s, +const Point_3 &t); + +/*! +returns the position of the point `t` relative to the sphere +passing through \f$ p\f$, \f$ q\f$, and \f$ r\f$ and whose center is in the plane defined +by these three points. +*/ +Bounded_side side_of_bounded_sphere( +const Point_3 &p, +const Point_3 &q, +const Point_3 &r, +const Point_3 &t); + +/*! +returns the position of the point `t` relative to the sphere +that has \f$ pq\f$ as its diameter. +*/ +Bounded_side side_of_bounded_sphere( +const Point_3 &p, +const Point_3 &q, +const Point_3 &t); + +/// @} + +/// \addtogroup side_of_oriented_circle side_of_oriented_circle +/// \ingroup PkgKernel23 + +/// \sa `CGAL::side_of_bounded_circle` + +/// @{ + +/*! +returns the relative position of point `test` +to the oriented circle defined by \f$ p\f$, \f$ q\f$ and \f$ r\f$. +The order of the points \f$ p\f$, \f$ q\f$ and \f$ r\f$ is important, +since it determines the orientation of the implicitly +constructed circle. + +If \f$ p\f$, \f$ q\f$ and \f$ r\f$ are collinear, the circle degenerates in a line. +`ON_ORIENTED_BOUNDARY` is returned if \f$ test\f$ is also collinear or if two +points are identical, +otherwise, `side_of_oriented_circle(r, q, test, p)` is returned. + +*/ +Oriented_side side_of_oriented_circle( +const Point_2 &p, +const Point_2 &q, +const Point_2 &r, +const Point_2 &test); + +/// @} + + + +/// \addtogroup side_of_oriented_sphere side_of_oriented_sphere +/// \ingroup PkgKernel23 + +/// \sa `CGAL::side_of_bounded_sphere` + +/// @{ + +/*! +returns the relative position of point \f$ test\f$ to the oriented sphere defined +by \f$ p\f$, \f$ q\f$, \f$ r\f$ and \f$ s\f$. The order of the points \f$ p\f$, \f$ q\f$, \f$ r\f$, and \f$ s\f$ is important, +since it determines the orientation of the implicitly constructed +sphere. If the points \f$ p\f$, \f$ q\f$, \f$ r\f$ and \f$ s\f$ are positive oriented, positive side +is the bounded interior of the sphere. + +In case of degeneracies, `ON_ORIENTED_BOUNDARY` is returned +if all points are coplanar. Otherwise, there is a cyclic permutation of the five points +that puts four non coplanar points first, it is used to answer the predicate: +e.g. `side_of_oriented_sphere(q, r, s, test, p)` is returned if \f$ q\f$, \f$ r\f$, \f$ s\f$, +and \f$ test\f$ are non coplanar. +*/ +Oriented_side side_of_oriented_sphere( +const Point_3 &p, +const Point_3 &q, +const Point_3 &r, +const Point_3 &s, +const Point_3 &test); + +/// @} + +/// \addtogroup squared_area squared_area +/// \ingroup PkgKernel23 + +/// @{ + +/*! +returns the squared area of the triangle defined by the points \f$ p\f$, +\f$ q\f$ and \f$ r\f$. +*/ +Kernel::FT squared_area(const Point_3& p, +const Point_3& q, +const Point_3& r); + +/// @} + +/// \addtogroup squared_radius squared_radius +/// \ingroup PkgKernel23 + +/// \sa `CGAL::Circle_2` +/// \sa `CGAL::Circle_3` +/// \sa `CGAL::Sphere_3` + +/// @{ + +/*! +compute the squared radius of the circle passing through the points +\f$ p\f$, \f$ q\f$, and \f$ r\f$. \pre \f$ p\f$, \f$ q\f$, and \f$ r\f$ are not collinear. +*/ +FT +squared_radius( const Point_2& p, +const Point_2& q, +const Point_2& r); + +/*! +compute the squared radius of the smallest circle passing through \f$ p\f$, +and \f$ q\f$, i.e. one fourth of the squared distance between \f$ p\f$ and \f$ q\f$. +*/ +FT +squared_radius( const Point_2& p, +const Point_2& q); + +/*! +compute the squared radius of the smallest circle passing through \f$ p\f$, +i.e. \f$ 0\f$. +*/ +FT +squared_radius( const Point_2& p); + +/*! +compute the squared radius of the sphere passing through the points \f$ p\f$, +\f$ q\f$, \f$ r\f$ and \f$ s\f$. \pre \f$ p\f$, \f$ q\f$, \f$ r\f$ and \f$ s\f$ are not coplanar. +*/ +FT +squared_radius( const Point_3& p, +const Point_3& q, +const Point_3& r, +const Point_3& s); + +/*! +compute the squared radius of the sphere passing through the points \f$ p\f$, +\f$ q\f$, and \f$ r\f$ and whose center is in the same plane as those three points. +*/ +FT +squared_radius( const Point_3& p, +const Point_3& q, +const Point_3& r); + +/*! +compute the squared radius of the smallest circle passing through \f$ p\f$, +and \f$ q\f$, i.e. one fourth of the squared distance between \f$ p\f$ and \f$ q\f$. +*/ +FT +squared_radius( const Point_3& p, +const Point_3& q); + +/*! +compute the squared radius of the smallest circle passing through \f$ p\f$, +i.e. \f$ 0\f$. +*/ +FT +squared_radius( const Point_3& p); + +/// @} + + +/// \addtogroup volume volume +/// \ingroup PkgKernel23 + +/// \sa `CGAL::Tetrahedron_3` + +/// @{ + +/*! +Computes the signed volume of the tetrahedron defined by the four points +`p0`, `p1`, `p2` and `p3`. +*/ +Kernel::FT volume(const Point_3 & p0, const Point_3 & p1, + const Point_3 & p2, const Point_3 & p3); + +/// @} + + +/// \addtogroup x_equal x_equal +/// \ingroup PkgKernel23 + +/// \sa `CGAL::compare_x` +/// \sa `CGAL::y_equal` +/// \sa `CGAL::z_equal` + +/// @{ + +/*! +returns `true`, iff `p` and `q` +have the same `x`-coordinate. +*/ +bool x_equal(const Point_2 &p, +const Point_2 &q); + +/*! +returns `true`, iff `p` and `q` +have the same `x`-coordinate. +*/ +bool x_equal(const Point_3 &p, +const Point_3 &q); + +/// @} + + + +/// \addtogroup y_equal y_equal +/// \ingroup PkgKernel23 + +/// \sa `CGAL::compare_y` +/// \sa `CGAL::x_equal` +/// \sa `CGAL::z_equal` + +/// @{ + +/*! +returns `true`, iff `p` and `q` +have the same `y`-coordinate. +*/ +bool y_equal(const Point_2 &p, +const Point_2 &q); + +/*! +returns `true`, iff `p` and `q` +have the same `y`-coordinate. +*/ +bool y_equal(const Point_3 &p, +const Point_3 &q); + +/// @} + + +/// \addtogroup bool z_equal bool z_equal +/// \ingroup PkgKernel23 + +/// \sa `CGAL::compare_z` +/// \sa `CGAL::x_equal` +/// \sa `CGAL::y_equal` + +/// @{ + +/*! +returns `true`, iff `p` and `q` +have the same `z`-coordinate. +*/ +bool z_equal(const Point_3 &p, +const Point_3 &q); + +/// @} + + +} /* namespace CGAL */ diff --git a/Kernel_23/doc/Kernel_23/CGAL/intersections.h b/Kernel_23/doc/Kernel_23/CGAL/intersections.h new file mode 100644 index 00000000000..3744842d533 --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/intersections.h @@ -0,0 +1,611 @@ +namespace CGAL { + +/*! +\addtogroup do_intersect do_intersect +\ingroup PkgKernel23 + +Depending on which \cgal kernel is used, different versions of this +global function are available. + +## With the basic 2D and 3D Kernel ## + +See Chapter \ref chapterkernel23 + +\code +#include +\endcode + +The types `Type1` and `Type2` can be any of the following: + +- `Point_2` +- `Line_2` +- `Ray_2` +- `Segment_2` +- `Triangle_2` +- `Iso_rectangle_2` + +Also, `Type1` and `Type2` can be both of type + +- `Line_2` +- `Circle_2` + +In three-dimensional space, the types `Type1` and +`Type2` can be any of the following: + +- `Plane_3` +- `Line_3` +- `Ray_3` +- `Segment_3` +- `Triangle_3`. +- `Bbox_3`. + +Also, `Type1` and `Type2` can be respectively of types + +- `Triangle_3` and `Tetrahedron_3` +- `Plane_3` and `Sphere_3` (or the contrary) +- `Sphere_3` and `Sphere_3`. + +## With the 2D Circular Kernel ## + +See Chapter \ref chaptercircularkernel + +\code +#include +\endcode + +If this kernel is used, in addition to the combinations of 2D types +previously listed, `Type1` and `Type2` can be any of +the following: + +- `Line_2` +- `Circle_2` +- `Line_arc_2` +- `Circular_arc_2` + +An example illustrating this is presented in +Chapter \ref chaptercircularkernel. + + +## With the 3D Spherical Kernel ## + +See Chapter \ref chaptersphericalkernel + +\code +#include +\endcode + +If this kernel is used, in addition to the combinations of 3D types +previously listed, `Type1` and `Type2` can be any of +the following: + +- `Line_3` +- `Circle_3` +- `Plane_3` +- `Sphere_3` +- `Line_arc_3` +- `Circular_arc_3` + +An example illustrating this is presented in +Chapter \ref chaptersphericalkernel. + +\sa `CGAL::intersection` +*/ +/// @{ + +/*! +checks whether `obj1` and `obj2` intersect. Two objects `obj1` and +`obj2` intersect if there is a point `p` that is part of both `obj1` +and `obj2`. The intersection region of those two objects is defined +as the set of all points `p` that are part of both `obj1` and `obj2`. +Note that for objects like triangles and polygons that enclose a +bounded region, this region is part of the object. +*/ +bool do_intersect(Type1 obj1, Type2 obj2); + +/*! +\ingroup PkgKernel23 + +checks whether `obj1`, `obj2` and `obj3` intersect. + +`Type1`, `Type2` and `Type3` can be: + +- `Sphere_3` +- `Plane_3` + +\attention Only available with a SphericalKernel. + +*/ +bool do_intersect(Type1 obj1, Type2 obj2, Type3 obj3); + + +/// @} + + +/*! +\addtogroup intersection intersection +\ingroup PkgKernel23 + +Depending on which \cgal kernel is used, different versions of this +global function are available. + +Example +-------------- + +The following example demonstrates the most common use of +`intersection` routines with the basic 2D and 3D Kernels. + +\code +#include + +void foo(CGAL::Segment_2 seg, CGAL::Line_2 line) +{ + CGAL::Object result = CGAL::intersection(seg, line); + if (const CGAL::Point_2 *ipoint = CGAL::object_cast >(&result)) { + // handle the point intersection case with *ipoint. + } else + if (const CGAL::Segment_2 *iseg = CGAL::object_cast >(&result)) { + // handle the segment intersection case with *iseg. + } else { + // handle the no intersection case. + } +} +\endcode + +Examples illustrating the use of this function in the case of the 2D +Circular %Kernel and the 3D Spherical %Kernel are presented respectively +in Chapters \ref chaptercircularkernel and \ref +chaptersphericalkernel. + +\sa `CGAL::do_intersect` +\sa `CGAL::Object` + +## With the basic 2D and 3D Kernel ## +See Chapter \ref chapterkernel23 +*/ +/// @{ + +/*! +Two objects `obj1` and `obj2` intersect if there is a point `p` that +is part of both `obj1` and `obj2`. The intersection region of those +two objects is defined as the set of all points `p` that are part of +both `obj1` and `obj2`. Note that for objects like triangles and +polygons that enclose a bounded region, this region is considered part +of the object. If a segment lies completely inside a triangle, then +those two objects intersect and the intersection region is the +complete segment. + +The possible value for types `Type1` and `Type2` and the +possible return values wrapped in `Object` are the +following: + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +p + + + + + + + + + + + + + + + + + + + + + +
type A type B return type
Iso_rectangle_2 Iso_rectangle_2 + +
Iso_rectangle_2
Iso_rectangle_2 Line_2 + + +
Point_2
Segment_2
Iso_rectangle_2 Ray_2 + + +
Point_2
Segment_2
Iso_rectangle_2 Segment_2 + + +
Point_2
Segment_2
Iso_rectangle_2 Triangle_2 + + + + +
Point_2
Segment_2
Triangle_2
std::vector<Point_2>
Line_2 Line_2 + + +
Point_2
Line_2
Line_2 Ray_2 + + +
Point_2
Ray_2
Line_2 Segment_2 + + +
Point_2
Segment_2
Line_2 Triangle_2 + + +
Point_2
Segment_2
Ray_2 Ray_2 + + + +
Point_2
Segment_2
Ray_2
Ray_2 Segment_2 + + +
Point_2
Segment_2
Ray_2 Triangle_2 + + +
Point_2
Segment_2
Segment_2 Segment_2 + + +
Point_2
Segment_2
Segment_2 Triangle_2 + + +
Point_2
Segment_2
Triangle_2 Triangle_2 + + + + +
Point_2
Segment_2
Triangle_2
std::vector<Point_2>
Line_3 Line_3 + + +
Point_3
Line_3
Line_3 Plane_3 + + +
Point_3
Line_3
Line_3 Ray_3 + + +
Point_3
Ray_3
Line_3 Segment_3 + + +
Point_3
Segment_3
Line_3 Triangle_3 + + +
Point_3
Segment_3
Plane_3 Plane_3 + + +
Line_3
Plane_3
Plane_3 Ray_3 + + +
Point_3
Ray_3
Plane_3 Segment_3 + + +
Point_3
Segment_3
Plane_3 Sphere_3 + + +
Point_3
Circle_3
Plane_3 Triangle_3 + + + +
Point_3
Segment_3
Triangle_3
Ray_3 Ray_3 + + + +
Point_3
Ray_3
Segment_3
Ray_3 Segment_3 + + +
Point_3
Segment_3
Ray_3 Triangle_3 + + +
Point_3
Segment_3
Segment_3 Segment_3 + + +
Point_3
Segment_3
Segment_3 Triangle_3 + + +
Point_3
Segment_3
Sphere_3 Sphere_3 + + + +
Point_3
Circle_3
Sphere_3
Triangle_3 Triangle_3 + + + + +
Point_3
Segment_3
Triangle_3
std::vector < Point_3 >
+
+*/ +Object intersection(Type1 obj1, Type2 obj2); + +/*! +returns the intersection of 3 planes, which can be either a +point, a line, a plane, or empty. +*/ +Object intersection(const Plane_3& pl1, + const Plane_3& pl2, + const Plane_3& pl3); + + +/*! +\name With the 2D Circular Kernel + +See Chapter \ref chaptercircularkernel + +\code +#include +\endcode + +If this kernel is used, in addition to the function and the +combination of 2D types described above, another version of the function +is provided. + +Since both the number of intersections, if any, and their type, +depend on the arguments, the function returns an output +iterator on `Object`'s, as presented below. + +*/ +/// @{ + +/*! +Copies in the output iterator the intersection elements between the +two objects. `intersections` iterates on +elements of type `CGAL::Object`, in lexicographic order, + +where `Type1` and `Type2` can both be either + +- `Line_2` or +- `Line_arc_2` or +- `Circle_2` or +- `Circular_arc_2` + +Depending on the types `Type1` and `Type2`, these elements can be assigned to + +- `std::pair, unsigned>`, + where the unsigned integer is the multiplicity of the corresponding + intersection point between `obj1` and `obj2`, +- `Circular_arc_2` in case of an overlap of + two circular arcs, +- `Line_arc_2` in case of an overlap of two + line segments or +- `Line_2` or + `Circle_2` in case of two equal input lines or circles. + +*/ +template < class OutputIterator > +OutputIterator +intersection(const Type1 &obj1, const Type2 &obj2, + OutputIterator intersections); + + + +/// @} + +/*! +\name With the 3D Circular Kernel + +See Chapter \ref chaptersphericalkernel + +\code +#include +\endcode + +If this kernel is used, in addition to the function and the +combination of 3D types described above, two other versions of the function +are provided. + +Since both the number of intersections, if any, and their type, +depend on the arguments, the functions return an output +iterator on `Object`'s, as presented below. +*/ +/// @{ + +/*! +Copies in the output iterator the intersection elements between the +two objects. `intersections` iterates on +elements of type `CGAL::Object`, in lexicographic order, +when this ordering is defined on the computed objects, + +where `SphericalType1` and `SphericalType2` can both be either: + +- `Sphere_3`, +- `Plane_3`, +- `Line_3`, +- `Circle_3`, +- `Line_arc_3` or +- `Circular_arc_3`, + + +and depending on the types `SphericalType1` and `SphericalType2`, the computed +`CGAL::Object`s can be assigned to + +- `std::pair, unsigned>`, + where the unsigned integer is the multiplicity of the corresponding + intersection point between `obj1` and `obj2`, +- `SphericalType1`, when `SphericalType1` and `SphericalType2` are equal, + and if the two objets `obj1` and `obj2` are equal, +- `Line_3` or + `Circle_3` when `SphericalType1` and `SphericalType2` + are two-dimensional objets intersecting along a curve (2 planes, or 2 + spheres, or one plane and one sphere), +- `Circular_arc_3` in case of an overlap of + two circular arcs or +- `Line_arc_3` in case of an overlap of two + line segments. +*/ +template < class OutputIterator > +OutputIterator +intersection(const SphericalType1 &obj1, const SphericalType2 &obj2, + OutputIterator intersections); + + +/*! +Copies in the output iterator the intersection elements between the +three objects. `intersections` iterates on +elements of type `CGAL::Object`, in lexicographic order +when this ordering is defined on the computed objects + +where `Type1`, `Type2` and `Type3` +can be either + +- `Sphere_3` or +- `Plane_3` + + +and depending of these types, the computed `CGAL::Object`s can be +assigned to + +- `std::pair, unsigned>`, + where the unsigned integer is the multiplicity of the corresponding + intersection point, +- `Circle_3` or +- `Type1`, when `Type1`, `Type2` and + `Type3` are equal, and if the three objets `obj1` and `obj2` + and `obj3` are equal. +*/ +template < class OutputIterator > +OutputIterator +intersection(const Type1 &obj1, const Type2 &obj2, const Type3 &obj3, + OutputIterator intersections); + + +/// @} + +} diff --git a/Kernel_23/doc/Kernel_23/CGAL/rational_rotation.h b/Kernel_23/doc/Kernel_23/CGAL/rational_rotation.h new file mode 100644 index 00000000000..7d9805bd8f5 --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/rational_rotation.h @@ -0,0 +1,38 @@ +namespace CGAL { + +/*! +\addtogroup rational_rotation_approximation rational_rotation_approximation +\ingroup PkgKernel23 +*/ + +/*! +\ingroup rational_rotation_approximation + +computes integers `sin_num`, `cos_num` and `denom`, such +that `sin_num`/`denom` approximates the sine of direction +\f$ (\f$`dirx`,`diry`\f$ )\f$. The difference between the sine and +the approximating rational is bounded by `eps_num`/`eps_den`. +\pre `eps_num` \f$ \neq0\f$. + +Implementation +-------------- + +The approximation is based on Farey sequences as described in +the rational rotation method presented by Canny and Ressler at the +8th SoCG 1992. We use a slower version which needs no division operation +in the approximation. + +\sa `CGAL::Aff_transformation_2` +*/ +template +void +rational_rotation_approximation( const RingNumberType & dirx, + const RingNumberType & diry, + RingNumberType & sin_num, + RingNumberType & cos_num, + RingNumberType & denom, + const RingNumberType & eps_num, + const RingNumberType & eps_den ); + +} /* namespace CGAL */ + diff --git a/Kernel_23/doc/Kernel_23/CGAL/squared_distance_2.h b/Kernel_23/doc/Kernel_23/CGAL/squared_distance_2.h new file mode 100644 index 00000000000..4cfeb9308b5 --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/squared_distance_2.h @@ -0,0 +1,50 @@ +namespace CGAL { + +/*! +\addtogroup squared_distance squared_distance +\ingroup PkgKernel23 +*/ +/// @{ + +/*! +computes the square of the Euclidean distance between two geometric +objects. For arbitrary geometric objects `obj1` and `obj2` the +squared distance is defined as the minimal `squared_distance(p1, p2)`, +where `p1` is a point of `obj1` and `p2` is a point of `obj2`. Note +that for objects that have an inside (a bounded region), this inside +is part of the object. So, the squared distance from a point inside is +zero, not the squared distance to the closest point on the boundary. + +In 2D, the types `Type1` and `Type2` can be any of the following: + +- `Point_2` +- `Line_2` +- `Ray_2` +- `Segment_2` +- `Triangle_2` + + +In 3D, the types `Type1` and `Type2` can be any of the +following: + +- `Point_3` +- `Line_3` +- `Ray_3` +- `Segment_3` +- `Plane_3` + +\note For the 3D functionality \ref squared_distance_3.h has to be included. + +\sa `CGAL::compare_distance_to_point` +\sa `CGAL::compare_signed_distance_to_line` +\sa `CGAL::compare_signed_distance_to_plane` +\sa `CGAL::has_larger_distance_to_point` +\sa `CGAL::has_larger_signed_distance_to_line` +\sa `CGAL::has_larger_signed_distance_to_plane` +\sa `CGAL::has_smaller_distance_to_point` +\sa `CGAL::has_smaller_signed_distance_to_line` +\sa `CGAL::has_smaller_signed_distance_to_plane` +*/ +Kernel::FT squared_distance(Type1 obj1, Type2 obj2); +/// @} +} diff --git a/Kernel_23/doc/Kernel_23/CGAL/squared_distance_3.h b/Kernel_23/doc/Kernel_23/CGAL/squared_distance_3.h new file mode 100644 index 00000000000..1a8a7135a16 --- /dev/null +++ b/Kernel_23/doc/Kernel_23/CGAL/squared_distance_3.h @@ -0,0 +1,3 @@ +/*! + \file squared_distance_3.h + */ diff --git a/Kernel_23/doc/Kernel_23/Concepts/Kernel.h b/Kernel_23/doc/Kernel_23/Concepts/Kernel.h new file mode 100644 index 00000000000..2bd728a03e8 --- /dev/null +++ b/Kernel_23/doc/Kernel_23/Concepts/Kernel.h @@ -0,0 +1,9893 @@ +/*! +\ingroup PkgKernel23Concepts +\cgalconcept + +The concept of a kernel is defined by a set of requirements on +the provision of certain types and access member functions to create +objects of these types. The types are function object classes to be used +within the algorithms and data structures of \cgal. +This allows you to use any model of a kernel as a traits class in +the \cgal algorithms and data structures, unless they require types +beyond those provided by a kernel. + +A kernel provides types, construction objects, and generalized predicates. +The former replace constructors of the kernel classes and constructive +procedures in the kernel. There are also function objects replacing operators, +especially for equality testing. + +\hasModel CGAL::Cartesian +\hasModel CGAL::Homogeneous +\hasModel CGAL::Simple_cartesian +\hasModel CGAL::Simple_homogeneous +\hasModel CGAL::Filtered_kernel +\hasModel CGAL::Exact_predicates_exact_constructions_kernel +\hasModel CGAL::Exact_predicates_exact_constructions_kernel_with_sqrt +\hasModel CGAL::Exact_predicates_inexact_constructions_kernel + +\sa `Kernel_d` + +*/ +class Kernel { +public: + +/// \name Geometric Object Concepts +/// @{ +/*! +\ingroup PkgKernel23ConceptsGeomObject +\cgalconcept + +A type representing points in two dimensions. + +\refines CopyConstructible +\refines Assignable +\refines DefaultConstructible + +\sa `Kernel::Angle_2` +\sa `Kernel::AreOrderedAlongLine_2` +\sa `Kernel::AreStrictlyOrderedAlongLine_2` +\sa `Kernel::Collinear_2` +\sa `Kernel::CollinearAreOrderedAlongLine_2` +\sa `Kernel::CollinearAreStrictlyOrderedAlongLine_2` +\sa `Kernel::CompareDistance_2` +\sa `Kernel::CompareXAtY_2` +\sa `Kernel::CompareXY_2` +\sa `Kernel::CompareX_2` +\sa `Kernel::CompareYAtX_2` +\sa `Kernel::CompareY_2` +\sa `Kernel::CompareYX_2` +\sa `Kernel::ComputeSquaredDistance_2` +\sa `Kernel::ComputeSquaredRadius_2` +\sa `Kernel::ComputeX_2` +\sa `Kernel::ComputeY_2` +\sa `Kernel::ComputeHx_2` +\sa `Kernel::ComputeHy_2` +\sa `Kernel::ConstructBisector_2` +\sa `Kernel::ConstructCircumcenter_2` +\sa `Kernel::ConstructLiftedPoint_3` +\sa `Kernel::ConstructMidpoint_2` +\sa `Kernel::ConstructPointOn_2` +\sa `Kernel::ConstructPoint_2` +\sa `Kernel::ConstructProjectedPoint_2` +\sa `Kernel::ConstructProjectedXYPoint_2` +\sa `Kernel::ConstructTranslatedPoint_2` +\sa `Kernel::DoIntersect_2` +\sa `Kernel::Equal_2` +\sa `Kernel::EqualX_2` +\sa `Kernel::EqualY_2` +\sa `Kernel::LeftTurn_2` +\sa `Kernel::LessDistanceToPoint_2` +\sa `Kernel::LessRotateCCW_2` +\sa `Kernel::LessSignedDistanceToLine_2` +\sa `Kernel::LessX_2` +\sa `Kernel::LessXY_2` +\sa `Kernel::LessY_2` +\sa `Kernel::LessYX_2` +\sa `Kernel::Orientation_2` +\sa `Kernel::SideOfBoundedCircle_2` +\sa `Kernel::SideOfOrientedCircle_2` + +*/ +class Point_2 { +public: +}; /* end Kernel::Point_2 */ + +/*! +\ingroup PkgKernel23ConceptsGeomObject +\cgalconcept + +A type representing triangles in two dimensions. + +\refines CopyConstructible +\refines Assignable +\refines DefaultConstructible + +\sa `CGAL::Triangle_2` +\sa `Kernel::BoundedSide_2` +\sa `Kernel::ComputeArea_2` +\sa `Kernel::ComputeSquaredDistance_2` +\sa `Kernel::ConstructCentroid_2` +\sa `Kernel::ConstructOppositeTriangle_2` +\sa `Kernel::ConstructTriangle_2` +\sa `Kernel::ConstructVertex_2` +\sa `Kernel::DoIntersect_2` +\sa `Kernel::Equal_2` +\sa `Kernel::HasOnBoundary_2` +\sa `Kernel::HasOnBoundedSide_2` +\sa `Kernel::HasOnNegativeSide_2` +\sa `Kernel::HasOnPositiveSide_2` +\sa `Kernel::HasOnUnboundedSide_2` +\sa `Kernel::Intersect_2` +\sa `Kernel::IsDegenerate_2` +\sa `Kernel::OrientedSide_2` + +*/ +class Triangle_2 { +public: +}; /* end Kernel::Triangle_2 */ + + +/*! +\ingroup PkgKernel23ConceptsGeomObject +\cgalconcept + +A type representing circles in two dimensions. + +\refines CopyConstructible +\refines Assignable +\refines DefaultConstructible + +\sa `CGAL::Circle_2` +\sa `Kernel::BoundedSide_2` +\sa `Kernel::ComputeSquaredRadius_2` +\sa `Kernel::ConstructCenter_2` +\sa `Kernel::ConstructCircle_2` +\sa `Kernel::ConstructOppositeCircle_2` +\sa `Kernel::Equal_2` +\sa `Kernel::HasOnBoundary_2` +\sa `Kernel::HasOnBoundedSide_2` +\sa `Kernel::HasOnNegativeSide_2` +\sa `Kernel::HasOnPositiveSide_2` +\sa `Kernel::HasOnUnboundedSide_2` +\sa `Kernel::IsDegenerate_2` +\sa `Kernel::OrientedSide_2` + +*/ +class Circle_2 { +public: + +}; /* end Kernel::Circle_2 */ + +/*! +\ingroup PkgKernel23ConceptsGeomObject +\cgalconcept + +A type representing points in three dimensions. + +\refines CopyConstructible +\refines Assignable +\refines DefaultConstructible + +\sa `Kernel::Angle_3` +\sa `Kernel::AreOrderedAlongLine_3` +\sa `Kernel::AreStrictlyOrderedAlongLine_3` +\sa `Kernel::Collinear_3` +\sa `Kernel::CollinearAreOrderedAlongLine_3` +\sa `Kernel::CollinearAreStrictlyOrderedAlongLine_3` +\sa `Kernel::CompareDistance_3` +\sa `Kernel::CompareXYZ_3` +\sa `Kernel::CompareXY_3` +\sa `Kernel::CompareX_3` +\sa `Kernel::CompareY_3` +\sa `Kernel::CompareZ_3` +\sa `Kernel::ComputeSquaredDistance_3` +\sa `Kernel::ComputeSquaredRadius_3` +\sa `Kernel::ComputeX_3` +\sa `Kernel::ComputeY_3` +\sa `Kernel::ComputeZ_3` +\sa `Kernel::ConstructBisector_3` +\sa `Kernel::ConstructCentroid_3` +\sa `Kernel::ConstructCircumcenter_3` +\sa `Kernel::ConstructLiftedPoint_3` +\sa `Kernel::ConstructMidpoint_3` +\sa `Kernel::ConstructPointOn_3` +\sa `Kernel::ConstructPoint_3` +\sa `Kernel::ConstructProjectedPoint_3` +\sa `Kernel::ConstructTranslatedPoint_3` +\sa `Kernel::CoplanarOrientation_3` +\sa `Kernel::CoplanarSideOfBoundedCircle_3` +\sa `Kernel::Coplanar_3` +\sa `Kernel::EqualXY_3` +\sa `Kernel::EqualX_3` +\sa `Kernel::EqualY_3` +\sa `Kernel::EqualZ_3` +\sa `Kernel::Equal_2` +\sa `Kernel::LessDistanceToPoint_3` +\sa `Kernel::LessSignedDistanceToPlane_3` +\sa `Kernel::LessXYZ_3` +\sa `Kernel::LessXY_3` +\sa `Kernel::LessX_3` +\sa `Kernel::LessY_3` +\sa `Kernel::LessZ_3` +\sa `Kernel::Orientation_3` +\sa `Kernel::SideOfBoundedSphere_3` +\sa `Kernel::SideOfOrientedSphere_3` + +*/ +class Point_3 { +public: +}; /* end Kernel::Point_3 */ + +/*! +\ingroup PkgKernel23ConceptsGeomObject +\cgalconcept + +A type representing segments in two dimensions. + +\refines CopyConstructible +\refines Assignable +\refines DefaultConstructible + +\sa `CGAL::Segment_2` +\sa `Kernel::CollinearHasOn_2` +\sa `Kernel::ComputeSquaredDistance_2` +\sa `Kernel::ComputeSquaredLength_2` +\sa `Kernel::ConstructDirection_2` +\sa `Kernel::ConstructLine_2` +\sa `Kernel::ConstructOppositeSegment_2` +\sa `Kernel::ConstructPointOn_2` +\sa `Kernel::ConstructSegment_2` +\sa `Kernel::ConstructSource_2` +\sa `Kernel::ConstructTarget_2` +\sa `Kernel::ConstructVertex_2` +\sa `Kernel::DoIntersect_2` +\sa `Kernel::Equal_2` +\sa `Kernel::HasOn_2` +\sa `Kernel::Intersect_2` +\sa `Kernel::IsDegenerate_2` +\sa `Kernel::IsHorizontal_2` +\sa `Kernel::IsVertical_2` + +*/ +class Segment_2 { +public: +}; /* end Kernel::Segment_2 */ + +/*! +\ingroup PkgKernel23ConceptsGeomObject +\cgalconcept + +A type representing straight lines (and halfspaces) in two dimensions. + +\refines CopyConstructible +\refines Assignable +\refines DefaultConstructible + +\sa `CGAL::Line_2` +\sa `Kernel::CompareXAtY_2` +\sa `Kernel::ComputeSquaredDistance_2` +\sa `Kernel::CompareYAtX_2` +\sa `Kernel::ConstructBisector_2` +\sa `Kernel::ConstructDirection_2` +\sa `Kernel::ConstructLine_2` +\sa `Kernel::ConstructOppositeLine_2` +\sa `Kernel::ConstructPerpendicularLine_2` +\sa `Kernel::ConstructPointOn_2` +\sa `Kernel::ConstructProjectedPoint_2` +\sa `Kernel::DoIntersect_2` +\sa `Kernel::Equal_2` +\sa `Kernel::HasOnNegativeSide_2` +\sa `Kernel::HasOnPositiveSide_2` +\sa `Kernel::HasOn_2` +\sa `Kernel::Intersect_2` +\sa `Kernel::IsDegenerate_2` +\sa `Kernel::IsHorizontal_2` +\sa `Kernel::IsVertical_2` +\sa `Kernel::OrientedSide_2` + +*/ +class Line_2 { +public: +}; /* end Kernel::Line_2 */ + + +/*! +\ingroup PkgKernel23ConceptsGeomObject +\cgalconcept + +A type representing straight lines in three dimensions. + +\refines CopyConstructible +\refines Assignable +\refines DefaultConstructible + +\sa `CGAL::Line_3` +\sa `Kernel::ComputeSquaredDistance_3` +\sa `Kernel::ConstructDirection_3` +\sa `Kernel::ConstructLine_3` +\sa `Kernel::ConstructOppositeLine_3` +\sa `Kernel::ConstructPerpendicularLine_3` +\sa `Kernel::ConstructPlane_3` +\sa `Kernel::ConstructPointOn_3` +\sa `Kernel::ConstructProjectedPoint_3` +\sa `Kernel::DoIntersect_3` +\sa `Kernel::Equal_3` +\sa `Kernel::HasOn_3` +\sa `Kernel::Intersect_3` +\sa `Kernel::IsDegenerate_3` + +*/ +class Line_3 { +public: +}; /* end Kernel::Line_3 */ + +/*! +\ingroup PkgKernel23ConceptsGeomObject +\cgalconcept + +A type representing segments in three dimensions. + +\refines CopyConstructible +\refines Assignable +\refines DefaultConstructible + +\sa `CGAL::Segment_3` +\sa `Kernel::ComputeSquaredDistance_3` +\sa `Kernel::ComputeSquaredLength_3` +\sa `Kernel::ConstructDirection_3` +\sa `Kernel::ConstructLine_3` +\sa `Kernel::ConstructOppositeSegment_3` +\sa `Kernel::ConstructPlane_3` +\sa `Kernel::ConstructPointOn_3` +\sa `Kernel::ConstructSegment_3` +\sa `Kernel::ConstructVertex_3` +\sa `Kernel::DoIntersect_3` +\sa `Kernel::Equal_3` +\sa `Kernel::HasOn_3` +\sa `Kernel::Intersect_3` +\sa `Kernel::IsDegenerate_3` + +*/ +class Segment_3 { +public: +}; /* end Kernel::Segment_3 */ + + +/*! +\ingroup PkgKernel23ConceptsGeomObject +\cgalconcept + +A type representing triangles in three dimensions. + +\refines CopyConstructible +\refines Assignable +\refines DefaultConstructible + +\sa `CGAL::Triangle_3` +\sa `Kernel::ComputeSquaredArea_3` +\sa `Kernel::ConstructCentroid_3` +\sa `Kernel::ConstructSupportingPlane_3` +\sa `Kernel::ConstructTriangle_3` +\sa `Kernel::ConstructVertex_3` +\sa `Kernel::DoIntersect_3` +\sa `Kernel::Equal_3` +\sa `Kernel::HasOn_3` +\sa `Kernel::IsDegenerate_3` + +*/ +class Triangle_3 { +public: +}; /* end Kernel::Triangle_3 */ + +/*! +\ingroup PkgKernel23ConceptsGeomObject +\cgalconcept + +A type representing vectors in two dimensions. + +\refines CopyConstructible +\refines Assignable +\refines DefaultConstructible + +\sa `CGAL::Vector_2` +\sa `Kernel::ComputeDeterminant_2` +\sa `Kernel::ComputeX_2` +\sa `Kernel::ComputeY_2` +\sa `Kernel::ComputeHx_2` +\sa `Kernel::ComputeHy_2` +\sa `Kernel::ConstructDirection_2` +\sa `Kernel::ConstructOppositeVector_2` +\sa `Kernel::ConstructPerpendicularVector_2` +\sa `Kernel::ConstructScaledVector_2` +\sa `Kernel::ConstructDividedVector_2` +\sa `Kernel::ConstructSumOfVectors_2` +\sa `Kernel::ConstructDifferenceOfVectors_2` +\sa `Kernel::ConstructVector_2` +\sa `Kernel::Equal_2` +\sa `Kernel::Orientation_2` + +*/ +class Vector_2 { +public: +}; /* end Kernel::Vector_2 */ + +/*! +\ingroup PkgKernel23ConceptsGeomObject +\cgalconcept + +A type representing vectors in three dimensions. + +\refines CopyConstructible +\refines Assignable +\refines DefaultConstructible + +\sa `CGAL::Vector_3` +\sa `Kernel::ComputeDeterminant_3` +\sa `Kernel::ComputeX_3` +\sa `Kernel::ComputeY_3` +\sa `Kernel::ComputeZ_3` +\sa `Kernel::ConstructCrossProductVector_3` +\sa `Kernel::ConstructDirection_3` +\sa `Kernel::ConstructOppositeVector_3` +\sa `Kernel::ConstructOrthogonalVector_3` +\sa `Kernel::ConstructScaledVector_3` +\sa `Kernel::ConstructDividedVector_3` +\sa `Kernel::ConstructSumOfVectors_3` +\sa `Kernel::ConstructDifferenceOfVectors_3` +\sa `Kernel::ConstructVector_3` +\sa `Kernel::Equal_3` +\sa `Kernel::Orientation_3` + +*/ +class Vector_3 { +public: + +}; /* end Kernel::Vector_3 */ + + +/*! +\ingroup PkgKernel23ConceptsGeomObject +\cgalconcept + +A type representing directions in two dimensions. + +\refines CopyConstructible +\refines Assignable +\refines DefaultConstructible + +\sa `CGAL::Direction_2` +\sa `Kernel::CompareAngleWithXAxis_2` +\sa `Kernel::ComputeDx_2` +\sa `Kernel::ComputeDy_2` +\sa `Kernel::ConstructDirection_2` +\sa `Kernel::ConstructOppositeDirection_2` +\sa `Kernel::ConstructPerpendicularDirection_2` +\sa `Kernel::CounterclockwiseInBetween_2` +\sa `Kernel::Equal_2` + +*/ +class Direction_2 { +public: +}; /* end Kernel::Direction_2 */ + +/*! +\ingroup PkgKernel23ConceptsGeomObject +\cgalconcept + +A type representing directions in three dimensions. + +\refines CopyConstructible +\refines Assignable +\refines DefaultConstructible + +\sa `CGAL::Direction_3` +\sa `Kernel::ConstructDirection_3` +\sa `Kernel::ConstructOppositeDirection_3` +\sa `Kernel::Equal_2` + +*/ +class Direction_3 { +public: + +}; /* end Kernel::Direction_3 */ + +/*! +\ingroup PkgKernel23ConceptsGeomObject +\cgalconcept + +A type representing circles in three dimensions. + +\refines CopyConstructible +\refines Assignable +\refines DefaultConstructible + +\sa `CGAL::Circle_3` +\sa `Kernel::ComputeApproximateArea_3` +\sa `Kernel::ComputeApproximateSquaredLength_3` +\sa `Kernel::ComputeAreaDividedByPi_3` +\sa `Kernel::ComputeSquaredLengthDividedByPiSquare_3` +\sa `Kernel::ComputeSquaredRadius_3` +\sa `Kernel::ConstructBbox_3` +\sa `Kernel::ConstructCenter_3` +\sa `Kernel::ConstructCircle_3` +\sa `Kernel::ConstructSphere_3` +\sa `Kernel::ConstructPlane_3` +\sa `Kernel::Equal_3` +\sa `Kernel::HasOn_3` +\sa `Kernel::IsDegenerate_3` + +*/ +class Circle_3 { +public: +}; /* end Kernel::Circle_3 */ + +/*! +\ingroup PkgKernel23ConceptsGeomObject +\cgalconcept + +A type representing spheres in three dimensions. + +\refines CopyConstructible +\refines Assignable +\refines DefaultConstructible + +\sa `CGAL::Sphere_3` +\sa `Kernel::BoundedSide_3` +\sa `Kernel::ComputeSquaredRadius_3` +\sa `Kernel::ConstructCenter_3` +\sa `Kernel::ConstructOppositeSphere_3` +\sa `Kernel::ConstructRadicalPlane_3` +\sa `Kernel::ConstructSphere_3` +\sa `Kernel::Equal_2` +\sa `Kernel::HasOnBoundary_3` +\sa `Kernel::HasOnBoundedSide_3` +\sa `Kernel::HasOnNegativeSide_3` +\sa `Kernel::HasOnPositiveSide_3` +\sa `Kernel::HasOnUnboundedSide_3` +\sa `Kernel::IsDegenerate_3` +\sa `Kernel::OrientedSide_3` + +*/ +class Sphere_3 { +public: +}; /* end Kernel::Sphere_3 */ + +/*! +\ingroup PkgKernel23ConceptsGeomObject +\cgalconcept + +A type representing rays in two dimensions. + +\refines CopyConstructible +\refines Assignable +\refines DefaultConstructible + +\sa `CGAL::Ray_2` +\sa `Kernel::CollinearHasOn_2` +\sa `Kernel::ComputeSquaredDistance_2` +\sa `Kernel::ConstructDirection_2` +\sa `Kernel::ConstructLine_2` +\sa `Kernel::ConstructOppositeRay_2` +\sa `Kernel::ConstructPointOn_2` +\sa `Kernel::ConstructRay_2` +\sa `Kernel::ConstructSource_2` +\sa `Kernel::ConstructSecondPoint_2` +\sa `Kernel::DoIntersect_2` +\sa `Kernel::Equal_2` +\sa `Kernel::HasOn_2` +\sa `Kernel::Intersect_2` +\sa `Kernel::IsDegenerate_2` +\sa `Kernel::IsHorizontal_2` +\sa `Kernel::IsVertical_2` + +*/ +class Ray_2 { +public: +}; /* end Kernel::Ray_2 */ + +/*! +\ingroup PkgKernel23ConceptsGeomObject +\cgalconcept + +A type representing rays in three dimensions. + +\refines CopyConstructible +\refines Assignable +\refines DefaultConstructible + +\sa `CGAL::Ray_3` +\sa `Kernel::ComputeSquaredDistance_3` +\sa `Kernel::ConstructDirection_3` +\sa `Kernel::ConstructLine_3` +\sa `Kernel::ConstructOppositeRay_3` +\sa `Kernel::ConstructPlane_3` +\sa `Kernel::ConstructPointOn_3` +\sa `Kernel::ConstructRay_3` +\sa `Kernel::DoIntersect_3` +\sa `Kernel::Equal_3` +\sa `Kernel::HasOn_3` +\sa `Kernel::Intersect_3` +\sa `Kernel::IsDegenerate_3` + +*/ +class Ray_3 { +public: +}; /* end Kernel::Ray_3 */ + +/*! +\ingroup PkgKernel23ConceptsGeomObject +\cgalconcept + +A type representing planes (and half-spaces) in three dimensions. + +\refines CopyConstructible +\refines Assignable +\refines DefaultConstructible + +\sa `CGAL::Plane_3` +\sa `Kernel::ComputeSquaredDistance_3` +\sa `Kernel::ConstructBaseVector_3` +\sa `Kernel::ConstructBisector_3` +\sa `Kernel::ConstructLiftedPoint_3` +\sa `Kernel::ConstructOppositePlane_3` +\sa `Kernel::ConstructOrthogonalVector_3` +\sa `Kernel::ConstructPerpendicularLine_3` +\sa `Kernel::ConstructPerpendicularPlane_3` +\sa `Kernel::ConstructPlane_3` +\sa `Kernel::ConstructPointOn_3` +\sa `Kernel::ConstructProjectedPoint_3` +\sa `Kernel::ConstructProjectedXYPoint_2` +\sa `Kernel::DoIntersect_3` +\sa `Kernel::Equal_3` +\sa `Kernel::HasOnNegativeSide_3` +\sa `Kernel::HasOnPositiveSide_3` +\sa `Kernel::HasOn_3` +\sa `Kernel::Intersect_3` +\sa `Kernel::IsDegenerate_3` +\sa `Kernel::LessSignedDistanceToPlane_3` +\sa `Kernel::OrientedSide_3` + +*/ +class Plane_3 { +public: +}; /* end Kernel::Plane_3 */ + + +/*! +\ingroup PkgKernel23ConceptsGeomObject +\cgalconcept + +A type representing iso-rectangles in two dimensions. + +\refines CopyConstructible +\refines Assignable +\refines DefaultConstructible + +\sa `CGAL::Iso_rectangle_2` +\sa `Kernel::ConstructIsoRectangle_2` +\sa `Kernel::ComputeXmin_2` +\sa `Kernel::ComputeXmax_2` +\sa `Kernel::ComputeYmin_2` +\sa `Kernel::ComputeYmax_2` +\sa `Kernel::BoundedSide_2` +\sa `Kernel::ComputeArea_2` +\sa `Kernel::ConstructIsoRectangle_2` +\sa `Kernel::ConstructVertex_2` +\sa `Kernel::DoIntersect_2` +\sa `Kernel::Equal_2` +\sa `Kernel::HasOnBoundary_2` +\sa `Kernel::HasOnBoundedSide_2` +\sa `Kernel::HasOnUnboundedSide_2` +\sa `Kernel::Intersect_2` +\sa `Kernel::IsDegenerate_2` + +*/ +class IsoRectangle_2 { +public: +}; /* end Kernel::IsoRectangle_2 */ + + +/*! +\ingroup PkgKernel23ConceptsGeomObject +\cgalconcept + +A type representing isocuboids in three dimensions. + +\refines CopyConstructible +\refines Assignable +\refines DefaultConstructible + +\sa `CGAL::Iso_cuboid_3` +\sa `Kernel::BoundedSide_3` +\sa `Kernel::ComputeVolume_3` +\sa `Kernel::ConstructIsoCuboid_3` +\sa `Kernel::ConstructVertex_3` +\sa `Kernel::Equal_2` +\sa `Kernel::HasOnBoundary_3` +\sa `Kernel::HasOnBoundedSide_3` +\sa `Kernel::HasOnUnboundedSide_3` +\sa `Kernel::IsDegenerate_3` + +*/ +class IsoCuboid_3 { +public: +}; /* end Kernel::IsoCuboid_3 */ + +/*! +\ingroup PkgKernel23ConceptsGeomObject +\cgalconcept + +A type representing different types of objects in two dimensions. + +\refines CopyConstructible +\refines Assignable +\refines DefaultConstructible + +\sa `CGAL::Object` +\sa `Kernel::Assign_2` +\sa `Kernel::ConstructObject_2` +\sa `Kernel::Intersect_2` + +*/ +class Object_2 { +public: +}; /* end Kernel::Object_2 */ + +/*! +\ingroup PkgKernel23ConceptsGeomObject +\cgalconcept + +A type representing different types of objects in three dimensions. + +\refines CopyConstructible +\refines Assignable +\refines DefaultConstructible + +\sa `CGAL::Object` +\sa `Kernel::Assign_3` +\sa `Kernel::ConstructObject_3` +\sa `Kernel::Intersect_3` + +*/ +class Object_3 { +public: +}; /* end Kernel::Object_3 */ + + + +/// @} + +/// \name Function Object Concepts +/// @{ + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Vector_2` + +*/ +class ConstructScaledVector_2 { +public: + +/*! +produces the vector `v` scaled by a factor `scale`. +*/ +Kernel::Vector_2 operator()(const Kernel::Vector_2 &v, const Kernel::RT& scale); + +/*! +produces the vector `v` scaled by a factor `scale`. +*/ +Kernel::Vector_2 operator()(const Kernel::Vector_2 &v, const Kernel::FT& scale); + + +}; /* end Kernel::ConstructScaledVector_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Line_3` +\sa `CGAL::Plane_3` +\sa `CGAL::Ray_3` +\sa `CGAL::Segment_3` + +*/ +class ConstructPointOn_3 { +public: + +/*! +returns an arbitrary point on `l`. It holds +`point(i) == point(j)`, iff `i==j`. +Furthermore, is directed from `point(i)` +to `point(j)`, for all `i` \f$ <\f$ `j`. +*/ +Kernel::Point_3 operator()(const Kernel::Line_3& l, +int i); + +/*! +returns an arbitrary point on `h`. +*/ +Kernel::Point_3 operator()(const Kernel::Plane_3& h); + +/*! +returns a point on `r`. `point(0)` is the source, +`point(i)`, with \f$ i>0\f$, is different from the +source. \pre \f$ i \geq0\f$. +*/ +Kernel::Point_3 operator()(const Kernel::Ray_3& r, +int i); + +/*! +returns source or target of `s`: `point(0)` returns +the source of `s`, `point(1)` returns the target of `s`. +The parameter `i` is taken modulo 2, which gives +easy access to the other end point. +*/ +Kernel::Point_3 operator()(const Kernel::Segment_3& s, +int i); + + +}; /* end Kernel::ConstructPointOn_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::midpoint` + +*/ +class ConstructMidpoint_2 { +public: + + +/*! +computes the midpoint of the segment \f$ pq\f$. +*/ +Kernel::Point_2 operator()(const Kernel::Point_2& p, +const Kernel::Point_2& q ); + + +}; /* end Kernel::ConstructMidpoint_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Plane_3` + +*/ +class ConstructProjectedXYPoint_2 { +public: + + +/*! +returns the image point of the projection of `p` under an affine +transformation, which maps `h` onto the \f$ xy\f$-plane, with the +\f$ z\f$-coordinate removed. +*/ +Kernel::Point_2 operator()(const Kernel::Plane_3& h, +const Kernel::Point_3& p); + + +}; /* end Kernel::ConstructProjectedXYPoint_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Object` +\sa `Kernel::Assign_2` +\sa `Kernel::Assign_3` +\sa `Kernel::Object_2` +\sa `Kernel::Object_3` + +*/ +class ConstructObject_2 { +public: + + +/*! +constructs an object that contains `t` and returns it. +*/ +template +Object_2 operator()(const T& t); + + +}; /* end Kernel::ConstructObject_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor + +*/ +class ComputeHx_2 { +public: + +/// \name Refines +/// @{ + +/*! +returns the homogeneous \f$ x\f$-coordinate of the point. +*/ +Kernel::FT operator()(const Kernel::Point_2& p) const; + +/*! +returns the homogeneous \f$ x\f$-coordinate of the vector. +*/ +Kernel::FT operator()(const Kernel::Vector_2& v) const; + +/// @} + +}; /* end Kernel::ComputeHx_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with four arguments) + +\sa `CGAL::coplanar` + +*/ +class Coplanar_3 { +public: + + +/*! +returns `true`, if \f$ p\f$, \f$ q\f$, \f$ r\f$, and \f$ s\f$ are coplanar. +*/ +bool operator()(const Kernel::Point_3&p, +const Kernel::Point_3&q, +const Kernel::Point_3&r, +const Kernel::Point_3&s); + + +}; /* end Kernel::Coplanar_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::compare_xy` + +*/ +class LessXY_3 { +public: + + +/*! +returns true iff the \f$ x\f$-coordinate of \f$ p\f$ is smaller than the +\f$ x\f$-coordinate of \f$ q\f$ or if the are the same and +the \f$ y\f$-coordinate of \f$ p\f$ is smaller than the \f$ y\f$-coordinate of \f$ q\f$. +*/ +bool operator()(const Kernel::Point_3&p, +const Kernel::Point_3&q); + + +}; /* end Kernel::LessXY_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Line_2` +\sa `CGAL::Ray_2` +\sa `CGAL::Segment_2` + +*/ +class IsHorizontal_2 { +public: + + +/*! +returns true iff \f$ o\f$ is horizontal. +*/ +bool operator()(const Kernel::Line_2&o); + +/*! +returns true iff \f$ o\f$ is horizontal. +*/ +bool operator()(const Kernel::Ray_2&o); + +/*! +returns true iff \f$ o\f$ is horizontal. +*/ +bool operator()(const Kernel::Segment_2&o); + + +}; /* end Kernel::IsHorizontal_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Vector_2` + +*/ +class ConstructDividedVector_2 { +public: + + +/*! +introduces the vector \f$ v/s\f$. +*/ +Kernel::Vector_2 operator()(const Kernel::Vector_2 &v, +const Kernel::RT s); + + +}; /* end Kernel::ConstructDividedVector_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::z_equal` + +*/ +class EqualZ_3 { +public: + + +/*! +returns true iff \f$ p\f$ and \f$ q\f$ have the same Cartesian \f$ z\f$-coordinate. +*/ +bool operator()(const Kernel::Point_3&p, +const Kernel::Point_3&q); + + +}; /* end Kernel::EqualZ_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Line_2` + +*/ +class ConstructProjectedPoint_2 { +public: + + +/*! +returns the orthogonal projection of `p` onto `l`. +*/ +Kernel::Point_2 operator()(const Kernel::Line_2& l, +const Kernel::Point_2& p); + + +}; /* end Kernel::ConstructProjectedPoint_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Plane_3` + +*/ +class ConstructPlane_3 { +public: + + +/*! +creates a plane defined by the equation +\f$ a\, x +b\, y +c\, z + d = 0\f$. +Notice that it is degenerate if \f$ a = b = c = 0\f$. +*/ +Kernel::Plane_3 operator()(const Kernel::RT &a, +const Kernel::RT &b, +const Kernel::RT &c, +const Kernel::RT &d); + +/*! +creates a plane passing through the points `p`, +`q` and `r`. The plane is oriented such that `p`, +`q` and `r` are oriented in a positive sense +(that is counterclockwise) when seen from the positive side of the plane. +Notice that it is degenerate if the points are collinear. +*/ +Kernel::Plane_3 operator()(const Kernel::Point_3 &p, +const Kernel::Point_3 &q, +const Kernel::Point_3 &r); + +/*! +introduces a plane that passes through point `p` and +that has as an orthogonal direction equal to `d`. +*/ +Kernel::Plane_3 operator()(const Kernel::Point_3 &p, +const Kernel::Direction_3&d); + +/*! +introduces a plane that passes through point `p` and +that is orthogonal to `v`. +*/ +Kernel::Plane_3 operator()(const Kernel::Point_3 &p, +const Kernel::Vector_3 &v); + +/*! +introduces a plane that is defined through the three points +`l.point(0)`, `l.point(1)` and `p`. +*/ +Kernel::Plane_3 operator()(const Kernel::Line_3 &l, +const Kernel::Point_3 &p); + +/*! +introduces a plane that is defined through the three points +`r.point(0)`, `r.point(1)` and `p`. +*/ +Kernel::Plane_3 operator()(const Kernel::Ray_3 &r, +const Kernel::Point_3 &p); + +/*! +introduces a plane that is defined through the three points +`s.source()`, `s.target()` and `p`. +*/ +Kernel::Plane_3 operator()(const Kernel::Segment_3 &s, +const Kernel::Point_3 &p); + +/*! +introduces a plane that is defined as the plane containing the circle. +*/ +Kernel::Plane_3 operator()(const Kernel::Circle_3 &c); + + +}; /* end Kernel::ConstructPlane_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Line_3` + +*/ +class ConstructOppositeLine_3 { +public: + + +/*! +returns the line representing the same set of points as \f$ l\f$, +but with opposite direction. +*/ +Kernel::Line_3 operator()(const Kernel::Line_3& l); + + +}; /* end Kernel::ConstructOppositeLine_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Ray_2` + +*/ +class ConstructOppositeRay_2 { +public: + + +/*! +returns the ray with the same source as \f$ r\f$, but in opposite direction. +*/ +Kernel::Ray_2 operator()(const Kernel::Ray_2& r); + + +}; /* end Kernel::ConstructOppositeRay_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Vector_3` + +*/ +class ConstructDividedVector_3 { +public: + + +/*! +introduces the vector \f$ v/s\f$. +*/ +Kernel::Vector_3 operator()(const Kernel::Vector_3 &v, +const Kernel::RT s); + + +}; /* end Kernel::ConstructDividedVector_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with four arguments) + +\sa `CGAL::coplanar_side_of_bounded_circle` + +*/ +class CoplanarSideOfBoundedCircle_3 { +public: + + +/*! +returns the bounded side of the circle defined +by `p`, `q`, and `r` on which `s` lies. +\pre `p`, `q`, `r`, and `s` are coplanar and `p`, `q`, and `r` are not collinear. +*/ +Bounded_side operator()(const Kernel::Point_3&p, +const Kernel::Point_3&q, +const Kernel::Point_3&r, +const Kernel::Point_3&s); + + +}; /* end Kernel::CoplanarSideOfBoundedCircle_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Plane_3` +\sa `CGAL::Sphere_3` +\sa `CGAL::Tetrahedron_3` + +*/ +class HasOnNegativeSide_3 { +public: + + +/*! +returns true iff \f$ p\f$ lies on the negative side of \f$ h\f$ +(\f$ h\f$ is considered a half-space). +*/ +bool operator()(const Kernel::Plane_3&h, +const Kernel::Point_3&p); + +/*! +returns true iff \f$ p\f$ lies on the negative side of \f$ s\f$. +*/ +bool operator()(const Kernel::Sphere_3&s, +const Kernel::Point_3&p); + +/*! +returns true iff \f$ p\f$ lies on the negative side of \f$ t\f$. +*/ +bool operator()(const Kernel::Tetrahedron_3&t, +const Kernel::Point_3&p); + + +}; /* end Kernel::HasOnNegativeSide_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Vector_2` +\sa `CGAL::Segment_2` + +*/ +class ComputeSquaredLength_2 { +public: + + +/*! +returns the squared length of \f$ v\f$. +*/ +Kernel::FT operator()(const Kernel::Vector_2& v); + +/*! +returns the squared length of \f$ s\f$. +*/ +Kernel::FT operator()(const Kernel::Segment_2& s); + + +}; /* end Kernel::ComputeSquaredLength_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Circle_2` + +*/ +class ConstructCenter_2 { +public: + + +/*! +compute the center of the circle \f$ c\f$. +*/ +Kernel::Point_2 operator()(const Kernel::Circle_2 & c); + + +}; /* end Kernel::ConstructCenter_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor + +*/ +class ComputeHy_2 { +public: + +/// \name Refines +/// @{ + +/*! +returns the homogeneous \f$ y\f$-coordinate of the point. +*/ +Kernel::FT operator()(const Kernel::Point_2& p) const; + +/*! +returns the homogeneous \f$ y\f$-coordinate of the vector. +*/ +Kernel::FT operator()(const Kernel::Vector_2& v) const; + +/// @} + +}; /* end Kernel::ComputeHy_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::compare_x` + +*/ +class LessX_3 { +public: + + +/*! +returns true iff the \f$ x\f$-coordinate of \f$ p\f$ is smaller than the +\f$ x\f$-coordinate of \f$ q\f$. +*/ +bool operator()(const Kernel::Point_3&p, +const Kernel::Point_3&q); + + +}; /* end Kernel::LessX_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Ray_2` +\sa `CGAL::Segment_2` + +*/ +class CollinearHasOn_2 { +public: + + +/*! +checks if point \f$ p\f$ is on \f$ r\f$. +\pre \f$ p\f$ is on the supporting line of \f$ r\f$. +*/ +bool operator()(const Kernel::Ray_2& r, +const Kernel::Point_2&p); + +/*! +checks if point \f$ p\f$ is on \f$ s\f$. +\pre \f$ p\f$ is on the supporting line of \f$ s\f$. +*/ +bool operator()(const Kernel::Segment_2& s, +const Kernel::Point_2&p); + + +}; /* end Kernel::CollinearHasOn_2 */ + + + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Vector_3` +\sa `CGAL::Segment_3` + +*/ +class ComputeSquaredLength_3 { +public: + + +/*! +returns the squared length of \f$ v\f$. +*/ +Kernel::FT operator()(const Kernel::Vector_3& v); + +/*! +returns the squared length of \f$ s\f$. +*/ +Kernel::FT operator()(const Kernel::Segment_3& s); + + +}; /* end Kernel::ComputeSquaredLength_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Segment_2` + +*/ +class ConstructSegment_2 { +public: + + +/*! +introduces a segment with source \f$ p\f$ +and target \f$ q\f$. The segment is directed from the source towards +the target. +*/ +Kernel::Segment_2 operator()(const Kernel::Point_2 &p, const Kernel::Point_2 &q); + + +}; /* end Kernel::ConstructSegment_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::compare_y` + +*/ +class LessY_2 { +public: + + +/*! +returns true iff the \f$ y\f$-coordinate of \f$ p\f$ is smaller than the +\f$ y\f$-coordinate of \f$ q\f$. +*/ +bool operator()(const Kernel::Point_2&p, +const Kernel::Point_2&q); + + +}; /* end Kernel::LessY_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with four arguments) + +\sa `CGAL::circumcenter` + +*/ +class ConstructCircumcenter_3 { +public: + + +/*! +compute the center of the smallest circle passing through the points \f$ p\f$ and +\f$ q\f$. Note : this is the same as `Kernel::ConstructMidPoint_3`. +*/ +Kernel::Point_3 operator()(const Kernel::Point_3&p, +const Kernel::Point_3&q); + +/*! +compute the center of the sphere passing through the points \f$ p\f$, \f$ q\f$, \f$ r\f$, +and \f$ s\f$. \pre \f$ p\f$, \f$ q\f$, \f$ r\f$, and \f$ s\f$ are not coplanar. +*/ +Kernel::Point_3 operator()(const Kernel::Point_3&p, +const Kernel::Point_3&q, +const Kernel::Point_3&r, +const Kernel::Point_3&s); + +/*! +compute the center of the sphere passing through the vertices of \f$ t\f$. +\pre \f$ t\f$ is not degenerate. +*/ +Kernel::Point_3 operator()(const Kernel::Tetrahedron_3&t); + +/*! +compute the center of the circle passing through the points \f$ p\f$, \f$ q\f$ and \f$ r\f$. +\pre \f$ p\f$, \f$ q\f$ and \f$ r\f$ are not collinear. +*/ +Kernel::Point_3 operator()(const Kernel::Point_3&p, +const Kernel::Point_3&q, +const Kernel::Point_3&r); + +/*! +compute the center of the circle passing through the vertices of \f$ t\f$. +\pre \f$ t\f$ is not degenerate. +*/ +Kernel::Point_3 operator()(const Kernel::Triangle_3&t); + + +}; /* end Kernel::ConstructCircumcenter_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with three arguments) + +\sa `CGAL::circumcenter` + +*/ +class ConstructCircumcenter_2 { +public: + + +/*! +compute the center of the smallest circle passing through the points \f$ p\f$ and \f$ q\f$. Note : this is the same as `Kernel::ConstructMidPoint_2`. +*/ +Kernel::Point_2 operator()(const Kernel::Point_2&p, +const Kernel::Point_2&q); + +/*! +compute the center of the circle passing through the points \f$ p\f$, \f$ q\f$, and \f$ r\f$. +\pre \f$ p\f$, \f$ q\f$, and \f$ r\f$ are not collinear. +*/ +Kernel::Point_2 operator()(const Kernel::Point_2&p, +const Kernel::Point_2&q, +const Kernel::Point_2&r); + +/*! +compute the center of the circle passing through the three vertices of \f$ t\f$. +\pre \f$ t\f$ is not degenerate. +*/ +Kernel::Point_2 operator()(const Kernel::Triangle_2&t); + + +}; /* end Kernel::ConstructCircumcenter_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with four arguments) + +\sa `CGAL::Sphere_3` + +*/ +class ConstructSphere_3 { +public: + + +/*! +introduces a sphere initialized to the sphere with center `center`, +squared radius `squared_radius` and orientation +`orientation`. +\pre `orientation` \f$ \neq\f$ `COPLANAR`, and furthermore, `squared_radius` \f$ \geq\f$ 0. +*/ +Kernel::Sphere_3 operator()(const Kernel::Point_3 & center, +const Kernel::FT & squared_radius, +const Orientation & orientation = COUNTERCLOCKWISE); + +/*! +introduces a sphere initialized to the unique sphere which passes +through the points `p`, `q`, `r` and `s`. The +orientation of the sphere is the orientation of the point quadruple +`p`, `q`, `r`, `s`. +\pre `p`, `q`, `r`, and `s` are not coplanar. +*/ +Kernel::Sphere_3 operator()( const Kernel::Point_3 & p, +const Kernel::Point_3 & q, +const Kernel::Point_3 & r, +const Kernel::Point_3 & s); + +/*! +introduces a sphere initialized to the smallest sphere which passes +through the points `p`, `q`, and `r`. The orientation of +the sphere is `o`. \pre `o` is not `COPLANAR`. +*/ +Kernel::Sphere_3 operator()(const Kernel::Point_3 & p, +const Kernel::Point_3 & q, +const Kernel::Point_3 & r, +const Orientation& o = COUNTERCLOCKWISE); + +/*! +introduces a sphere initialized to the smallest sphere which passes +through the points `p` and `q`. The orientation of +the sphere is `o`. \pre `o` is not `COPLANAR`. +*/ +Kernel::Sphere_3 operator()(const Kernel::Point_3 & p, +const Kernel::Point_3 & q, +const Orientation & o = COUNTERCLOCKWISE); + +/*! +introduces a sphere \f$ s\f$ initialized to the sphere with center +`center`, squared radius zero and orientation `orientation`. +\pre `orientation` \f$ \neq\f$ `COPLANAR`. +\post `s.is_degenerate()` = `true`. +*/ +Kernel::Sphere_3 operator()( const Kernel::Point_3 & center, +const Orientation & orientation = COUNTERCLOCKWISE); + +/*! +introduces a sphere initialized to the diametral sphere of +the circle. +*/ +Kernel::Sphere_3 operator()( const Kernel::Circle_3 &c); + + +}; /* end Kernel::ConstructSphere_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Triangle_3` + +*/ +class ConstructSupportingPlane_3 { +public: + + +/*! +returns the supporting plane of \f$ t\f$, with same orientation. +*/ +Kernel::Plane_3 operator()(const Kernel::Triangle_3& t); + + +}; /* end Kernel::ConstructSupportingPlane_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Iso_rectangle_2` +\sa `CGAL::Segment_2` + +*/ +class ConstructMaxVertex_2 { +public: + + +/*! +returns the vertex of +`r` with lexicographically largest coordinates. +*/ +Kernel::Point_2 operator()(const +Kernel::Iso_rectangle_2 &r); + +/*! +returns the vertex of +`s` with lexicographically largest coordinates. +*/ +Kernel::Point_2 operator()(const +Kernel::Segment_2 &s); + + +}; /* end Kernel::ConstructMaxVertex_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor + +*/ +class ComputeYmax_2 { +public: + +/// \name Refines +/// @{ + +/*! +returns the largest \f$ y\f$-coordinate of the iso-rectangle. +*/ +Kernel::FT operator()(const Kernel::Iso_rectangle_2& r) const; + +/// @} + +}; /* end Kernel::ComputeYmax_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::x_equal` + +*/ +class EqualX_2 { +public: + + +/*! +returns true iff \f$ p\f$ and \f$ q\f$ have the same Cartesian \f$ x\f$-coordinate. +*/ +bool operator()(const Kernel::Point_2&p, +const Kernel::Point_2&q); + + +}; /* end Kernel::EqualX_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +for all pairs `Type1` and `Type2`, where +the types `Type1` and `Type2` can be any of the +following: + +- `Kernel::Point_2` +- `Kernel::Line_2` +- `Kernel::Ray_2` +- `Kernel::Segment_2` +- `Kernel::Triangle_2` + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::squared_distance` + +*/ +class ComputeSquaredDistance_2 { +public: + + +/*! +returns the squared distance between two geometrical objects of type +`Type1` and `Type2` +*/ +Kernel::FT operator()(Type1 obj1, Type2 obj2); + + +}; /* end Kernel::ComputeSquaredDistance_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with three arguments) + +\sa `CGAL::are_strictly_ordered_along_line` + +*/ +class AreStrictlyOrderedAlongLine_3 { +public: + + +/*! +returns `true`, iff the three points are collinear and +`q` lies strictly between `p` and `r`. +Note that `false` is returned, if `q==p` or +`q==r`. +*/ +bool operator()(const Kernel::Point_3&p, +const Kernel::Point_3&q, +const Kernel::Point_3&r); + + +}; /* end Kernel::AreStrictlyOrderedAlongLine_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Iso_cuboid_3` +\sa `CGAL::Segment_3` + +*/ +class ConstructMinVertex_3 { +public: + + +/*! +returns the vertex of +`c` with lexicographically smallest coordinates. +*/ +Kernel::Point_3 operator()(const +Kernel::Iso_cuboid_3 &c); + +/*! +returns the vertex of +`s` with lexicographically smallest coordinates. +*/ +Kernel::Point_3 operator()(const +Kernel::Segment_3 &s); + + +}; /* end Kernel::ConstructMinVertex_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide the following operations. For all of +them `fo``(x,y)` returns true iff \f$ x\f$ and \f$ y\f$ are equal. + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Direction_3` +\sa `CGAL::Iso_cuboid_3` +\sa `CGAL::Line_3` +\sa `CGAL::Plane_3` +\sa `CGAL::Point_3` +\sa `CGAL::Ray_3` +\sa `CGAL::Segment_3` +\sa `CGAL::Sphere_3` +\sa `CGAL::Tetrahedron_3` +\sa `CGAL::Triangle_3` +\sa `CGAL::Vector_3` + +*/ +class Equal_3 { +public: + + +/*! + +*/ +bool operator()(const Kernel::Point_3& x, +const Kernel::Point_3& y); + +/*! + +*/ +bool operator()(const Kernel::Vector_3& x, +const Kernel::Vector_3& y); + +/*! + +*/ +bool operator()(const Kernel::Direction_3& x, +const Kernel::Direction_3& y); + +/*! + +*/ +bool operator()(const Kernel::Line_3& x, +const Kernel::Line_3& y); + +/*! + +*/ +bool operator()(const Kernel::Plane_3& x, +const Kernel::Plane_3& y); + +/*! + +*/ +bool operator()(const Kernel::Ray_3& x, +const Kernel::Ray_3& y); + +/*! + +*/ +bool operator()(const Kernel::Segment_3& x, +const Kernel::Segment_3& y); + +/*! + +*/ +bool operator()(const Kernel::Circle_3& x, +const Kernel::Circle_3& y); + +/*! + +*/ +bool operator()(const Kernel::Sphere_3& x, +const Kernel::Sphere_3& y); + +/*! + +*/ +bool operator()(const Kernel::Triangle_3& x, +const Kernel::Triangle_3& y); + +/*! + +*/ +bool operator()(const Kernel::Tetrahedron_3& x, +const Kernel::Tetrahedron_3& y); + +/*! + +*/ +bool operator()(const Kernel::Iso_cuboid_3& x, +const Kernel::Iso_cuboid_3& y); + + +}; /* end Kernel::Equal_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Plane_3` + +*/ +class ConstructOppositePlane_3 { +public: + + +/*! +returns the plane representing the same set of points as \f$ p\f$, +but with opposite orientation. +*/ +Kernel::Plane_3 operator()(const Kernel::Plane_3& p); + + +}; /* end Kernel::ConstructOppositePlane_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with three arguments) + +\sa `CGAL::has_smaller_distance_to_point` + +*/ +class LessDistanceToPoint_3 { +public: + + +/*! +returns true iff the distance of \f$ q\f$ to \f$ p\f$ is +smaller than the distance of \f$ r\f$ to \f$ p\f$. +*/ +bool operator()(const Kernel::Point_3&p, +const Kernel::Point_3&q, +const Kernel::Point_3&r); + + +}; /* end Kernel::LessDistanceToPoint_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\image html compare2.gif + +\refines ::AdaptableFunctor (with three arguments) + +\anchor fig-compare2 +\sa `CGAL::compare_y_at_x` + +*/ +class CompareYAtX_2 { +public: + + +/*! +compares the \f$ y\f$-coordinates of \f$ p\f$ and the vertical projection +of `p` on `h`. See Figure \ref fig-compare2 (e). +\pre `h` is not vertical. +*/ +Comparison_result operator()(const Kernel::Point_2 &p, +const Kernel::Line_2 &h); + +/*! +This function compares the \f$ y\f$-coordinates of the vertical projection +of `p` on `h1` and on `h2`. See Figure \ref fig-compare2 (e). +\pre `h1` and `h2` are not vertical. +*/ +Comparison_result operator()(const Kernel::Point_2 &p, +const Kernel::Line_2 &h1, +const Kernel::Line_2 &h2); + +/*! +Let \f$ p\f$ be the intersection of lines \f$ l1\f$ and \f$ l2\f$. +This function compares the \f$ y\f$-coordinates of \f$ p\f$ and +the vertical projection of `p` on `h`. +See (Figure \ref fig-compare2 (f)). +\pre `l1`, `l2` intersect and `h` is not vertical. + +*/ +Comparison_result operator()(const Kernel::Line_2 &l1, +const Kernel::Line_2 &l2, +const Kernel::Line_2 &h); + +/*! +Let \f$ p\f$ be the intersection of lines \f$ l1\f$ and \f$ l2\f$. This function +compares the \f$ y\f$-coordinates of the vertical projection of `p` on +`h1` and on `h2`. +See (Figure \ref fig-compare2 (g)). +\pre `l1` and `l2` intersect; `h1` and `h2` are not vertical. + +*/ +Comparison_result operator()(const Kernel::Line_2 &l1, +const Kernel::Line_2 &l2, +const Kernel::Line_2 &h1, +const Kernel::Line_2 &h2); + +/*! +compares the \f$ y\f$-coordinates of \f$ p\f$ and the vertical projection +of `p` on `s`. If `s` is vertical, then return +`EQUAL` when `p` lies on `s`, `SMALLER` when `p` lies +under s, and `LARGER` otherwise. + +\pre `p` is within the x range of `s`. +*/ +Comparison_result operator()(const Kernel::Point_2 &p, +const Kernel::Segment_2 &s); + +/*! +This function compares the \f$ y\f$-coordinates of the vertical projection +of `p` on `s1` and on `s2`. If `s1` or `s2` +is vertical, then return `EQUAL` if they intersect, otherwise return +`SMALLER` if `s1` lies below `s2`, and return `LARGER` +otherwise. + +\pre `p` is within the x range of `s1` and `s2`. +*/ +Comparison_result operator()(const Kernel::Point_2 &p, +const Kernel::Segment_2 &s1, +const Kernel::Segment_2 &s2); + +}; /* end Kernel::CompareYAtX_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor + +*/ +class ComputeDy_2 { +public: + +/// \name Refines +/// @{ + +/*! +returns an \f$ y\f$-coordinate of the direction. +*/ +Kernel::FT operator()(const Kernel::Direction_2& v) const; + +/// @} + +}; /* end Kernel::ComputeDy_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +for all pairs `Type1` and `Type2`, where +the types `Type1` and `Type2` can be any of the +following: + +- `Kernel::Point_2` +- `Kernel::Line_2` +- `Kernel::Ray_2` +- `Kernel::Segment_2` +- `Kernel::Triangle_2` + +\refines ::AdaptableFunctor (with three arguments) + +\sa `CGAL::compare_distance_to_point` +\sa `CGAL::compare_squared_distance` + +*/ +class CompareSquaredDistance_2 { +public: + + +/*! +compares the squared distance between the two geometrical objects +`obj1` and `obj2` to the value `d2` +*/ +Comparison_result operator()(const Type1& obj1, +const Type2& obj2, +const Kernel::FT&d2); + + +}; /* end Kernel::CompareSquaredDistance_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Triangle_3` + +*/ +class ComputeSquaredArea_3 { +public: + + +/*! +returns the square of the area of \f$ t\f$. +*/ +Kernel::FT operator()(const Kernel::Triangle_3& t); + +/*! +returns the square of the area of the triangle `p`, `q`, `r`. +*/ +Kernel::FT operator()(const Kernel::Point_3& p, +const Kernel::Point_3& q, +const Kernel::Point_3& r); + + +}; /* end Kernel::ComputeSquaredArea_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::x_equal` + +*/ +class EqualX_3 { +public: + + +/*! +returns true iff \f$ p\f$ and \f$ q\f$ have the same Cartesian \f$ x\f$-coordinate. +*/ +bool operator()(const Kernel::Point_3&p, +const Kernel::Point_3&q); + + +}; /* end Kernel::EqualX_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Direction_3` + +*/ +class ConstructDirection_3 { +public: + + +/*! +introduces a direction initialized with the +direction of vector \f$ v\f$. +*/ +Kernel::Direction_3 operator()(const Kernel::Vector_3 &v); + +/*! +introduces the direction of line \f$ l\f$. +*/ +Kernel::Direction_3 operator()(const Kernel::Line_3 &l); + +/*! +introduces the direction of ray \f$ r\f$. +*/ +Kernel::Direction_3 operator()(const Kernel::Ray_3 &r); + +/*! +introduces the direction of segment \f$ s\f$. +*/ +Kernel::Direction_3 operator()(const Kernel::Segment_3 &s); + + +}; /* end Kernel::ConstructDirection_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with three arguments) + +\sa `Kernel::ConstructBarycenter_3` +\sa `CGAL::centroid` +\sa `CGAL::barycenter` + +*/ +class ConstructCentroid_3 { +public: + + +/*! +compute the centroid of the points \f$ p\f$, \f$ q\f$, and \f$ r\f$. +*/ +Kernel::Point_3 operator()(const Kernel::Point_3&p, +const Kernel::Point_3&q, +const Kernel::Point_3&r); + +/*! +compute the centroid of the points \f$ p\f$, \f$ q\f$, \f$ r\f$ and \f$ s\f$. +*/ +Kernel::Point_3 operator()(const Kernel::Point_3&p, +const Kernel::Point_3&q, +const Kernel::Point_3&r, +const Kernel::Point_3&s); + +/*! +compute the centroid of the triangle \f$ t\f$. +*/ +Kernel::Point_3 operator()(const Kernel::Triangle_3&t); + +/*! +compute the centroid of the tetrahedron \f$ t\f$. +*/ +Kernel::Point_3 operator()(const Kernel::Tetrahedron_3&t); + + +}; /* end Kernel::ConstructCentroid_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Ray_3` + +*/ +class ConstructRay_3 { +public: + + +/*! +introduces a ray +with source \f$ p\f$ and passing through point \f$ q\f$. +*/ +Kernel::Ray_3 operator()(const Kernel::Point_3 &p, +const Kernel::Point_3 &q); + +/*! +introduces a ray with source \f$ p\f$ and with +the direction given by \f$ v\f$. +*/ +Kernel::Ray_3 operator()(const Kernel::Point_3 &p, +const Kernel::Vector_3 &v); + +/*! +introduces a ray with source \f$ p\f$ and with +direction \f$ d\f$. +*/ +Kernel::Ray_3 operator()(const Kernel::Point_3 &p, +const Kernel::Direction_3 &d); + +/*! +introduces a ray with source \f$ p\f$ and with +the same direction as \f$ l\f$. +*/ +Kernel::Ray_3 operator()(const Kernel::Point_3 &p, +const Kernel::Line_3 &l); + + +}; /* end Kernel::ConstructRay_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Segment_3` + +*/ +class ConstructSegment_3 { +public: + + +/*! +introduces a segment with source \f$ p\f$ +and target \f$ q\f$. It is directed from the source towards +the target. +*/ +Kernel::Segment_3 operator()(const Kernel::Point_3 &p, const Kernel::Point_3 &q); + + +}; /* end Kernel::ConstructSegment_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Circle_3` + +*/ +class ComputeApproximateSquaredLength_3 { +public: + + +/*! +returns an approximation of the squared length (i.e. perimeter) of \f$ c\f$. +*/ +double operator()(const Kernel::Circle_3& c); + + +}; /* end Kernel::ComputeApproximateSquaredLength_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Vector_2` +\sa `CGAL::determinant` + +*/ +class ComputeDeterminant_2 { +public: + + +/*! +returns the determinant of the two vectors \f$ v\f$ and \f$ w\f$. +*/ +Kernel::FT operator()(const Kernel::Vector_2& v, +const Kernel::Vector_2& w); + + +}; /* end Kernel::ComputeDeterminant_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Ray_2` + +*/ +class ConstructRay_2 { +public: + + +/*! +introduces a ray +with source \f$ p\f$ and passing through point \f$ q\f$. +*/ +Kernel::Ray_2 operator()(const Kernel::Point_2 &p, +const Kernel::Point_2 &q); + +/*! +introduces a ray starting at source \f$ p\f$ with +the direction given by \f$ v\f$. +*/ +Kernel::Ray_2 operator()(const Kernel::Point_2 &p, +const Kernel::Vector_2 &v); + +/*! +introduces a ray starting at source \f$ p\f$ with +direction \f$ d\f$. +*/ +Kernel::Ray_2 operator()(const Kernel::Point_2 &p, +const Kernel::Direction_2 &d); + +/*! +introduces a ray starting at source \f$ p\f$ with +the same direction as \f$ l\f$. +*/ +Kernel::Ray_2 operator()(const Kernel::Point_2 &p, +const Kernel::Line_2 &l); + + +}; /* end Kernel::ConstructRay_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with three arguments) + +\sa `CGAL::collinear` + +*/ +class Collinear_2 { +public: + + +/*! +returns `true`, if \f$ p\f$, \f$ q\f$, and \f$ r\f$ are collinear. +*/ +bool operator()(const Kernel::Point_2&p, +const Kernel::Point_2&q, +const Kernel::Point_2&r); + + +}; /* end Kernel::Collinear_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with three arguments) + +\sa `CGAL::left_turn` + +*/ +class LeftTurn_2 { +public: + + +/*! +returns `true`, iff the three points `p`, `q` +and `r` form a left turn. +*/ +bool operator()(const Kernel::Point_2&p, +const Kernel::Point_2&q, +const Kernel::Point_2&r); + + +}; /* end Kernel::LeftTurn_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Circle_2` +\sa `CGAL::Triangle_2` +\sa `CGAL::Iso_rectangle_2` + +*/ +class BoundedSide_2 { +public: + + +/*! +returns either `ON_UNBOUNDED_SIDE`, +`ON_BOUNDED_SIDE`, or the constant +`ON_BOUNDARY`, depending on where point `p` is relative to +circle `c`. +*/ +Bounded_side operator()(const Kernel::Circle_2&c, +const Kernel::Point_2&p); + +/*! +returns either `ON_UNBOUNDED_SIDE`, +`ON_BOUNDED_SIDE`, or the constant +`ON_BOUNDARY`, depending on where point `p` is relative to +triangle `t`. +*/ +Bounded_side operator()(const Kernel::Triangle_2& t, +const Kernel::Point_2&p); + +/*! +returns either `ON_UNBOUNDED_SIDE`, +`ON_BOUNDED_SIDE`, or the constant +`ON_BOUNDARY`, depending on where point `p` is relative to +rectangle `r`. +*/ +Bounded_side operator()(const Kernel::Iso_rectangle_2& r, +const Kernel::Point_2&p); + + +}; /* end Kernel::BoundedSide_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines AdaptableFunctor + +\sa `CGAL::bisector` + +*/ +class ConstructBisector_2 { +public: + +/*! +constructs the bisector of \f$ p\f$ and \f$ q\f$. +The bisector is oriented in such a way that `p` lies on its +positive side. \pre `p` and `q` are not equal. +*/ +Kernel::Line_2 operator()(const Kernel::Point_2&p, +const Kernel::Point_2&q ); + +/*! +constructs the bisector of the two lines \f$ l1\f$ and \f$ l2\f$. +In the general case, the bisector has the direction of the vector which +is the sum of the normalized directions of the two lines, and which passes +through the intersection of `l1` and `l2`. +If `l1` and `l2` are parallel, then the bisector is defined as the line +which has the same direction as `l1`, and which is at the same distance +from `l1` and `l2`. +This function requires that `Kernel::RT` supports the `sqrt()` +operation. +*/ +Kernel::Line_2 operator()(const Kernel::Line_2&l1, +const Kernel::Line_2&l2); + +}; /* end Kernel::ConstructBisector_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\sa `CGAL::Circle_3` + +\refines AdaptableFunctor + +*/ +class ComputeApproximateArea_3 { +public: + +/*! +returns an approximation of the area of \f$ c\f$. +*/ +double operator()(const Kernel::Circle_3& c); + +}; /* end Kernel::ComputeApproximateArea_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +for all tuples of types `Type1`, `Type2`, `Type3` +and `Type4` in the following set of types: + +- `Kernel::Point_3` +- `Kernel::Line_3` +- `Kernel::Ray_3` +- `Kernel::Segment_3` +- `Kernel::Plane_3` + +\refines ::AdaptableFunctor (with three arguments) + +\sa `Kernel::CompareSquaredDistance_3` +\sa `CGAL::compare_distance_to_point` +\sa `CGAL::compare_squared_distance` + +*/ +class CompareDistance_3 { +public: + + +/*! +compares the squared distance between `obj1` and `obj2` to +the squared distance between `obj1` and `obj3` +*/ +Comparison_result operator()(const Type1& obj1, +const Type2& obj2, +const Type3& obj3); + +/*! +compares the squared distance between `obj1` and `obj2` to +the squared distance between `obj3` and `obj4` +*/ +Comparison_result operator()(const Type1& obj1, +const Type2& obj2, +const Type3& obj3, +const Type4& obj4); + + +}; /* end Kernel::CompareDistance_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::compare_xy` + +*/ +class CompareXY_3 { +public: + + +/*! +Compares the Cartesian coordinates of points `p` and +`q` lexicographically in \f$ xy\f$ order: first +\f$ x\f$-coordinates are compared, if they are equal, \f$ y\f$-coordinates +are compared. +*/ +Comparison_result operator()(const Kernel::Point_3&p, +const Kernel::Point_3&q); + + +}; /* end Kernel::CompareXY_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Triangle_3` + +*/ +class ComputeArea_3 { +public: + + +/*! +returns the area of \f$ t\f$. This requires that `Kernel::FT` +supports the `sqrt` operation. +*/ +Kernel::FT operator()(const Kernel::Triangle_3& t); + +/*! +returns the area of the triangle `p`, `q`, `r`. +This requires that `Kernel::FT` supports the `sqrt` operation. +*/ +Kernel::FT operator()(const Kernel::Point_3& p, +const Kernel::Point_3& q, +const Kernel::Point_3& r); + + +}; /* end Kernel::ComputeArea_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +*/ +class ConstructBbox_3 { +public: + +/// \name Refines +/// @{ + +/*! +returns a bounding box of `c`. +*/ +CGAL::Bbox_3 operator()(const Kernel::Circle_3 +&c); + +/*! +returns a bounding box of `p`. +*/ +CGAL::Bbox_3 operator()(const Kernel::Point_3 +&p); + +/*! +returns a bounding box of `s`. +*/ +CGAL::Bbox_3 operator()(const Kernel::Segment_3 +&s); + +/*! +returns a bounding box of `t`. +*/ +CGAL::Bbox_3 operator()(const Kernel::Triangle_3 +&t); + +/*! +returns a bounding box of `t`. +*/ +CGAL::Bbox_3 operator()(const Kernel::Tetrahedron_3 +&t); + +/*! +returns a bounding box of `i`. +*/ +CGAL::Bbox_3 operator()(const Kernel::Iso_Cuboid_3 +&i); + +/*! +returns a bounding box of `s`. +*/ +CGAL::Bbox_3 operator()(const Kernel::Sphere_3 +&s); + +/// @} + +}; /* end Kernel::ConstructBbox_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::compare_slopes` + +*/ +class CompareSlope_2 { +public: + + +/*! +compares the slopes of the lines `l1` and `l2` +*/ +Comparison_result operator()(const Kernel::Line_2& l1, +const Kernel::Line_2& l2); + +/*! +compares the slopes of the segments `s1` and `s2` +*/ +Comparison_result operator()(const Kernel::Segment_2& s1, +const Kernel::Segment_2& s2); + + +}; /* end Kernel::CompareSlope_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::compare_xy` + +*/ +class EqualXY_3 { +public: + + +/*! +returns true iff \f$ p\f$ and \f$ q\f$ have the same Cartesian \f$ x\f$-coordinate +and the same Cartesian \f$ y\f$-coordinate. +*/ +bool operator()(const Kernel::Point_3&p, +const Kernel::Point_3&q); + + +}; /* end Kernel::EqualXY_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with three arguments) + +\sa `Kernel::ConstructCentroid_2` +\sa `CGAL::centroid` +\sa `CGAL::barycenter` + +*/ +class ConstructBarycenter_2 { +public: + + +/*! +compute the barycenter of the points \f$ p1\f$ and \f$ p2\f$ with corresponding +weights \f$ w1\f$ and \f$ 1-w1\f$. +*/ +Kernel::Point_2 +operator()( const Kernel::Point_2& p1, const Kernel::FT&w1, +const Kernel::Point_2& p2); + +/*! +compute the barycenter of the points \f$ p1\f$ and \f$ p2\f$ with corresponding +weights \f$ w1\f$ and \f$ w2\f$. \pre w1+w2 != 0. +*/ +Kernel::Point_2 +operator()( const Kernel::Point_2& p1, const Kernel::FT&w1, +const Kernel::Point_2& p2, const Kernel::FT&w2); + +/*! +compute the barycenter of the points \f$ p1\f$, \f$ p2\f$ and \f$ p3\f$ with corresponding +weights \f$ w1\f$, \f$ w2\f$ and \f$ 1-w1-w2\f$. +*/ +Kernel::Point_2 +operator()( const Kernel::Point_2& p1, const Kernel::FT&w1, +const Kernel::Point_2& p2, const Kernel::FT&w2, +const Kernel::Point_2& p3); + +/*! +compute the barycenter of the points \f$ p1\f$, \f$ p2\f$ and \f$ p3\f$ with corresponding +weights \f$ w1\f$, \f$ w2\f$ and \f$ w3\f$. \pre w1+w2+w3 != 0. +*/ +Kernel::Point_2 +operator()( const Kernel::Point_2& p1, const Kernel::FT&w1, +const Kernel::Point_2& p2, const Kernel::FT&w2, +const Kernel::Point_2& p3, const Kernel::FT&w3); + +/*! +compute the barycenter of the points \f$ p1\f$, \f$ p2\f$, \f$ p3\f$ and \f$ p4\f$ with corresponding +weights \f$ w1\f$, \f$ w2\f$, \f$ w3\f$ and \f$ 1-w1-w2-w3\f$. +*/ +Kernel::Point_2 +operator()( const Kernel::Point_2& p1, const Kernel::FT&w1, +const Kernel::Point_2& p2, const Kernel::FT&w2, +const Kernel::Point_2& p3, const Kernel::FT&w3, +const Kernel::Point_2& p4); + +/*! +compute the barycenter of the points \f$ p1\f$, \f$ p2\f$, \f$ p3\f$ and \f$ p4\f$ with corresponding +weights \f$ w1\f$, \f$ w2\f$, \f$ w3\f$ and \f$ w4\f$. \pre w1+w2+w3+w4 != 0. +*/ +Kernel::Point_2 +operator()( const Kernel::Point_2& p1, const Kernel::FT&w1, +const Kernel::Point_2& p2, const Kernel::FT&w2, +const Kernel::Point_2& p3, const Kernel::FT&w3, +const Kernel::Point_2& p4, const Kernel::FT&w4); + + +}; /* end Kernel::ConstructBarycenter_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Line_2` + +*/ +class ConstructPerpendicularLine_2 { +public: + + +/*! +returns the line perpendicular to \f$ l\f$ and passing through \f$ p\f$, +where the direction is the direction of \f$ l\f$ rotated +counterclockwise by 90 degrees. +*/ +Kernel::Line_2 operator()(const Kernel::Line_2& l, +const Kernel::Point_2& p); + + +}; /* end Kernel::ConstructPerpendicularLine_2 */ + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor + +*/ +class ComputeY_3 { +public: + +/// \name Refines +/// @{ + +/*! +returns the \f$ y\f$-coordinate of the point. +*/ +Kernel::FT operator()(const Kernel::Point_3& p) const; + +/*! +returns the \f$ y\f$-coordinate of the vector. +*/ +Kernel::FT operator()(const Kernel::Vector_3& v) const; + +/// @} + +}; /* end Kernel::ComputeY_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide + +for all pairs `Type1` and `Type2`, where +the types `Type1` and `Type2` can be any of the +following: + +- `Kernel::Point_2` +- `Kernel::Line_2` +- `Kernel::Ray_2` +- `Kernel::Segment_2` +- `Kernel::Triangle_2` +- `Kernel::Iso_rectangle_2` + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::do_intersect` + +*/ +class DoIntersect_2 { +public: + + +/*! +determines if two geometrical objects of type +`Type1` and `Type2` intersect or not +*/ +bool operator()(Type1 obj1, Type2 obj2); + + +}; /* end Kernel::DoIntersect_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::compare_yx` + +*/ +class LessYX_2 { +public: + + +/*! +returns true iff the \f$ y\f$-coordinate of \f$ p\f$ is smaller than the +\f$ y\f$-coordinate of \f$ q\f$ or if the are the same and +the \f$ x\f$-coordinate of \f$ p\f$ is smaller than the \f$ x\f$-coordinate of \f$ q\f$. +*/ +bool operator()(const Kernel::Point_2&p, +const Kernel::Point_2&q); + + +}; /* end Kernel::LessYX_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Iso_rectangle_2` +\sa `CGAL::Segment_2` +\sa `CGAL::Triangle_2` + +*/ +class ConstructVertex_2 { +public: + + +/*! +returns source or target of `s`: `fo``(s,0)` +returns the source of `s`, `fo``(s,1)` returns the target +of `s`. The parameter `i` is taken modulo 2. +*/ +Kernel::Point_2 operator()(const Kernel::Segment_2 +&s, int i); + +/*! +returns the i'th vertex of +`r` in counterclockwise order, starting with the lower left +vertex. The parameter `i` is taken modulo 4. +*/ +Kernel::Point_2 operator()(const +Kernel::Iso_rectangle_2 &r, int i); + +/*! +returns the i'th vertex of `t`. The parameter +`i` is taken modulo 3. +*/ +Kernel::Point_2 operator()(const Kernel::Triangle_2 +&t, int i); + + +}; /* end Kernel::ConstructVertex_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Circle_2` +\sa `CGAL::Line_2` +\sa `CGAL::Triangle_2` + +*/ +class OrientedSide_2 { +public: + + +/*! +returns `ON_ORIENTED_BOUNDARY`, +`ON_NEGATIVE_SIDE`, or the constant `ON_POSITIVE_SIDE`, +depending on the position of \f$ p\f$ relative to the oriented circle \f$ c\f$. +*/ +Oriented_side operator()(const Kernel::Circle_2&c, +const Kernel::Point_2&p); + +/*! +returns `ON_ORIENTED_BOUNDARY`, +`ON_NEGATIVE_SIDE`, or the constant `ON_POSITIVE_SIDE`, +depending on the position of \f$ p\f$ relative to the oriented line \f$ l\f$. +*/ +Oriented_side operator()(const Kernel::Line_2&l, +const Kernel::Point_2&p); + +/*! +returns `ON_ORIENTED_BOUNDARY`, +`ON_NEGATIVE_SIDE`, or the constant `ON_POSITIVE_SIDE`, +depending on the position of \f$ p\f$ relative to the oriented triangle \f$ t\f$. +*/ +Oriented_side operator()(const Kernel::Triangle_2&t, +const Kernel::Point_2&p); + + +}; /* end Kernel::OrientedSide_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with four arguments) + +\sa `CGAL::side_of_bounded_circle` + +*/ +class SideOfBoundedCircle_2 { +public: + + +/*! +returns the relative position of point `t` +to the circle defined by \f$ p\f$, \f$ q\f$ and \f$ r\f$. The order +of the points \f$ p\f$, \f$ q\f$ and \f$ r\f$ does not matter. +\pre `p, q` and `r` are not collinear. +*/ +Bounded_side operator()(const Kernel::Point_2&p, +const Kernel::Point_2&q, +const Kernel::Point_2&r, +const Kernel::Point_2&t); + +/*! +returns the position of the point `t` relative to the circle +that has \f$ pq\f$ as its diameter. +*/ +Bounded_side operator()(const Kernel::Point_2&p, +const Kernel::Point_2&q, +const Kernel::Point_2&t); + + +}; /* end Kernel::SideOfBoundedCircle_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Vector_2` +\sa `Kernel::ConstructScaledVector_2` + +*/ +class ConstructVector_2 { +public: + + +/*! +introduces the vector \f$ b-a\f$. +*/ +Kernel::Vector_2 operator()(const Kernel::Point_2 &a, +const Kernel::Point_2 &b); + +/*! +introduces the vector \f$ b\f$. +*/ +Kernel::Vector_2 operator()(const Origin &o, +const Kernel::Point_2 &b); + +/*! +introduces the vector \f$ -a\f$. +*/ +Kernel::Vector_2 operator()(const Kernel::Point_2 &a, +const Origin &o); + +/*! +introduces the vector \f$ s.target()-s.source()\f$. +*/ +Kernel::Vector_2 operator()(const Kernel::Segment_2 &s); + +/*! +introduces a vector having the same direction as \f$ r\f$. +*/ +Kernel::Vector_2 operator()(const Kernel::Ray_2 &r); + +/*! +introduces a vector having the same direction as \f$ l\f$. +*/ +Kernel::Vector_2 operator()(const Kernel::Line_2 &l); + +/*! +introduces a null vector . +*/ +Kernel::Vector_2 operator()(const Null_vector &NULL_VECTOR); + + +}; /* end Kernel::ConstructVector_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Point_2` + +*/ +class ConstructPoint_2 { +public: + + +/*! +introduces a variable with Cartesian coordinates +\f$ (0,0)\f$. +*/ +Kernel::Point_2 operator()(const Origin &ORIGIN); + + +}; /* end Kernel::ConstructPoint_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Plane_3` + +*/ +class ConstructBaseVector_3 { +public: + + +/*! +when `index` == 1, returns a vector `b1` that is orthogonal to the +normal `n` to plane `h`; when `index` == 2, returns a vector +`b2` that is orthogonal to `n` and `b1` and such that +for an arbitrary point `p` on the plane `h`, the orientation of +`p`, `p + b1`, `p + b2`, and `p + n` is positive. +*/ +Kernel::Vector_3 operator()(const Kernel::Plane_3& h, +int index); + + +}; /* end Kernel::ConstructBaseVector_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with three arguments) + +*/ +class LessRotateCCW_2 { +public: + + +/*! +returns true iff the three points `p`, `q` +and `r` form a left turn or if they are collinear and +the distance of \f$ q\f$ to \f$ p\f$ is +larger than the distance of \f$ r\f$ to \f$ p\f$, where \f$ p\f$ is the point +passed to the object at construction. +\pre \f$ p\f$ does not lie in the interior of the segment \f$ rq\f$, i.e. \f$ p\f$ is an extreme point with respect to \f$ \{p,q,r\}\f$. +*/ +bool operator()(const Kernel::Point_2&p, +const Kernel::Point_2&q, +const Kernel::Point_2&r); + + +}; /* end Kernel::LessRotateCCW_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Vector_3` + +*/ +class ConstructOppositeVector_3 { +public: + + +/*! +returns the vector `-v`. +*/ +Kernel::Vector_3 operator()(const Kernel::Vector_3& v); + + +}; /* end Kernel::ConstructOppositeVector_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor + +*/ +class ComputeA_2 { +public: + + +/*! +returns the coefficient `a` of the line with equation `ax +by + c = 0`. +*/ +Kernel::FT operator()(const Kernel::Line_2& l) const; + + +}; /* end Kernel::ComputeA_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Vector_2` + +*/ +class ConstructDifferenceOfVectors_2 { +public: + + +/*! +introduces the vector \f$ v1 - v2\f$. +*/ +Kernel::Vector_2 operator()(const Kernel::Vector_2 &v1, +const Kernel::Vector_2 &v2); + + +}; /* end Kernel::ConstructDifferenceOfVectors_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Circle_2` +\sa `CGAL::Iso_rectangle_2` +\sa `CGAL::Line_2` +\sa `CGAL::Ray_2` +\sa `CGAL::Segment_2` +\sa `CGAL::Triangle_2` + +*/ +class IsDegenerate_2 { +public: + + +/*! +returns true iff \f$ o\f$ is degenerate. +*/ +bool operator()(const Kernel::Circle_2&o); + +/*! +returns true iff \f$ o\f$ is degenerate. +*/ +bool operator()(const Kernel::Iso_rectangle_2&o); + +/*! +returns true iff \f$ o\f$ is degenerate. +*/ +bool operator()(const Kernel::Line_2&o); + +/*! +returns true iff \f$ o\f$ is degenerate. +*/ +bool operator()(const Kernel::Ray_2&o); + +/*! +returns true iff \f$ o\f$ is degenerate. +*/ +bool operator()(const Kernel::Segment_2&o); + +/*! +returns true iff \f$ o\f$ is degenerate. +*/ +bool operator()(const Kernel::Triangle_2&o); + + +}; /* end Kernel::IsDegenerate_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::compare_x` + +*/ +class LessX_2 { +public: + + +/*! +returns true iff the \f$ x\f$-coordinate of \f$ p\f$ is smaller than the +\f$ x\f$-coordinate of \f$ q\f$. +*/ +bool operator()(const Kernel::Point_2&p, +const Kernel::Point_2&q); + + +}; /* end Kernel::LessX_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with three arguments) + +\sa `CGAL::angle` + +*/ +class Angle_3 { +public: + + +/*! +returns `OBTUSE`, `RIGHT` or `ACUTE` depending +on the angle formed by the three points \f$ p\f$, \f$ q\f$, \f$ r\f$ (\f$ q\f$ being the vertex of +the angle). +*/ +Angle operator()(const Kernel::Point_3&p, +const Kernel::Point_3&q, +const Kernel::Point_3&r); + + +}; /* end Kernel::Angle_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Line_2` +\sa `CGAL::Ray_2` +\sa `CGAL::Segment_2` + +*/ +class HasOn_2 { +public: + + +/*! +returns true iff \f$ p\f$ lies on \f$ l\f$. +*/ +bool operator()(const Kernel::Line_2&l, +const Kernel::Point_2&p); + +/*! +returns true iff \f$ p\f$ lies on \f$ r\f$. +*/ +bool operator()(const Kernel::Ray_2&r, +const Kernel::Point_2&p); + +/*! +returns true iff \f$ p\f$ lies on \f$ s\f$. +*/ +bool operator()(const Kernel::Segment_2&s, +const Kernel::Point_2&p); + + +}; /* end Kernel::HasOn_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor + +*/ +class ComputeDx_2 { +public: + + +/*! +returns an \f$ x\f$-coordinate of the direction. +*/ +Kernel::FT operator()(const Kernel::Direction_2& v) const; + + +}; /* end Kernel::ComputeDx_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with three arguments) + +\sa `CGAL::Circle_3` + +*/ +class ConstructCircle_3 { +public: + + +/*! +introduces a variable of type `Kernel::Circle_3`. +It is initialized to the circle with center `center`, +and squared radius `sq_r` in the plane `plane`. +\pre `center` lies in `plane` and `sq_r` \f$ \geq\f$ 0. +*/ +Kernel::Circle_3 operator() +( Kernel::Point_3 const& center, +Kernel::FT const& sq_r, +Kernel::Plane_3 const& plane); + +/*! +introduces a variable of type `Kernel::Circle_3`. +It is initialized to the circle with center `center`, +and squared radius `sq_r` in the plane +containing `center` and normal to `n`. +\pre `sq_r` \f$ \geq\f$ 0. +*/ +Kernel::Circle_3 operator() +( Kernel::Point_3 const& center, +Kernel::FT const& sq_r, +Kernel::Vector_3 const& n); + +/*! +introduces a variable of type `Kernel::Point_3`. +It is initialized to the circle passing through the three points. +\pre The three points are not collinear. +*/ +Kernel::Circle_3 operator() +( Kernel::Point_3 const& p, +Kernel::Point_3 const& q, +Kernel::Point_3 const& r); + +/*! +introduces a variable of type `Kernel::Circle_3`. +It is initialized to the circle along which the two spheres intersect. +\pre The two spheres intersect along a circle. +*/ +Kernel::Circle_3 operator() +( Kernel::Sphere_3 const& sphere1, +Kernel::Sphere_3 const& sphere2); + +/*! +introduces a variable of type `Kernel::Circle_3`. +It is initialized to the circle along which the sphere and the +plane intersect. +\pre The sphere and the plane intersect along a circle. +*/ +Kernel::Circle_3 operator() +( Kernel::Sphere_3 const& sphere, +Kernel::Plane_3 const& plane); + +/*! +introduces a variable of type `Kernel::Circle_3`. +It is initialized to the circle along which the sphere and the +plane intersect. +\pre The sphere and the plane intersect along a circle. +*/ +Kernel::Circle_3 operator() +( Kernel::Plane_3 const& plane, +Kernel::Sphere_3 const& sphere); + + +}; /* end Kernel::ConstructCircle_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Object` +\sa `Kernel::Object_3` +\sa `Kernel::Intersect_3` + +*/ +class Assign_3 { +public: + + +/*! +assigns `o` to `t` if `o` +was constructed from an object of type `T`. +Returns `true`, if the assignment was possible. +*/ +template +bool operator()(T& t, const Kernel::Object_3&o); + + +}; /* end Kernel::Assign_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::compare_y` + +*/ +class LessY_3 { +public: + + +/*! +returns true iff the \f$ y\f$-coordinate of \f$ p\f$ is smaller than the +\f$ y\f$-coordinate of \f$ q\f$. +*/ +bool operator()(const Kernel::Point_3&p, +const Kernel::Point_3&q); + + +}; /* end Kernel::LessY_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Vector_3` + +*/ +class ConstructSumOfVectors_3 { +public: + + +/*! +introduces the vector \f$ v1 + v2\f$. +*/ +Kernel::Vector_3 operator()(const Kernel::Vector_3 &v1, +const Kernel::Vector_3 &v2); + + +}; /* end Kernel::ConstructSumOfVectors_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with three arguments) + +\sa `CGAL::are_ordered_along_line` + +*/ +class AreOrderedAlongLine_3 { +public: + + +/*! +returns `true`, iff the three points are collinear and +`q` lies between `p` and `r`. +Note that `true` is returned, if `q==p` or +`q==r`. +*/ +bool operator()(const Kernel::Point_3&p, +const Kernel::Point_3&q, +const Kernel::Point_3&r); + + +}; /* end Kernel::AreOrderedAlongLine_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::parallel` + +*/ +class AreParallel_2 { +public: + + +/*! +returns `true`, if `l1` and `l2` are parallel or if one +of those (or both) is degenerate. +*/ +bool operator()(const Kernel::Line_2&l1, +const Kernel::Line_2&l2); + +/*! +returns `true`, if `r1` and `r2` are parallel or if one +of those (or both) is degenerate. +*/ +bool operator()(const Kernel::Ray_2&r1, +const Kernel::Ray_2&r2); + +/*! +returns `true`, if `s1` and `s2` are parallel or if one +of those (or both) is degenerate. +*/ +bool operator()(const Kernel::Segment_2&s1, +const Kernel::Segment_2&s2); + + +}; /* end Kernel::AreParallel_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Circle_3` +\sa `CGAL::Line_3` +\sa `CGAL::Plane_3` +\sa `CGAL::Point_3` +\sa `CGAL::Ray_3` +\sa `CGAL::Segment_3` +\sa `CGAL::Sphere_3` +\sa `CGAL::Triangle_3` + +*/ +class HasOn_3 { +public: + + +/*! +returns true iff \f$ p\f$ lies on \f$ c\f$. +*/ +bool operator()(const Kernel::Circle_3&c, +const Kernel::Point_3&p); + +/*! +returns true iff \f$ p\f$ lies on \f$ l\f$. +*/ +bool operator()(const Kernel::Line_3&l, +const Kernel::Point_3&p); + +/*! +returns true iff \f$ p\f$ lies on \f$ r\f$. +*/ +bool operator()(const Kernel::Ray_3&r, +const Kernel::Point_3&p); + +/*! +returns true iff \f$ p\f$ lies on \f$ s\f$. +*/ +bool operator()(const Kernel::Segment_3&s, +const Kernel::Point_3&p); + +/*! +returns true iff \f$ p\f$ lies on \f$ pl\f$. +*/ +bool operator()(const Kernel::Plane_3&pl, +const Kernel::Point_3&p); + +/*! +returns true iff \f$ l\f$ lies on \f$ pl\f$. +*/ +bool operator()(const Kernel::Plane_3&pl, +const Kernel::Line_3&l); + +/*! +returns true iff \f$ c\f$ lies on \f$ pl\f$. +*/ +bool operator()(const Kernel::Plane_3&pl, +const Kernel::Circle_3&c); + +/*! +returns true iff \f$ c\f$ lies on \f$ s\f$. +*/ +bool operator()(const Kernel::Sphere_3&s, +const Kernel::Point_3&c); + +/*! +returns true iff \f$ c\f$ lies on \f$ s\f$. +*/ +bool operator()(const Kernel::Sphere_3&s, +const Kernel::Circle_3&c); + +/*! +returns true iff \f$ p\f$ lies on \f$ t\f$. +*/ +bool operator()(const Kernel::Triangle_3&t, +const Kernel::Point_3&p); + + +}; /* end Kernel::HasOn_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with four arguments) + +\sa `CGAL::Tetrahedron_3` + +*/ +class ConstructTetrahedron_3 { +public: +/*! +introduces a tetrahedron with vertices \f$ p_0\f$, \f$ p_1\f$, \f$ p_2\f$ and \f$ p_3\f$. +*/ +Kernel::Tetrahedron_3 operator()(const Kernel::Point_3 &p0, +const Kernel::Point_3 &p1, +const Kernel::Point_3 &p2, +const Kernel::Point_3 &p3); + + +}; /* end Kernel::ConstructTetrahedron_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\sa `CGAL::compare_y_at_x` + +\refines AdaptableFunctor + +*/ +class ComputeYAtX_2 { +public: + +/*! +returns the \f$ y\f$-coordinate of the point at \f$ l\f$ with +given \f$ x\f$-coordinate. +\pre \f$ l\f$ is not vertical. +*/ +Kernel::FT operator()(const Kernel::Line_2& l, +const Kernel::FT &x) const; + +}; /* end Kernel::ComputeYAtX_2 */ + + + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Circle_2` +\sa `CGAL::Line_2` +\sa `CGAL::Triangle_2` + +*/ +class HasOnNegativeSide_2 { +public: + + +/*! +returns true iff \f$ p\f$ lies on the negative side of \f$ c\f$. +*/ +bool operator()(const Kernel::Circle_2&c, +const Kernel::Point_2&p); + +/*! +returns true iff \f$ p\f$ lies on the negative side of \f$ l\f$ +(\f$ l\f$ is considered a half-space). +*/ +bool operator()(const Kernel::Line_2&l, +const Kernel::Point_2&p); + +/*! +returns true iff \f$ p\f$ lies on the negative side of \f$ t\f$. +*/ +bool operator()(const Kernel::Triangle_2&t, +const Kernel::Point_2&p); + + +}; /* end Kernel::HasOnNegativeSide_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +for all pairs `Type1` and `Type2`, where +the types `Type1` and `Type2` can be any of the +following: + +- `Kernel::Point_3` +- `Kernel::Line_3` +- `Kernel::Ray_3` +- `Kernel::Segment_3` +- `Kernel::Plane_3` + + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::squared_distance` + +*/ +class ComputeSquaredDistance_3 { +public: + + +/*! +returns the squared distance between two geometrical objects of type +`Type1` and `Type2` +*/ +Kernel::FT operator()(Type1 obj1, Type2 obj2); + + +}; /* end Kernel::ComputeSquaredDistance_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor + +*/ +class ComputeZ_3 { +public: + +/// \name Refines +/// @{ + +/*! +returns the \f$ z\f$-coordinate of the point. +*/ +Kernel::FT operator()(const Kernel::Point_3& p) const; + +/*! +returns the \f$ z\f$-coordinate of the vector. +*/ +Kernel::FT operator()(const Kernel::Vector_3& v) const; + +/// @} + +}; /* end Kernel::ComputeZ_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Line_2` + +*/ +class ConstructLine_2 { +public: + + +/*! +introduces a line passing through the points \f$ p\f$ and \f$ q\f$. +Line is directed from \f$ p\f$ to \f$ q\f$. +*/ +Kernel::Line_2 operator()(const Kernel::Point_2 &p, +const Kernel::Point_2 &q); + +/*! +introduces a line passing through point \f$ p\f$ with +direction \f$ d\f$. +*/ +Kernel::Line_2 operator()(const Kernel::Point_2 &p, +const Kernel::Direction_2&d); + +/*! +introduces a line passing through point \f$ p\f$ and +oriented by \f$ v\f$. +*/ +Kernel::Line_2 operator()(const Kernel::Point_2 &p, +const Kernel::Vector_2&v); + +/*! +introduces a line supporting the segment \f$ s\f$, +oriented from source to target. +*/ +Kernel::Line_2 operator()(const Kernel::Segment_2 &s); + +/*! +introduces a line supporting the ray \f$ r\f$, +with same orientation. +*/ +Kernel::Line_2 operator()(const Kernel::Ray_2 &r); + + +}; /* end Kernel::ConstructLine_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Circle_3` +\sa `CGAL::Iso_cuboid_3` +\sa `CGAL::Line_3` +\sa `CGAL::Plane_3` +\sa `CGAL::Point_3` +\sa `CGAL::Ray_3` +\sa `CGAL::Segment_3` +\sa `CGAL::Sphere_3` +\sa `CGAL::Tetrahedron_3` +\sa `CGAL::Triangle_3` + +*/ +class IsDegenerate_3 { +public: + + +/*! +returns true iff \f$ o\f$ is degenerate. +*/ +bool operator()(const Kernel::Circle_3&o); + +/*! +returns true iff \f$ o\f$ is degenerate. +*/ +bool operator()(const Kernel::Iso_cuboid_3&o); + +/*! +returns true iff \f$ o\f$ is degenerate. +*/ +bool operator()(const Kernel::Line_3&o); + +/*! +returns true iff \f$ o\f$ is degenerate. +*/ +bool operator()(const Kernel::Plane_3&o); + +/*! +returns true iff \f$ o\f$ is degenerate. +*/ +bool operator()(const Kernel::Ray_3&o); + +/*! +returns true iff \f$ o\f$ is degenerate. +*/ +bool operator()(const Kernel::Segment_3&o); + +/*! +returns true iff \f$ o\f$ is degenerate. +*/ +bool operator()(const Kernel::Sphere_3&o); + +/*! +returns true iff \f$ o\f$ is degenerate. +*/ +bool operator()(const Kernel::Tetrahedron_3&o); + +/*! +returns true iff \f$ o\f$ is degenerate. +*/ +bool operator()(const Kernel::Triangle_3&o); + + +}; /* end Kernel::IsDegenerate_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Segment_2` + +*/ +class ConstructTarget_2 { +public: + + +/*! +returns the target of +the segment `s`. +*/ +Kernel::Point_2 operator()(const +Kernel::Segment_2 &s); + + +}; /* end Kernel::ConstructTarget_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two argument) + +\sa `CGAL::Sphere_3` + +*/ +class ConstructRadicalPlane_3 { +public: + + +/*! +returns the radical plane of the spheres. +\pre The two spheres don't have the same center. +*/ +Kernel::Plane_3 operator() +(const Kernel::Sphere_3& sphere1, +const Kernel::Sphere_3& sphere2); + + +}; /* end Kernel::ConstructRadicalPlane_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with three arguments) + +\sa `CGAL::are_ordered_along_line` + +*/ +class AreOrderedAlongLine_2 { +public: + + +/*! +returns `true`, iff the three points are collinear and +`q` lies between `p` and `r`. +Note that `true` is returned, if `q==p` or +`q==r`. +*/ +bool operator()(const Kernel::Point_2&p, +const Kernel::Point_2&q, +const Kernel::Point_2&r); + + +}; /* end Kernel::AreOrderedAlongLine_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\anchor fig-compare_x_at_y_2 +\image html compare_x_at_y.gif + +\refines ::AdaptableFunctor (with three arguments) + +\sa `CGAL::compare_x_at_y` + +*/ +class CompareXAtY_2 { +public: + + +/*! +compares the \f$ x\f$-coordinates of \f$ p\f$ and the horizontal projection +of `p` on `h`. See Figure \ref fig-compare_x_at_y_2 (a). + +*/ +Comparison_result operator()(const Kernel::Point_2 &p, +const Kernel::Line_2 &h); + +/*! +compares the \f$ x\f$-coordinates of the horizontal projection +of `p` on `h1` and on `h2`. +See Figure \ref fig-compare_x_at_y_2 (b). + +*/ +Comparison_result operator()(const Kernel::Point_2 &p, +const Kernel::Line_2 &h1, +const Kernel::Line_2 &h2); + +/*! +Let \f$ p\f$ be the intersection of lines \f$ l1\f$ and \f$ l2\f$. +This function compares the \f$ x\f$-coordinates of \f$ p\f$ and +the horizontal projection of `p` on `h`. + +See Figure \ref fig-compare_x_at_y_2 (c). +*/ +Comparison_result operator()(const Kernel::Line_2 &l1, +const Kernel::Line_2 &l2, +const Kernel::Line_2 &h); + +/*! +Let \f$ p\f$ be the intersection of lines \f$ l1\f$ and \f$ l2\f$. This +function compares the \f$ x\f$-coordinates of the horizontal projection of +`p` on `h1` and on `h2`. + +See Figure \ref fig-compare_x_at_y_2 (d)). +*/ +Comparison_result operator()(const Kernel::Line_2 &l1, +const Kernel::Line_2 &l2, +const Kernel::Line_2 &h1, +const Kernel::Line_2 &h2); + + +}; /* end Kernel::CompareXAtY_2 */ + + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A type representing an iterator to the Cartesian coordinates of a point +in two dimensions. + +\refines CopyConstructible +\refines Assignable +\refines DefaultConstructible + +\sa `Kernel::ConstructCartesianConstIterator_2` + +*/ +class CartesianConstIterator_2 { +public: + +/// @} + +}; /* end Kernel::CartesianConstIterator_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::compare_yx` +\sa `Kernel::CompareXY_2` + +*/ +class CompareYX_2 { +public: + + +/*! +Compares the Cartesian coordinates of points `p` and +`q` lexicographically in \f$ yx\f$ order: first +\f$ y\f$-coordinates are compared, if they are equal, \f$ x\f$-coordinates +are compared. +*/ +Comparison_result operator()(const Kernel::Point_2&p, +const Kernel::Point_2&q); + + +}; /* end Kernel::CompareYX_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Point_3` + +*/ +class ConstructPoint_3 { +public: + + +/*! +introduces a point with Cartesian coordinates\f$ (0,0,0)\f$. +*/ +Kernel::Point_3 operator()(const Origin &ORIGIN); + + +}; /* end Kernel::ConstructPoint_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Circle_2` +\sa `CGAL::Iso_rectangle_2` +\sa `CGAL::Triangle_2` + +*/ +class HasOnBoundedSide_2 { +public: + + +/*! +returns true iff \f$ p\f$ lies on the bounded side of \f$ c\f$. +*/ +bool operator()(const Kernel::Circle_2&c, +const Kernel::Point_2&p); + +/*! +returns true iff \f$ p\f$ lies on the bounded side of \f$ i\f$. +*/ +bool operator()(const Kernel::Iso_rectangle_2&i, +const Kernel::Point_2&p); + +/*! +returns true iff \f$ p\f$ lies on the bounded side of \f$ t\f$. +*/ +bool operator()(const Kernel::Triangle_2&t, +const Kernel::Point_2&p); + + +}; /* end Kernel::HasOnBoundedSide_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Vector_2` + +*/ +class ConstructOppositeVector_2 { +public: + + +/*! +returns the vector `-v`. +*/ +Kernel::Vector_2 operator()(const Kernel::Vector_2& v); + + +}; /* end Kernel::ConstructOppositeVector_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with three arguments) + +\sa `CGAL::collinear_are_ordered_along_line` + +*/ +class CollinearAreOrderedAlongLine_3 { +public: + + +/*! +returns `true`, iff `q` lies between `p` +and `r`. \pre `p, q` and `r` are collinear. +*/ +bool operator()(const Kernel::Point_3&p, +const Kernel::Point_3&q, +const Kernel::Point_3&r); + + +}; /* end Kernel::CollinearAreOrderedAlongLine_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with three arguments) + +\sa `CGAL::has_smaller_signed_distance_to_plane` + +*/ +class LessSignedDistanceToPlane_3 { +public: + + +/*! +returns true, iff the signed distance from point `q` to plane +`p` is smaller than the signed distance from point `r` to `p`. +*/ +bool operator()(const Kernel::Plane_3& p, +const Kernel::Point_3& q, +const Kernel::Point_3& r); + +/*! +returns true, iff the signed distance from point `q` to the plane +`p` defined by `p1, p2, p3` is smaller than the signed distance +from point `r` to `p`. +\pre \f$ p, q\f$, and \f$ r\f$ are not collinear. +*/ +bool operator()(const Kernel::Point_3& p1, +const Kernel::Point_3& p2, +const Kernel::Point_3& p3, +const Kernel::Point_3& q, +const Kernel::Point_3& r); + + +}; /* end Kernel::LessSignedDistanceToPlane_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with three arguments) + +\sa `CGAL::Triangle_2` + +*/ +class ConstructTriangle_2 { +public: + + +/*! +introduces a triangle with vertices \f$ p\f$, \f$ q\f$ and \f$ r\f$. +*/ +Kernel::Triangle_2 operator()(const Kernel::Point_2 &p, +const Kernel::Point_2 &q, +const Kernel::Point_2 &r); + + +}; /* end Kernel::ConstructTriangle_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::lexicographically_xyz_smaller` + +*/ +class LessXYZ_3 { +public: + + +/*! +returns true iff the \f$ x\f$-coordinate of \f$ p\f$ is smaller than the +\f$ x\f$-coordinate of \f$ q\f$ or if the are the same and +the \f$ y\f$-coordinate of \f$ p\f$ is smaller than the \f$ y\f$-coordinate of \f$ q\f$, or, +if both \f$ x\f$- and \f$ y\f$- coordinate are identical and +the \f$ z\f$-coordinate of \f$ p\f$ is smaller than the \f$ z\f$-coordinate of \f$ q\f$. +*/ +bool operator()(const Kernel::Point_3&p, +const Kernel::Point_3&q); + + +}; /* end Kernel::LessXYZ_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\image html IsoCuboid.gif + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Iso_cuboid_3` +\sa `CGAL::Segment_3` +\sa `CGAL::Tetrahedron_3` +\sa `CGAL::Triangle_3` + +*/ +class ConstructVertex_3 { +public: + + +/*! +returns source or target of `s`: `fo``(s,0)` +returns the source of `s`, `fo``(s,1)` returns the target +of `s`. The parameter `i` is taken modulo 2. +*/ +Kernel::Point_3 operator()(const Kernel::Segment_3 +&s, int i); + +/*! +returns the i'th vertex of +`c`, as indicated in the figure below. The parameter `i` is +taken modulo 8. + +*/ +Kernel::Point_3 operator()(const +Kernel::Iso_cuboid_3 &c, int i); + +/*! +returns the i'th vertex of `t`. The parameter +`i` is taken modulo 3. +*/ +Kernel::Point_3 operator()(const Kernel::Triangle_3 +&t, int i); + +/*! +returns the i'th vertex of +`t`. The parameter `i` is taken modulo 4. +*/ +Kernel::Point_3 operator()(const +Kernel::Tetrahedron_3 &t, int i); + + +}; /* end Kernel::ConstructVertex_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with three arguments) + +\sa `CGAL::collinear` + +*/ +class Collinear_3 { +public: + + +/*! +returns `true`, if \f$ p\f$, \f$ q\f$, and \f$ r\f$ are collinear. +*/ +bool operator()(const Kernel::Point_3&p, +const Kernel::Point_3&q, +const Kernel::Point_3&r); + + +}; /* end Kernel::Collinear_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide + +for all pairs `Type1` and `Type2`, where +the types `Type1` and +`Type2` can be any of the following: + +- `Kernel::Plane_3` +- `Kernel::Line_3` +- `Kernel::Ray_3` +- `Kernel::Segment_3` +- `Kernel::Triangle_3` +- `Bbox_3` + +and also for `Type1` and `Type2` of respective types + +- `Kernel::Triangle_3` and `Kernel::Tetrahedron_3` +- `Kernel::Plane_3` and `Kernel::Sphere_3` (or the contrary) +- `Kernel::Sphere_3` and `Kernel::Sphere_3`. + + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::do_intersect` + +*/ +class DoIntersect_3 { +public: + + +/*! +determines if two geometrical objects of type +`Type1` and `Type2` intersect or not +*/ +bool operator()(Type1 obj1, Type2 obj2); + + +}; /* end Kernel::DoIntersect_3 */ + + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Circle_3` + +*/ +class ComputeAreaDividedByPi_3 { +public: + + +/*! +returns the area of \f$ c\f$, divided by \f$ \pi\f$. +*/ +Kernel::FT operator()(const Kernel::Circle_3& c); + + +}; /* end Kernel::ComputeAreaDividedByPi_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +*/ +class ConstructBbox_2 { +public: + + +/*! +returns a bounding box of `p`. +*/ +CGAL::Bbox_2 operator()(const Kernel::Point_2 +&p); + +/*! +returns a bounding box of `s`. +*/ +CGAL::Bbox_2 operator()(const Kernel::Segment_2 +&s); + +/*! +returns a bounding box of `t`. +*/ +CGAL::Bbox_2 operator()(const Kernel::Triangle_2 +&t); + +/*! +returns a bounding box of `i`. +*/ +CGAL::Bbox_2 operator()(const Kernel::Iso_rectangle_2 +&i); + +/*! +returns a bounding box of `c`. +*/ +CGAL::Bbox_2 operator()(const Kernel::Circle_2 +&c); + + +}; /* end Kernel::ConstructBbox_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `Kernel::CartesianConstIterator_3` + +*/ +class ConstructCartesianConstIterator_3 { +public: + + +/*! +returns an iterator on the 0'th Cartesian coordinate of `p`. +*/ +Kernel::Cartesian_const_iterator_3 operator()(const Kernel::Point_3 +&p); + +/*! +returns the past the end iterator of the Cartesian coordinates of `p`. +*/ +Kernel::Cartesian_const_iterator_3 operator()(const Kernel::Point_3 +&p, int); + +/*! +returns an iterator on the 0'th Cartesian coordinate of `v`. +*/ +Kernel::Cartesian_const_iterator_3 operator()(const Kernel::Vector_3 +&v); + +/*! +returns the past the end iterator of the Cartesian coordinates of `v`. +*/ +Kernel::Cartesian_const_iterator_3 operator()(const Kernel::Vector_3 +&v, int); + + +}; /* end Kernel::ConstructCartesianConstIterator_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide the following operations. For all of +them `fo``(x,y)` returns true iff \f$ x\f$ and \f$ y\f$ are equal. + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Circle_2` +\sa `CGAL::Direction_2` +\sa `CGAL::Iso_rectangle_2` +\sa `CGAL::Line_2` +\sa `CGAL::Point_2` +\sa `CGAL::Ray_2` +\sa `CGAL::Segment_2` +\sa `CGAL::Triangle_2` +\sa `CGAL::Vector_2` + +*/ +class Equal_2 { +public: + + +/*! + +*/ +bool operator()(const Kernel::Point_2& x, +const Kernel::Point_2& y); + +/*! + +*/ +bool operator()(const Kernel::Vector_2& x, +const Kernel::Vector_2& y); + +/*! + +*/ +bool operator()(const Kernel::Direction_2& x, +const Kernel::Direction_2& y); + +/*! + +*/ +bool operator()(const Kernel::Line_2& x, +const Kernel::Line_2& y); + +/*! + +*/ +bool operator()(const Kernel::Ray_2& x, +const Kernel::Ray_2& y); + +/*! + +*/ +bool operator()(const Kernel::Segment_2& x, +const Kernel::Segment_2& y); + +/*! + +*/ +bool operator()(const Kernel::Circle_2& x, +const Kernel::Circle_2& y); + +/*! + +*/ +bool operator()(const Kernel::Triangle_2& x, +const Kernel::Triangle_2& y); + +/*! + +*/ +bool operator()(const Kernel::Iso_rectangle_2& x, +const Kernel::Iso_rectangle_2& y); + + +}; /* end Kernel::Equal_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::cross_product` +\sa `CGAL::determinant` + +*/ +class ConstructCrossProductVector_3 { +public: + + +/*! +computes the cross product of \f$ v\f$ and \f$ w\f$. +*/ +Kernel::Vector_3 operator()(const Kernel::Vector_3 &v, +const Kernel::Vector_3 &w); + + +}; /* end Kernel::ConstructCrossProductVector_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor + +*/ +class ComputeC_2 { +public: + +/// \name Refines +/// @{ + +/*! +returns the coefficient `c` of the line with equation `ax +by + c = 0`. +*/ +Kernel::FT operator()(const Kernel::Line_2& l) const; + +/// @} + +}; /* end Kernel::ComputeC_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Iso_cuboid_3` +\sa `CGAL::Sphere_3` +\sa `CGAL::Tetrahedron_3` + +*/ +class HasOnBoundary_3 { +public: + + +/*! +returns true iff \f$ p\f$ lies on the boundary of \f$ s\f$. +*/ +bool operator()(const Kernel::Sphere_3&s, +const Kernel::Point_3&p); + +/*! +returns true iff \f$ p\f$ lies on the boundary of \f$ t\f$. +*/ +bool operator()(const Kernel::Tetrahedron_3&t, +const Kernel::Point_3&p); + +/*! +returns true iff \f$ p\f$ lies on the boundary of \f$ c\f$. +*/ +bool operator()(const Kernel::Iso_cuboid_3&c, +const Kernel::Point_3&p); + + +}; /* end Kernel::HasOnBoundary_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Circle_2` +\sa `CGAL::Line_2` +\sa `CGAL::Triangle_2` + +*/ +class HasOnPositiveSide_2 { +public: + + +/*! +returns true iff \f$ p\f$ lies on the positive side of \f$ c\f$. +*/ +bool operator()(const Kernel::Circle_2&c, +const Kernel::Point_2&p); + +/*! +returns true iff \f$ p\f$ lies on the positive side of \f$ l\f$ +(\f$ l\f$ is considered a half-space). +*/ +bool operator()(const Kernel::Line_2&l, +const Kernel::Point_2&p); + +/*! +returns true iff \f$ p\f$ lies on the positive side of \f$ t\f$. +*/ +bool operator()(const Kernel::Triangle_2&t, +const Kernel::Point_2&p); + + +}; /* end Kernel::HasOnPositiveSide_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Sphere_3` + +*/ +class ConstructOppositeSphere_3 { +public: + + +/*! +returns the sphere with the same center and squared radius as +\f$ s\f$, but with opposite orientation. +*/ +Kernel::Sphere_3 operator()(const Kernel::Sphere_3& s); + + +}; /* end Kernel::ConstructOppositeSphere_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::compare_xy` +\sa `Kernel::CompareYX_2` + +*/ +class CompareXY_2 { +public: + + +/*! +Compares the Cartesian coordinates of points `p` and +`q` lexicographically in \f$ xy\f$ order: first +\f$ x\f$-coordinates are compared, if they are equal, \f$ y\f$-coordinates +are compared. +*/ +Comparison_result operator()(const Kernel::Point_2&p, +const Kernel::Point_2&q); + + +}; /* end Kernel::CompareXY_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Plane_3` + +*/ +class ConstructLiftedPoint_3 { +public: + + +/*! +returns a point `q` on plane `h`, such that the projection of +this point onto the \f$ xy\f$-plane is `p`. +*/ +Kernel::Point_3 operator()(const Kernel::Plane_3& h, +const Kernel::Point_2& p); + + +}; /* end Kernel::ConstructLiftedPoint_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::compare_z` + +*/ +class LessZ_3 { +public: + + +/*! +returns true iff the \f$ z\f$-coordinate of \f$ p\f$ is smaller than the +\f$ z\f$-coordinate of \f$ q\f$. +*/ +bool operator()(const Kernel::Point_3&p, +const Kernel::Point_3&q); + + +}; /* end Kernel::LessZ_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A type representing an iterator to the Cartesian coordinates of a point +in three dimensions. + +\refines CopyConstructible +\refines Assignable +\refines DefaultConstructible + +\sa `Kernel::ConstructCartesianConstIterator_3` + +*/ +class CartesianConstIterator_3 { +public: + +/// @} + +}; /* end Kernel::CartesianConstIterator_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::y_equal` + +*/ +class EqualY_2 { +public: + + +/*! +returns true iff \f$ p\f$ and \f$ q\f$ have the same Cartesian \f$ y\f$-coordinate. +*/ +bool operator()(const Kernel::Point_2&p, +const Kernel::Point_2&q); + + +}; /* end Kernel::EqualY_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Iso_rectangle_2` +\sa `CGAL::Segment_2` + +*/ +class ConstructMinVertex_2 { +public: + + +/*! +returns the vertex of +`r` with lexicographically smallest coordinates. +*/ +Kernel::Point_2 operator()(const +Kernel::Iso_rectangle_2 &r); + +/*! +returns the vertex of +`s` with lexicographically smallest coordinates. +*/ +Kernel::Point_2 operator()(const +Kernel::Segment_2 &s); + + +}; /* end Kernel::ConstructMinVertex_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor + +*/ +class ComputeB_2 { +public: + +/// \name Refines +/// @{ + +/*! +returns the coefficient `b` of the line with equation `ax +by + c = 0`. +*/ +Kernel::FT operator()(const Kernel::Line_2& l) const; + +/// @} + +}; /* end Kernel::ComputeB_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::compare_xyz` + +*/ +class CompareXYZ_3 { +public: + + +/*! +Compares the Cartesian coordinates of points `p` and +`q` lexicographically in \f$ xyz\f$ order: first +\f$ x\f$-coordinates are compared, if they are equal, \f$ y\f$-coordinates +are compared. If they are equal, \f$ z\f$-coordinates are compared. +*/ +Comparison_result operator()(const Kernel::Point_3&p, +const Kernel::Point_3&q); + + +}; /* end Kernel::CompareXYZ_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Circle_2` + +*/ +class ConstructOppositeCircle_2 { +public: + + +/*! +returns the circle with the same center and squared radius as +\f$ c\f$, but with opposite orientation. +*/ +Kernel::Circle_2 operator()(const Kernel::Circle_2& c); + + +}; /* end Kernel::ConstructOppositeCircle_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Iso_rectangle_2` +\sa `CGAL::Triangle_2` + +*/ +class ComputeArea_2 { +public: + + +/*! +returns the signed area of the triangle defined by the points \f$ p\f$, +\f$ q\f$ and \f$ r\f$. +*/ +Kernel::FT operator()(const Kernel::Point_2& p, +const Kernel::Point_2& q, +const Kernel::Point_2& r); + +/*! +returns the area of \f$ r\f$. +*/ +Kernel::FT operator()(const Kernel::Iso_rectangle_2& r); + +/*! +returns the signed area of \f$ t\f$. +*/ +Kernel::FT operator()(const Kernel::Triangle_2& t); + + +}; /* end Kernel::ComputeArea_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with three arguments) + +\sa `Kernel::ConstructBarycenter_2` +\sa `CGAL::centroid` +\sa `CGAL::barycenter` + +*/ +class ConstructCentroid_2 { +public: + + +/*! +compute the centroid of the points \f$ p\f$, \f$ q\f$, and \f$ r\f$. +*/ +Kernel::Point_2 operator()(const Kernel::Point_2&p, +const Kernel::Point_2&q, +const Kernel::Point_2&r); + +/*! +compute the centroid of the points \f$ p\f$, \f$ q\f$, \f$ r\f$ and \f$ s\f$. +*/ +Kernel::Point_2 operator()(const Kernel::Point_2&p, +const Kernel::Point_2&q, +const Kernel::Point_2&r, +const Kernel::Point_2&s); + +/*! +compute the centroid of the triangle \f$ t\f$. +*/ +Kernel::Point_2 operator()(const Kernel::Triangle_2&t); + + +}; /* end Kernel::ConstructCentroid_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::compare_y` + +*/ +class CompareY_3 { +public: + + +/*! +Compares the Cartesian \f$ y\f$-coordinates of points `p` and +`q` +*/ +Comparison_result operator()(const Kernel::Point_3&p, +const Kernel::Point_3&q); + + +}; /* end Kernel::CompareY_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide + +for all pairs `Type1` and `Type2`, where +the types `Type1` and +`Type2` can be any of the following: + +- `Kernel::Plane_3` +- `Kernel::Line_3` +- `Kernel::Ray_3` +- `Kernel::Segment_3` +- `Kernel::Triangle_3` + + +\refines ::AdaptableFunctor (with two or three arguments) + +\sa `CGAL::intersection` + +*/ +class Intersect_3 { +public: + + +/*! +computes the intersection region of two geometrical +objects of type `Type1` and `Type2` +*/ +Kernel::Object_3 operator()(Type1 obj1, Type2 obj2); + +/*! +computes the intersection of two spheres. The result +can be either a `Kernel::Point_3`, a `Kernel::Circle_3`, a +`Kernel::Sphere_3` or empty. +*/ +Kernel::Object_3 operator()(Kernel::Sphere_3 s1, +Kernel::Sphere_3 s2); + +/*! +computes the intersection of a plane and a sphere. The result +can be either a `Kernel::Point_3`, a `Kernel::Circle_3` or empty. +*/ +Kernel::Object_3 operator()(Kernel::Plane_3 p, +Kernel::Sphere_3 s); + +/*! +computes the intersection of a plane and a sphere. The result +can be either a `Kernel::Point_3`, a `Kernel::Circle_3` or empty. +*/ +Kernel::Object_3 operator()(Kernel::Sphere_3 s, +Kernel::Plane_3 p); + +/*! +computes the intersection of three planes. The result +can be either a `Kernel::Point_3`, a `Kernel::Line_3`, a +`Kernel::Plane_3`, or empty. +*/ +Kernel::Object_3 operator()(Kernel::Plane_3 pl1, +Kernel::Plane_3 pl2, +Kernel::Plane_3 pl3); + + +}; /* end Kernel::Intersect_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Plane_3` +\sa `CGAL::Sphere_3` +\sa `CGAL::Tetrahedron_3` + +*/ +class HasOnPositiveSide_3 { +public: + + +/*! +returns true iff \f$ p\f$ lies on the positive side of \f$ h\f$ +(\f$ h\f$ is considered a half-space). +*/ +bool operator()(const Kernel::Plane_3&h, +const Kernel::Point_3&p); + +/*! +returns true iff \f$ p\f$ lies on the positive side of \f$ s\f$. +*/ +bool operator()(const Kernel::Sphere_3&s, +const Kernel::Point_3&p); + +/*! +returns true iff \f$ p\f$ lies on the positive side of \f$ t\f$. +*/ +bool operator()(const Kernel::Tetrahedron_3&t, +const Kernel::Point_3&p); + + +}; /* end Kernel::HasOnPositiveSide_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with three arguments) + +\sa `CGAL::equidistant_line` + +*/ +class ConstructEquidistantLine_3 { +public: + + +/*! +constructs the line which is at the same distance from the three points +`p`, `q` and `r`. +\pre `p`, `q` and `r` are not collinear. +*/ +Kernel::Line_3 operator()(const Kernel::Point_3&p, +const Kernel::Point_3&q, +const Kernel::Point_3&r ); + + +}; /* end Kernel::ConstructEquidistantLine_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor + +*/ +class ComputeY_2 { +public: + +/// \name Refines +/// @{ + +/*! +returns the \f$ y\f$-coordinate of the point. +*/ +Kernel::FT operator()(const Kernel::Point_2& p) const; + +/*! +returns the \f$ y\f$-coordinate of the vector. +*/ +Kernel::FT operator()(const Kernel::Vector_2& v) const; + +/// @} + +}; /* end Kernel::ComputeY_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Iso_cuboid_3` + +*/ +class ConstructIsoCuboid_3 { +public: + + +/*! +introduces an iso-oriented cuboid with diagonal +opposite vertices \f$ p\f$ and \f$ q\f$ such that \f$ p\f$ is the +lexicographically smallest point in the cuboid. +*/ +Kernel::Iso_cuboid_3 operator()(const Kernel::Point_3 &p, +const Kernel::Point_3 &q); + +/*! +introduces an iso-oriented cuboid with diagonal +opposite vertices \f$ p\f$ and \f$ q\f$. The `int` argument value is +only used to distinguish the two overloaded functions. +\pre \f$ p.x()<=q.x()\f$, \f$ p.y()<=q.y()\f$ and \f$ p.z()<=q.z()\f$. +*/ +Kernel::Iso_cuboid_3 operator()(const Kernel::Point_3 &p, +const Kernel::Point_3 &q, +int); + +/*! +introduces an iso-oriented cuboid `fo` whose +minimal \f$ x\f$ coordinate is the one of `left`, the +maximal \f$ x\f$ coordinate is the one of `right`, the +minimal \f$ y\f$ coordinate is the one of `bottom`, the +maximal \f$ y\f$ coordinate is the one of `top`, the +minimal \f$ z\f$ coordinate is the one of `far`, the +maximal \f$ z\f$ coordinate is the one of `close`. +*/ +Kernel::Iso_cuboid_3 +operator()(const Kernel::Point_3 &left, +const Kernel::Point_3 &right, +const Kernel::Point_3 &bottom, +const Kernel::Point_3 &top, +const Kernel::Point_3 &far, +const Kernel::Point_3 &close); + + +}; /* end Kernel::ConstructIsoCuboid_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::y_equal` + +*/ +class EqualY_3 { +public: + + +/*! +returns true iff \f$ p\f$ and \f$ q\f$ have the same Cartesian \f$ y\f$-coordinate. +*/ +bool operator()(const Kernel::Point_3&p, +const Kernel::Point_3&q); + + +}; /* end Kernel::EqualY_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\anchor fig-compare12 +\image html compare1.gif + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::compare_x` + +*/ +class CompareX_2 { +public: + + +/*! +compares the Cartesian \f$ x\f$-coordinates of points `p` and `q` +*/ +Comparison_result operator()(const Kernel::Point_2&p, +const Kernel::Point_2&q); + +/*! +compares the \f$ x\f$-coordinates of \f$ p\f$ and the intersection +of lines \f$ l1\f$ and \f$ l2\f$. +See Figure \ref fig-compare12 (a). +*/ +Comparison_result operator()(const Kernel::Point_2 &p, +const Kernel::Line_2 &l1, +const Kernel::Line_2 &l2); + +/*! +compares the \f$ x\f$-coordinates of the intersection of line \f$ l\f$ +with line \f$ h1\f$ and with line \f$ h2\f$. + +See Figure \ref fig-compare12 (b). +*/ +Comparison_result operator()(const Kernel::Line_2 &l, +const Kernel::Line_2 &h1, +const Kernel::Line_2 &h2); + +/*! +compares the \f$ x\f$-coordinates of the intersection of lines \f$ l1\f$ +and \f$ l2\f$ and the intersection of lines \f$ h1\f$ and \f$ h2\f$. + +See Figure \ref fig-compare12 (c). +*/ +Comparison_result operator()(const Kernel::Line_2 &l1, +const Kernel::Line_2 &l2, +const Kernel::Line_2 &h1, +const Kernel::Line_2 &h2); + + +}; /* end Kernel::CompareX_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Segment_2` + +*/ +class ConstructOppositeSegment_2 { +public: + + +/*! +returns the segment representing the same set of points as \f$ s\f$, +but with opposite orientation. +*/ +Kernel::Segment_2 operator()(const Kernel::Segment_2& s); + + +}; /* end Kernel::ConstructOppositeSegment_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Vector_3` + +*/ +class ConstructScaledVector_3 { +public: + + +/*! +produces the vector `v` scaled by a factor `scale`. +*/ +Kernel::Vector_3 operator()(const Kernel::Vector_3 &v, +const Kernel::RT& scale); + +/*! +produces the vector `v` scaled by a factor `scale`. +*/ +Kernel::Vector_3 operator()(const Kernel::Vector_3 &v, +const Kernel::FT& scale); + + +}; /* end Kernel::ConstructScaledVector_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Iso_cuboid_3` +\sa `CGAL::Sphere_3` +\sa `CGAL::Tetrahedron_3` + +*/ +class BoundedSide_3 { +public: + + +/*! +returns either `ON_UNBOUNDED_SIDE`, +`ON_BOUNDED_SIDE`, or the constant +`ON_BOUNDARY`, depending on where point `p` is with +respect to sphere `s`. +*/ +Bounded_side operator()(const Kernel::Sphere_3& s, +const Kernel::Point_3&p); + +/*! +returns either `ON_UNBOUNDED_SIDE`, +`ON_BOUNDED_SIDE`, or the constant +`ON_BOUNDARY`, depending on where point `p` is with +respect to tetrahedron `t`. +*/ +Bounded_side operator()(const Kernel::Tetrahedron_3& t, +const Kernel::Point_3&p); + +/*! +returns either `ON_UNBOUNDED_SIDE`, +`ON_BOUNDED_SIDE`, or the constant +`ON_BOUNDARY`, depending on where point `p` is with +respect to iso-cuboid `c`. +*/ +Bounded_side operator()(const Kernel::Iso_cuboid_3& c, +const Kernel::Point_3&p); + + +}; /* end Kernel::BoundedSide_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\sa `CGAL::Vector_2` + +\refines ::AdaptableFunctor (with two arguments) + +*/ +class ComputeScalarProduct_2 { +public: + +/*! +returns the scalar (inner) product of the two vectors `v` and `w`. +*/ +Kernel::FT operator()(const Kernel::Vector_2& v, +const Kernel::Vector_2& w); + +}; /* end Kernel::ComputeScalarProduct_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Circle_3` + +*/ +class ComputeSquaredLengthDividedByPiSquare_3 { +public: + + +/*! +returns the squared length of \f$ c\f$, divided by \f$ \pi^2\f$. +*/ +Kernel::FT operator()(const Kernel::Circle_3& c); + + +}; /* end Kernel::ComputeSquaredLengthDividedByPiSquare_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Direction_2` + +*/ +class ConstructPerpendicularDirection_2 { +public: + + +/*! +introduces a direction orthogonal to `d`. If `o` is +`CLOCKWISE`, `d` is rotated clockwise; if `o` is +`COUNTERCLOCKWISE`, `d` is rotated counterclockwise. +\pre `o` is not `COLLINEAR`. +*/ +Kernel::Direction_2 operator()(const Kernel::Direction_2& d, +Orientation o); + + +}; /* end Kernel::ConstructPerpendicularDirection_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::parallel` + +*/ +class AreParallel_3 { +public: + + +/*! +returns `true`, if `l1` and `l2` are parallel or if one +of those (or both) is degenerate. +*/ +bool operator()(const Kernel::Line_3&l1, +const Kernel::Line_3&l2); + +/*! +returns `true`, if `h1` and `h2` are parallel or if one +of those (or both) is degenerate. +*/ +bool operator()(const Kernel::Plane_3&h1, +const Kernel::Plane_3&h2); + +/*! +returns `true`, if `r1` and `r2` are parallel or if one +of those (or both) is degenerate. +*/ +bool operator()(const Kernel::Ray_3&r1, +const Kernel::Ray_3&r2); + +/*! +returns `true`, if `s1` and `s2` are parallel or if one +of those (or both) is degenerate. +*/ +bool operator()(const Kernel::Segment_3&s1, +const Kernel::Segment_3&s2); + + +}; /* end Kernel::AreParallel_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Triangle_2` + +*/ +class ConstructOppositeTriangle_2 { +public: + + +/*! +returns the triangle with opposite orientation to \f$ t\f$ +(this flips the positive and the negative side, but +not bounded and unbounded side). +*/ +Kernel::Triangle_2 operator()(const Kernel::Triangle_2& t); + + +}; /* end Kernel::ConstructOppositeTriangle_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::lexicographically_xy_smaller` + +*/ +class LessXY_2 { +public: + + +/*! +returns true iff the \f$ x\f$-coordinate of \f$ p\f$ is smaller than the +\f$ x\f$-coordinate of \f$ q\f$ or if the are the same and +the \f$ y\f$-coordinate of \f$ p\f$ is smaller than the \f$ y\f$-coordinate of \f$ q\f$. +*/ +bool operator()(const Kernel::Point_2&p, +const Kernel::Point_2&q); + + +}; /* end Kernel::LessXY_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Iso_cuboid_3` +\sa `CGAL::Sphere_3` +\sa `CGAL::Tetrahedron_3` + +*/ +class HasOnUnboundedSide_3 { +public: + + +/*! +returns true iff \f$ p\f$ lies on the unbounded side of \f$ s\f$. +*/ +bool operator()(const Kernel::Sphere_3&s, +const Kernel::Point_3&p); + +/*! +returns true iff \f$ p\f$ lies on the unbounded side of \f$ t\f$. +*/ +bool operator()(const Kernel::Tetrahedron_3&t, +const Kernel::Point_3&p); + +/*! +returns true iff \f$ p\f$ lies on the unbounded side of \f$ c\f$. +*/ +bool operator()(const Kernel::Iso_cuboid_3&c, +const Kernel::Point_3&p); + + +}; /* end Kernel::HasOnUnboundedSide_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with three arguments) + +\sa `CGAL::orientation` + +*/ +class Orientation_2 { +public: + + +/*! +returns `LEFT_TURN`, if \f$ r\f$ lies to the left of the oriented +line \f$ l\f$ defined by \f$ p\f$ and \f$ q\f$, returns `RIGHT_TURN` if \f$ r\f$ +lies to the right of \f$ l\f$, and returns `COLLINEAR` if \f$ r\f$ lies +on \f$ l\f$. +*/ +Orientation operator()(const Kernel::Point_2&p, +const Kernel::Point_2&q, +const Kernel::Point_2&r); + +/*! +returns `LEFT_TURN` if \f$ u\f$ and \f$ v\f$ form a left turn, +returns `RIGHT_TURN` if \f$ u\f$ and \f$ v\f$ form a right turn, +and returns `COLLINEAR` if \f$ u\f$ and \f$ v\f$ are collinear. +*/ +Orientation operator()(const Kernel::Vector_2&u, +const Kernel::Vector_2&v); + + +}; /* end Kernel::Orientation_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Plane_3` +\sa `Kernel::ConstructCrossProductVector_3` + +*/ +class ConstructOrthogonalVector_3 { +public: + + +/*! +returns a vector that is orthogonal to the plane `p` and directed +to the positive side of `p`. +*/ +Kernel::Vector_3 operator()(const Kernel::Plane_3& p); + +/*! +returns a vector that is orthogonal to the plane defined by +`Kernel::ConstructPlane_3()(p, q, r)` and directed +to the positive side of this plane. +*/ +Kernel::Vector_3 operator()(const Kernel::Point_3& p, +const Kernel::Point_3& q, const Kernel::Point_3& r); + + +}; /* end Kernel::ConstructOrthogonalVector_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with three arguments) + +\sa `CGAL::collinear_are_ordered_along_line` + +*/ +class CollinearAreOrderedAlongLine_2 { +public: + + +/*! +returns `true`, iff `q` lies between `p` +and `r`. \pre `p, q` and `r` are collinear. +*/ +bool operator()(const Kernel::Point_2&p, +const Kernel::Point_2&q, +const Kernel::Point_2&r); + + +}; /* end Kernel::CollinearAreOrderedAlongLine_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Circle_2` +\sa `CGAL::Iso_rectangle_2` +\sa `CGAL::Triangle_2` + +*/ +class HasOnBoundary_2 { +public: + + +/*! +returns true iff \f$ p\f$ lies on the boundary of \f$ c\f$. +*/ +bool operator()(const Kernel::Circle_2&c, +const Kernel::Point_2&p); + +/*! +returns true iff \f$ p\f$ lies on the boundary of \f$ i\f$. +*/ +bool operator()(const Kernel::Iso_rectangle_2&i, +const Kernel::Point_2&p); + +/*! +returns true iff \f$ p\f$ lies on the boundary of \f$ t\f$. +*/ +bool operator()(const Kernel::Triangle_2&t, +const Kernel::Point_2&p); + + +}; /* end Kernel::HasOnBoundary_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with three arguments) + +\sa `CGAL::has_smaller_distance_to_point` + +*/ +class LessDistanceToPoint_2 { +public: + + +/*! +returns true iff the distance of \f$ q\f$ to \f$ p\f$ is +smaller than the distance of \f$ r\f$ to \f$ p\f$. +*/ +bool operator()(const Kernel::Point_2&p, +const Kernel::Point_2&q, +const Kernel::Point_2&r); + + +}; /* end Kernel::LessDistanceToPoint_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A type representing tetrahedra in three dimensions. + +\refines CopyConstructible +\refines Assignable +\refines DefaultConstructible + +\sa `CGAL::Tetrahedron_3` +\sa `Kernel::BoundedSide_3` +\sa `Kernel::ComputeVolume_3` +\sa `Kernel::ConstructCentroid_3` +\sa `Kernel::ConstructTetrahedron_3` +\sa `Kernel::ConstructVertex_3` +\sa `Kernel::Equal_2` +\sa `Kernel::HasOnBoundary_3` +\sa `Kernel::HasOnBoundedSide_3` +\sa `Kernel::HasOnNegativeSide_3` +\sa `Kernel::HasOnPositiveSide_3` +\sa `Kernel::HasOnUnboundedSide_3` +\sa `Kernel::IsDegenerate_3` +\sa `Kernel::OrientedSide_3` + +*/ +class Tetrahedron_3 { +public: + +/// @} + +}; /* end Kernel::Tetrahedron_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Vector_3` +\sa `Kernel::ConstructScaledVector_3` + +*/ +class ConstructVector_3 { +public: + + +/*! +introduces the vector \f$ b-a\f$. +*/ +Kernel::Vector_3 operator()(const Kernel::Point_3 &a, +const Kernel::Point_3 &b); + +/*! +introduces the vector \f$ b\f$. +*/ +Kernel::Vector_3 operator()(const Origin &o, +const Kernel::Point_3 &b); + +/*! +introduces the vector \f$ -a\f$. +*/ +Kernel::Vector_3 operator()(const Kernel::Point_3 &a, +const Origin &o); + +/*! +introduces the vector \f$ s.target()-s.source()\f$. +*/ +Kernel::Vector_3 operator()(const Kernel::Segment_3 &s); + +/*! +introduces a vector having the same direction as \f$ r\f$. +*/ +Kernel::Vector_3 operator()(const Kernel::Ray_3 &r); + +/*! +introduces a vector having the same direction as \f$ l\f$. +*/ +Kernel::Vector_3 operator()(const Kernel::Line_3 &l); + +/*! +introduces a null vector . +*/ +Kernel::Vector_3 operator()(const Null_vector &NULL_VECTOR); + + +}; /* end Kernel::ConstructVector_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Circle_2` +\sa `CGAL::squared_radius` + +*/ +class ComputeSquaredRadius_2 { +public: + + +/*! +returns the squared radius of \f$ c\f$. +*/ +Kernel::FT operator()(const Kernel::Circle_2& c); + +/*! +returns the squared radius of the circle passing through \f$ p\f$, \f$ q\f$ +and \f$ r\f$. \pre `p, q` and `r` are not collinear. +*/ +Kernel::FT operator()(const Kernel::Point_2& p, +const Kernel::Point_2& q, +const Kernel::Point_2& r); + +/*! +returns the squared radius of the smallest circle passing through \f$ p\f$, +and \f$ q\f$, i.e. one fourth of the squared distance between \f$ p\f$ and \f$ q\f$. +*/ +Kernel::FT operator()(const Kernel::Point_2& p, +const Kernel::Point_2& q); + +/*! +returns the squared radius of the smallest circle passing through \f$ p\f$, i.e. \f$ 0\f$. +*/ +Kernel::FT operator()(const Kernel::Point_2& p); + + +}; /* end Kernel::ComputeSquaredRadius_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Vector_3` + +*/ +class ComputeScalarProduct_3 { +public: + + +/*! +returns the scalar (inner) product of the two vectors `v` and `w`. +*/ +Kernel::FT operator()(const Kernel::Vector_3& v, +const Kernel::Vector_3& w); + + +}; /* end Kernel::ComputeScalarProduct_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor + +*/ +class ComputeX_2 { +public: + + +/*! +returns the \f$ x\f$-coordinate of the point. +*/ +Kernel::FT operator()(const Kernel::Point_2& p) const; + +/*! +returns the \f$ x\f$-coordinate of the vector. +*/ +Kernel::FT operator()(const Kernel::Vector_2& v) const; + + +}; /* end Kernel::ComputeX_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Ray_3` + +*/ +class ConstructOppositeRay_3 { +public: + + +/*! +returns the ray with the same source as \f$ r\f$, but in opposite direction. +*/ +Kernel::Ray_3 operator()(const Kernel::Ray_3& r); + + +}; /* end Kernel::ConstructOppositeRay_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Iso_cuboid_3` +\sa `CGAL::Segment_3` + +*/ +class ConstructMaxVertex_3 { +public: + + +/*! +returns the vertex of +`c` with lexicographically largest coordinates. +*/ +Kernel::Point_3 operator()(const +Kernel::Iso_cuboid_3 &c); + +/*! +returns the vertex of +`s` with lexicographically largest coordinates. +*/ +Kernel::Point_3 operator()(const +Kernel::Segment_3 &s); + + +}; /* end Kernel::ConstructMaxVertex_3 */ + + + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor + +*/ +class ComputeYmin_2 { +public: + +/// \name Refines +/// @{ + +/*! +returns the smallest \f$ y\f$-coordinate of the iso-rectangle. +*/ +Kernel::FT operator()(const Kernel::Iso_rectangle_2& r) const; + +/// @} + +}; /* end Kernel::ComputeYmin_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Ray_2` + +*/ +class ConstructSecondPoint_2 { +public: + + +/*! +returns a point different from the source on +the ray `r`. +*/ +Kernel::Point_2 operator()(const +Kernel::Ray_2 &r); + + +}; /* end Kernel::ConstructSecondPoint_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Direction_3` + +*/ +class ConstructOppositeDirection_3 { +public: + + +/*! +returns the direction opposite to \f$ d\f$. +*/ +Kernel::Direction_3 operator()(const +Kernel::Direction_3& d); + + +}; /* end Kernel::ConstructOppositeDirection_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\sa `CGAL::has_smaller_signed_distance_to_line` + +*/ +class LessSignedDistanceToLine_2 { +public: + +/// \name Refines +/// `AdaptableFunctor` (with four arguments) +/// @{ + +/*! + +returns `true` if the signed distance from \f$ p\f$ and the oriented line \f$ l\f$ +is smaller than the signed distance of \f$ q\f$ and \f$ l\f$. + +*/ +bool operator()(const Kernel::Line_2& l, +const Kernel::Point_2& p, +const Kernel::Point_2& q); + +/*! + +returns `true` if the signed distance from \f$ r\f$ and the oriented line \f$ l\f$ +defined by \f$ p\f$ and \f$ q\f$ is smaller than the signed distance of \f$ s\f$ and \f$ l\f$. +\pre \f$ p != q\f$. + +*/ +bool operator()(const Kernel::Point_2& p, +const Kernel::Point_2& q, +const Kernel::Point_2&r, +const Kernel::Point_2&s); + +/// @} + +}; /* end Kernel::LessSignedDistanceToLine_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with three arguments) + +\sa `CGAL::compare_squared_radius` + +*/ +class CompareSquaredRadius_3 { +public: + + +/*! +compares the squared radius of the sphere of radius 0 centered +at `p` to `sr`. +This returns the opposite sign of `sr`. +*/ +Comparison_result operator()(const Kernel::Point_3& p, +const Kernel::FT& sr); + +/*! +compares the squared radius of the sphere defined by the +points `p` and `q` to `sr`. +*/ +Comparison_result operator()(const Kernel::Point_3&p, +const Kernel::Point_3&q, +const Kernel::FT& sr); + +/*! +compares the squared radius of the sphere defined by the +points `p`, `q`, and `r` to `sr`. +*/ +Comparison_result operator()(const Kernel::Point_3&p, +const Kernel::Point_3&q, +const Kernel::Point_3&r, +const Kernel::FT& sr); + +/*! +compares the squared radius of the sphere defined by the +points `p`, `q`, , `r`, and `s` to `sr`. +*/ +Comparison_result operator()(const Kernel::Point_3&p, +const Kernel::Point_3&q, +const Kernel::Point_3&r, +const Kernel::Point_3&s, +const Kernel::FT& sr); + + +}; /* end Kernel::CompareSquaredRadius_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with five arguments) + +\sa `CGAL::side_of_oriented_sphere` + +*/ +class SideOfOrientedSphere_3 { +public: + + +/*! +returns the relative position of point `t` +to the oriented sphere defined by \f$ p\f$, \f$ q\f$, \f$ r\f$ and \f$ s\f$. +The order of the points \f$ p\f$, \f$ q\f$, \f$ r\f$, and \f$ s\f$ is important, +since it determines the orientation of the implicitly +constructed sphere. If the points \f$ p\f$, \f$ q\f$, \f$ r\f$ and \f$ s\f$ +are positive oriented, positive side is the bounded interior +of the sphere. + +In case of degeneracies, `ON_ORIENTED_BOUNDARY` is returned +if all points are coplanar. Otherwise, there is a cyclic permutation of the five points +that puts four non coplanar points first, it is used to answer the predicate: +e.g. `side_of_oriented_sphere(q, r, s, t, p)` is returned if \f$ q\f$, \f$ r\f$, \f$ s\f$, +and \f$ t\f$ are non coplanar. +*/ +Oriented_side operator()(const Kernel::Point_3&p, +const Kernel::Point_3&q, +const Kernel::Point_3&r, +const Kernel::Point_3&s, +const Kernel::Point_3&t); + + +}; /* end Kernel::SideOfOrientedSphere_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::midpoint` + +*/ +class ConstructMidpoint_3 { +public: + + +/*! +computes the midpoint of the segment \f$ pq\f$. +*/ +Kernel::Point_3 operator()(const Kernel::Point_3& p, +const Kernel::Point_3& q ); + + +}; /* end Kernel::ConstructMidpoint_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::compare_x` + +*/ +class CompareX_3 { +public: + + +/*! +Compares the Cartesian \f$ x\f$-coordinates of points `p` and +`q` +*/ +Comparison_result operator()(const Kernel::Point_3&p, +const Kernel::Point_3&q); + + +}; /* end Kernel::CompareX_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Circle_2` + +*/ +class ConstructRadicalLine_2 { +public: + + +/*! +returns the radical line of the circles. +\pre The two circles don't have the same center. +*/ +Kernel::Line_2 operator() +(const Kernel::Circle_2& c1, +const Kernel::Circle_2& c2); + + +}; /* end Kernel::ConstructRadicalLine_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +*/ +class CompareDihedralAngle_3 { +public: + +/// \name Refines +/// @{ + +/*! +compares the dihedral angles \f$ \theta_1\f$ and \f$ \theta_2\f$, where +\f$ \theta_1\f$ is the dihedral angle, in \f$ [0, \pi]\f$, of the tetrahedron +\f$ (a_1, b_1, c_1, d_1)\f$ at the edge \f$ (a_1, b_1)\f$, and \f$ \theta_2\f$ is +the angle in \f$ [0, \pi]\f$ such that \f$ cos(\theta_2) = cosine\f$. +The result is the same as `operator()(b1-a1, c1-a1, d1-a1, cosine)`. +\pre \f$ a_1\f$, \f$ b_1\f$, \f$ c_1\f$ are not collinear, and \f$ a_1\f$, \f$ b_1\f$, \f$ d_1\f$ are not collinear. +*/ +Comparison_result operator()(const K::Point_3& a1, +const K::Point_3& b1, +const K::Point_3& c1, +const K::Point_3& d1, +const K::FT& cosine); + +/*! +compares the dihedral angles \f$ \theta_1\f$ and \f$ \theta_2\f$, where +\f$ \theta_i\f$ is the dihedral angle in the tetrahedron \f$ (a_i, b_i, +c_i, d_i)\f$ at the edge \f$ (a_i, b_i)\f$. These two angles are computed +in \f$ [0, \pi]\f$. +The result is the same as `operator()(b1-a1, c1-a1, d1-a1, b2-a2, c2-a2, d2-a2)`. +\pre For \f$ i \in\{1,2\}\f$, \f$ a_i\f$, \f$ b_i\f$, \f$ c_i\f$ are not collinear, and \f$ a_i\f$, \f$ b_i\f$, \f$ d_i\f$ are not collinear. +*/ +Comparison_result operator()(const K::Point_3& a1, +const K::Point_3& b1, +const K::Point_3& c1, +const K::Point_3& d1, +const K::Point_3& a2, +const K::Point_3& b2, +const K::Point_3& c2, +const K::Point_3& d2); + +/*! +compares the dihedral angles \f$ \theta_1\f$ and \f$ \theta_2\f$, where +\f$ \theta_1\f$ is the dihedral angle, in \f$ [0, \pi]\f$, between the +vectorial planes defined by \f$ (u_1, v_1)\f$ and \f$ (u_1, w_1)\f$, and +\f$ \theta_2\f$ is the angle in \f$ [0, \pi]\f$ such that \f$ cos(\theta_2) = +cosine\f$. +\pre \f$ u_1\f$ and \f$ v_1\f$ are not collinear, and \f$ u_1\f$ and \f$ w_1\f$ are not collinear. +*/ +Comparison_result operator()(const K::Vector_3& u1, +const K::Vector_3& v1, +const K::Vector_3& w1, +const K::FT& cosine); + +/*! +compares the dihedral angles \f$ \theta_1\f$ and \f$ \theta_2\f$, where +\f$ \theta_i\f$ is the dihedral angle between the vectorial planes +defined by \f$ (u_i, v_i)\f$ and \f$ (u_i, w_i)\f$. These two angles are +computed in \f$ [0, \pi]\f$. +\pre For \f$ i \in\{1,2\}\f$, \f$ u_i\f$ and \f$ v_i\f$ are not collinear, and \f$ u_i\f$ and \f$ w_i\f$ are not collinear. +*/ +Comparison_result operator()(const K::Vector_3& u1, +const K::Vector_3& v1, +const K::Vector_3& w1, +const K::Vector_3& u2, +const K::Vector_3& v2, +const K::Vector_3& w2); + +/// @} + +}; /* end Kernel::CompareDihedralAngle_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::compare_z` + +*/ +class CompareZ_3 { +public: + + +/*! +Compares the Cartesian \f$ z\f$-coordinates of points `p` and +`q` +*/ +Comparison_result operator()(const Kernel::Point_3&p, +const Kernel::Point_3&q); + + +}; /* end Kernel::CompareZ_3 */ + + + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with three arguments) + +\sa `CGAL::collinear_are_strictly_ordered_along_line` + +*/ +class CollinearAreStrictlyOrderedAlongLine_2 { +public: + + +/*! +returns `true`, iff `q` lies strictly between +`p` and `r`. \pre `p, q` and `r` are collinear. +*/ +bool operator()(const Kernel::Point_2&p, +const Kernel::Point_2&q, +const Kernel::Point_2&r); + + +}; /* end Kernel::CollinearAreStrictlyOrderedAlongLine_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Object` +\sa `Kernel::Assign_2` +\sa `Kernel::Assign_3` +\sa `Kernel::Object_2` +\sa `Kernel::Object_3` + +*/ +class ConstructObject_3 { +public: + + +/*! +constructs an object that contains `t` and returns it. +*/ +template +Object_3 operator()(const T& t); + + +}; /* end Kernel::ConstructObject_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Direction_2` + +*/ +class ConstructDirection_2 { +public: + + +/*! +introduces the direction of vector \f$ v\f$. +*/ +Kernel::Direction_2 operator()(const Kernel::Vector_2 &v); + +/*! +introduces the direction of line \f$ l\f$. +*/ +Kernel::Direction_2 operator()(const Kernel::Line_2 &l); + +/*! +introduces the direction of ray \f$ r\f$. +*/ +Kernel::Direction_2 operator()(const Kernel::Ray_2 &r); + +/*! +introduces the direction of segment \f$ s\f$. +*/ +Kernel::Direction_2 operator()(const Kernel::Segment_2 &s); + + +}; /* end Kernel::ConstructDirection_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Vector_3` + +*/ +class ConstructDifferenceOfVectors_3 { +public: + + +/*! +introduces the vector \f$ v1 - v2\f$. +*/ +Kernel::Vector_3 operator()(const Kernel::Vector_3 &v1, +const Kernel::Vector_3 &v2); + + +}; /* end Kernel::ConstructDifferenceOfVectors_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with three arguments) + +\sa `CGAL::normal` +\sa `CGAL::unit_normal` + +*/ +class ConstructUnitNormal_3 { +public: + + +/*! +computes the unit normal of the vectors`q-p` and `r-p`. +This requires that `Kernel::FT` supports the `sqrt` operation. +*/ +Kernel::Vector_3 operator()(const Kernel::Point_3& p, +const Kernel::Point_3& q, +const Kernel::Point_3& r ); + + +}; /* end Kernel::ConstructUnitNormal_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Sphere_3` +\sa `CGAL::Circle_3` + +*/ +class ConstructCenter_3 { +public: + + +/*! +compute the center of the sphere \f$ s\f$. +*/ +Kernel::Point_3 operator()(const Kernel::Sphere_3 & s); + +/*! +compute the center of the circle \f$ c\f$. +*/ +Kernel::Point_3 operator()(const Kernel::Circle_3 & c); + + +}; /* end Kernel::ConstructCenter_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +for all pairs `Type1` and `Type2`, where +the types `Type1` and `Type2` can be any of the +following: + +- `Kernel::Point_3` +- `Kernel::Line_3` +- `Kernel::Ray_3` +- `Kernel::Segment_3` +- `Kernel::Plane_3` + + +\refines ::AdaptableFunctor (with three arguments) + +\sa `Kernel::CompareDistance_3` +\sa `CGAL::compare_distance_to_point` +\sa `CGAL::compare_squared_distance` + +*/ +class CompareSquaredDistance_3 { +public: + + +/*! +compares the squared distance between the two geometrical objects +`obj1` and `obj2` to the value `d2` +*/ +Comparison_result operator()(const Type1& obj1, +const Type2& obj2, +const Kernel::FT&d2); + + +}; /* end Kernel::CompareSquaredDistance_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with three arguments) + +\sa `CGAL::Vector_3` +\sa `CGAL::determinant` + +*/ +class ComputeDeterminant_3 { +public: + + +/*! +returns the determinant of the three vectors \f$ u\f$, \f$ v\f$ and \f$ w\f$. +*/ +Kernel::FT operator()(const Kernel::Vector_3& u, +const Kernel::Vector_3& v, +const Kernel::Vector_3& w); + + +}; /* end Kernel::ComputeDeterminant_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\anchor fig-compare14 +\image html compare1.gif + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::compare_y` + +*/ +class CompareY_2 { +public: + + +/*! +Compares the Cartesian \f$ y\f$-coordinates of points `p` and +`q` +*/ +Comparison_result operator()(const Kernel::Point_2&p, +const Kernel::Point_2&q); + +/*! +compares the \f$ y\f$-coordinates of \f$ p\f$ and the +intersection of lines \f$ l1\f$ and \f$ l2\f$. + +See Figure \ref fig-compare14 (a). +*/ +Comparison_result operator()(const Kernel::Point_2 &p, +const Kernel::Line_2 &l1, +const Kernel::Line_2 &l2); + +/*! +compares the \f$ y\f$-coordinates of the intersection of line \f$ l\f$ +with line \f$ h1\f$ and with line \f$ h2\f$. + +See Figure \ref fig-compare14 (b). +*/ +Comparison_result operator()(const Kernel::Line_2 &l, +const Kernel::Line_2 &h1, +const Kernel::Line_2 &h2); + +/*! +compares the \f$ y\f$-coordinates of the intersection of lines \f$ l1\f$ +and \f$ l2\f$ and the intersection of lines \f$ h1\f$ and \f$ h2\f$. + +See Figure \ref fig-compare14 (c). +*/ +Comparison_result operator()(const Kernel::Line_2 &l1, +const Kernel::Line_2 &l2, +const Kernel::Line_2 &h1, +const Kernel::Line_2 &h2); + + +}; /* end Kernel::CompareY_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Segment_2` +\sa `CGAL::Ray_2` + +*/ +class ConstructSource_2 { +public: + + +/*! +returns the source of +the segment `s`. +*/ +Kernel::Point_2 operator()(const +Kernel::Segment_2 &s); + +/*! +returns the source of +the ray `r`. +*/ +Kernel::Point_2 operator()(const +Kernel::Ray_2 &r); + + +}; /* end Kernel::ConstructSource_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with four arguments) + +\sa `CGAL::orientation` + +*/ +class Orientation_3 { +public: + + +/*! +returns `POSITIVE`, if \f$ s\f$ lies on the positive side of the oriented +plane \f$ h\f$ defined by \f$ p\f$, \f$ q\f$, and \f$ r\f$, returns `NEGATIVE` if \f$ s\f$ +lies on the negative side of \f$ h\f$, and returns `COPLANAR` if \f$ s\f$ lies +on \f$ h\f$. +*/ +Orientation operator()(const Kernel::Point_3&p, +const Kernel::Point_3&q, +const Kernel::Point_3&r, +const Kernel::Point_3&s); + +/*! +returns `POSITIVE` if \f$ u\f$, \f$ v\f$ and \f$ w\f$ are positively oriented, +returns `NEGATIVE` if \f$ u\f$, \f$ v\f$ and \f$ w\f$ are negatively oriented, +and returns `COPLANAR` if \f$ u\f$, \f$ v\f$ and \f$ w\f$ are coplanar. +*/ +Orientation operator()(const Kernel::Vector_3&u, +const Kernel::Vector_3&v, +const Kernel::Vector_3&w); + +/*! +returns the orientation of the sphere `s`. +*/ +Orientation operator()(const Kernel::Sphere_3&s); + + +}; /* end Kernel::Orientation_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +for all tuples of types `Type1`, `Type2`, `Type3` +and `Type4` in the following set of types: + +- `Kernel::Point_2` +- `Kernel::Line_2` +- `Kernel::Ray_2` +- `Kernel::Segment_2` +- `Kernel::Triangle_2` + + +\sa `Kernel::CompareSquaredDistance_2` +\sa `CGAL::compare_distance_to_point` +\sa `CGAL::compare_squared_distance` + +\refines ::AdaptableFunctor (with three arguments) + +*/ +class CompareDistance_2 { +public: + +/*! +compares the squared distance between `obj1` and `obj2` to +the squared distance between `obj1` and `obj3` +*/ +Comparison_result operator()(const Type1& obj1, +const Type2& obj2, +const Type3& obj3); + +/*! +compares the squared distance between `obj1` and `obj2` to +the squared distance between `obj3` and `obj4` +*/ +Comparison_result operator()(const Type1& obj1, +const Type2& obj2, +const Type3& obj3, +const Type4& obj4); + +}; /* end Kernel::CompareDistance_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Line_3` + +*/ +class ConstructLine_3 { +public: + + +/*! +introduces a line passing through the points \f$ p\f$ and \f$ q\f$. +Line is directed from \f$ p\f$ to \f$ q\f$. +*/ +Kernel::Line_3 operator()(const Kernel::Point_3 &p, +const Kernel::Point_3 &q); + +/*! +introduces a line passing through point \f$ p\f$ and +oriented by \f$ v\f$. +*/ +Kernel::Line_3 operator()(const Kernel::Point_3 &p, +const Kernel::Vector_3&v); + +/*! +introduces a line passing through point \f$ p\f$ with +direction \f$ d\f$. +*/ +Kernel::Line_3 operator()(const Kernel::Point_3 &p, +const Kernel::Direction_3&d); + +/*! +returns the line supporting the segment \f$ s\f$, +oriented from source to target. +*/ +Kernel::Line_3 operator()(const Kernel::Segment_3 &s); + +/*! +returns the line supporting the ray \f$ r\f$, with the +same orientation. +*/ +Kernel::Line_3 operator()(const Kernel::Ray_3 &r); + + +}; /* end Kernel::ConstructLine_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Direction_2` + +*/ +class ConstructOppositeDirection_2 { +public: + + +/*! +returns the direction opposite to \f$ d\f$. +*/ +Kernel::Direction_2 operator()(const +Kernel::Direction_2& d); + + +}; /* end Kernel::ConstructOppositeDirection_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with three arguments) + +\sa `CGAL::collinear_are_strictly_ordered_along_line` + +*/ +class CollinearAreStrictlyOrderedAlongLine_3 { +public: + + +/*! +returns `true`, iff `q` lies strictly between +`p` and `r`. \pre `p, q` and `r` are collinear. +*/ +bool operator()(const Kernel::Point_3&p, +const Kernel::Point_3&q, +const Kernel::Point_3&r); + + +}; /* end Kernel::CollinearAreStrictlyOrderedAlongLine_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Line_2` +\sa `CGAL::Ray_2` +\sa `CGAL::Segment_2` + +*/ +class ConstructPointOn_2 { +public: + + +/*! +returns an arbitrary point on `l`. It holds +`point(i) == point(j)`, iff `i==j`. +Furthermore, is directed from `point(i)` +to `point(j)`, for all `i` \f$ <\f$ `j`. +*/ +Kernel::Point_2 operator()(const Kernel::Line_2& l, +int i); + +/*! +returns a point on `r`. `point(0)` is the source, +`point(i)`, with \f$ i>0\f$, is different from the +source. \pre \f$ i \geq0\f$. +*/ +Kernel::Point_2 operator()(const Kernel::Ray_2& r, +int i); + +/*! +returns source or target of `s`: `point(0)` returns +the source of `s`, `point(1)` returns the target of `s`. +The parameter `i` is taken modulo 2, which gives +easy access to the other end point. +*/ +Kernel::Point_2 operator()(const Kernel::Segment_2& s, +int i); + + +}; /* end Kernel::ConstructPointOn_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Iso_cuboid_3` +\sa `CGAL::Sphere_3` +\sa `CGAL::Tetrahedron_3` + +*/ +class HasOnBoundedSide_3 { +public: + + +/*! +returns true iff \f$ p\f$ lies on the bounded side of \f$ s\f$. +*/ +bool operator()(const Kernel::Sphere_3&s, +const Kernel::Point_3&p); + +/*! +returns true iff \f$ p\f$ lies on the bounded side of \f$ t\f$. +*/ +bool operator()(const Kernel::Tetrahedron_3&t, +const Kernel::Point_3&p); + +/*! +returns true iff \f$ p\f$ lies on the bounded side of \f$ c\f$. +*/ +bool operator()(const Kernel::Iso_cuboid_3&c, +const Kernel::Point_3&p); + + +}; /* end Kernel::HasOnBoundedSide_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor + +*/ +class ComputeXmax_2 { +public: + +/// \name Refines +/// @{ + +/*! +returns the largest \f$ x\f$-coordinate of the iso-rectangle. +*/ +Kernel::FT operator()(const Kernel::Iso_rectangle_2& r) const; + +/// @} + +}; /* end Kernel::ComputeXmax_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide + +for all pairs `Type1` and `Type2`, where +the types `Type1` and `Type2` can be any of the +following: + +- `Kernel::Line_2` +- `Kernel::Ray_2` +- `Kernel::Segment_2` +- `Kernel::Triangle_2` +- `Kernel::Iso_rectangle_2` + + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::intersection` + +*/ +class Intersect_2 { +public: + + +/*! +computes the intersection region of two geometrical objects of type +`Type1` and `Type2` +*/ +Kernel::Object_2 operator()(Type1 obj1, Type2 obj2); + + +}; /* end Kernel::Intersect_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Object` +\sa `Kernel::Object_2` +\sa `Kernel::Intersect_2` + +*/ +class Assign_2 { +public: + + +/*! +assigns `o` to `t` if `o` +was constructed from an object of type `T`. +Returns `true`, if the assignment was possible. +*/ +template +bool operator()(T& t, const Kernel::Object_2&o); + + +}; /* end Kernel::Assign_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Plane_3` +\sa `CGAL::Sphere_3` +\sa `CGAL::Tetrahedron_3` + +*/ +class OrientedSide_3 { +public: + + +/*! +returns `ON_ORIENTED_BOUNDARY`, +`ON_NEGATIVE_SIDE`, or the constant `ON_POSITIVE_SIDE`, +depending on the position of \f$ p\f$ relative to the oriented plane \f$ h\f$. +*/ +Oriented_side operator()(const Kernel::Plane_3&h, +const Kernel::Point_3&p); + +/*! +returns `ON_ORIENTED_BOUNDARY`, +`ON_NEGATIVE_SIDE`, or the constant `ON_POSITIVE_SIDE`, +depending on the position of \f$ p\f$ relative to the oriented tetrahedron \f$ t\f$. +*/ +Oriented_side operator()(const Kernel::Tetrahedron_3&t, +const Kernel::Point_3&p); + +/*! +returns `ON_ORIENTED_BOUNDARY`, +`ON_NEGATIVE_SIDE`, or the `ON_POSITIVE_SIDE`, +depending on the position of `p` relative to the oriented sphere `s`. +*/ +Oriented_side operator()(const Kernel::Sphere_3& s, +const Kernel::Point_3& p); + + +}; /* end Kernel::OrientedSide_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +*/ +class CompareAngleWithXAxis_2 { +public: + + +/*! +compares +the angles between the positive \f$ x\f$-axis and the directions in +counterclockwise order. +*/ +Comparison_result operator()(const +Kernel::Direction_2& d, const Kernel::Direction_2& e); + + +}; /* end Kernel::CompareAngleWithXAxis_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with three arguments) + +\sa `CGAL::Circle_2` + +*/ +class ConstructCircle_2 { +public: + + +/*! + +introduces a variable of type `Kernel::Circle_2`. +It is initialized to the circle with center `center`, +squared radius `squared_radius` and orientation +`orientation`. +\pre `orientation` \f$ \neq\f$ `COLLINEAR`, and further, `squared_radius` \f$ \geq\f$ 0. +*/ +Kernel::Circle_2 operator()( Kernel::Point_2 const& center, +Kernel::FT const& squared_radius, +Orientation const& orientation += COUNTERCLOCKWISE); + +/*! + +introduces a variable of type `Kernel::Circle_2`. +It is initialized to the unique circle which passes through +the points `p`, `q` and `r`. The orientation of +the circle is the orientation of the point triple `p`, +`q`, `r`. +\pre `p`, `q`, and `r` are not collinear. +*/ +Kernel::Circle_2 operator()( Kernel::Point_2 const& p, +Kernel::Point_2 const& q, +Kernel::Point_2 const& r); + +/*! + +introduces a variable of type `Kernel::Circle_2`. +It is initialized to the circle with diameter \f$ \overline{pq}\f$ +and orientation `orientation`. +\pre `orientation` \f$ \neq\f$ `COLLINEAR`. +*/ +Kernel::Circle_2 operator()( Kernel::Point_2 const& p, +Kernel::Point_2 const& q, +Orientation const& orientation += COUNTERCLOCKWISE); + +/*! + +introduces a variable of type `Kernel::Circle_2`. +It is initialized to the circle with center `center`, squared +radius zero and orientation `orientation`. +\pre `orientation` \f$ \neq\f$ `COLLINEAR`. +\post .`is_degenerate()` = `true`. +*/ +Kernel::Circle_2 operator()( Kernel::Point_2 const& center, +Orientation const& orientation += COUNTERCLOCKWISE); + + +}; /* end Kernel::ConstructCircle_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Line_3` +\sa `CGAL::Plane_3` + +*/ +class ConstructProjectedPoint_3 { +public: + + +/*! +returns the orthogonal projection of `p` onto `l`. +*/ +Kernel::Point_3 operator()(const Kernel::Line_3& l, +const Kernel::Point_3& p); + +/*! +returns the orthogonal projection of `p` onto `h`. +*/ +Kernel::Point_3 operator()(const Kernel::Plane_3& h, +const Kernel::Point_3& p); + + +}; /* end Kernel::ConstructProjectedPoint_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor + +*/ +class ComputeX_3 { +public: + +/// \name Refines +/// @{ + +/*! +returns the \f$ x\f$-coordinate of the point. +*/ +Kernel::FT operator()(const Kernel::Point_3& p) const; + +/*! +returns the \f$ x\f$-coordinate of the vector. +*/ +Kernel::FT operator()(const Kernel::Vector_3& v) const; + +/// @} + +}; /* end Kernel::ComputeX_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with three arguments) + +\sa `CGAL::are_strictly_ordered_along_line` + +*/ +class AreStrictlyOrderedAlongLine_2 { +public: + + +/*! +returns `true`, iff the three points are collinear and +`q` lies strictly between `p` and `r`. +Note that `false` is returned, if `q==p` or +`q==r`. +*/ +bool operator()(const Kernel::Point_2&p, +const Kernel::Point_2&q, +const Kernel::Point_2&r); + + +}; /* end Kernel::AreStrictlyOrderedAlongLine_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::bisector` + +*/ +class ConstructBisector_3 { +public: + + +/*! +constructs the bisector plane of \f$ p\f$ and \f$ q\f$. +The bisector is oriented in such a way that `p` lies on its +positive side. \pre `p` and `q` are not equal. +*/ +Kernel::Plane_3 operator()(const Kernel::Point_3&p, +const Kernel::Point_3&q ); + +/*! +constructs the bisector of the two planes \f$ h1\f$ and \f$ h2\f$. +In the general case, the bisector has a normal vector which has the same +direction as the sum of the normalized normal vectors of the two planes, and +passes through the intersection of `h1` and `h2`. +If `h1` and `h2` are parallel, then the bisector is defined as the +plane which has the same oriented normal vector as `l1`, and which is at +the same distance from `h1` and `h2`. +This function requires that `Kernel::RT` supports the `sqrt()` +operation. +*/ +Kernel::Plane_3 operator()(const Kernel::Plane_3&h1, +const Kernel::Plane_3&h2); + + +}; /* end Kernel::ConstructBisector_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\sa `CGAL::angle` + +*/ +class Angle_2 { +public: + + +/*! +returns `OBTUSE`, `RIGHT` or `ACUTE` depending +on the angle formed by the two vectors \f$ u\f$ and \f$ v\f$. +*/ +Angle operator()(const Kernel::Vector_2&u, +const Kernel::Vector_2&v); + +/*! +returns `OBTUSE`, `RIGHT` or `ACUTE` depending +on the angle formed by the three points \f$ p\f$, \f$ q\f$, \f$ r\f$ (\f$ q\f$ being the vertex of +the angle). The returned value is the same as `operator()(p - q, r - q)`. +*/ +Angle operator()(const Kernel::Point_2&p, +const Kernel::Point_2&q, +const Kernel::Point_2&r); + +/*! +returns `OBTUSE`, `RIGHT` or `ACUTE` depending +on the angle formed by the two vectors \f$ pq\f$, \f$ rs\f$. The returned value is +the same as `operator()(q - p, s - r)`. +*/ +Angle operator()(const Kernel::Point_2&p, +const Kernel::Point_2&q, +const Kernel::Point_2&r, +const Kernel::Point_2&s); + + +}; /* end Kernel::Angle_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Vector_2` + +*/ +class ConstructSumOfVectors_2 { +public: + + +/*! +introduces the vector \f$ v1 + v2\f$. +*/ +Kernel::Vector_2 operator()(const Kernel::Vector_2 &v1, +const Kernel::Vector_2 &v2); + + +}; /* end Kernel::ConstructSumOfVectors_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Line_2` +\sa `CGAL::Ray_2` +\sa `CGAL::Segment_2` + +*/ +class IsVertical_2 { +public: + + +/*! +returns true iff \f$ o\f$ is vertical. +*/ +bool operator()(const Kernel::Line_2&o); + +/*! +returns true iff \f$ o\f$ is vertical. +*/ +bool operator()(const Kernel::Ray_2&o); + +/*! +returns true iff \f$ o\f$ is vertical. +*/ +bool operator()(const Kernel::Segment_2&o); + + +}; /* end Kernel::IsVertical_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Iso_cuboid_3` +\sa `CGAL::Tetrahedron_3` + +*/ +class ComputeVolume_3 { +public: + + +/*! +returns the volume of \f$ c\f$. +*/ +Kernel::FT operator()(const Kernel::Iso_cuboid_3& c); + +/*! +returns the signed volume of \f$ t\f$. +*/ +Kernel::FT operator()(const Kernel::Tetrahedron_3& t); + +/*! +returns the signed volume of the tetrahedron defined by the four +points `p0`, `p1`, `p2`, `p3`. +*/ +Kernel::FT operator()(const Kernel::Point_3& p0, +const Kernel::Point_3& p1, +const Kernel::Point_3& p2, +const Kernel::Point_3& p3); + + +}; /* end Kernel::ComputeVolume_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Point_2` + +*/ +class ConstructTranslatedPoint_2 { +public: + + +/*! +returns the point obtained by translating `p` by the vector +`v`. +*/ +Kernel::Point_2 operator()(const Kernel::Point_2& p, +const Kernel::Vector_2& v); + +/*! +returns the point obtained by translating a point at the origin by the vector +`v`. +*/ +Kernel::Point_2 operator()(const Origin& o, +const Kernel::Vector_2& v); + + +}; /* end Kernel::ConstructTranslatedPoint_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Vector_2` + +*/ +class ConstructPerpendicularVector_2 { +public: + + +/*! +returns `v` rotated clockwise by 90 degrees, if \f$ o\f$ is +`CLOCKWISE`, and rotated counterclockwise otherwise. +\pre \f$ o\f$ is not `COLLINEAR`. + +*/ +Kernel::Vector_2 operator()(const Kernel::Vector_2& v, +Orientation o); + + +}; /* end Kernel::ConstructPerpendicularVector_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with four arguments) + +\sa `CGAL::coplanar_orientation` + +*/ +class CoplanarOrientation_3 { +public: + + +/*! +Let \f$ P\f$ be the plane defined by the points `p`, `q`, +and `r`. Note that the order defines the orientation of +\f$ P\f$. The function computes the orientation of points `p`, +`q`, and `s` in \f$ P\f$: Iff `p`, `q`, `s` are +collinear, `COLLINEAR` is returned. Iff \f$ P\f$ and the plane +defined by `p`, `q`, and `s` have the same orientation, +`POSITIVE` is returned; otherwise `NEGATIVE` is returned. +\pre `p`, `q`, `r`, and `s` are coplanar and `p`, `q`, and `r` are not collinear. +*/ +Orientation operator()(const Kernel::Point_3&p, +const Kernel::Point_3&q, +const Kernel::Point_3&r, +const Kernel::Point_3&s); + +/*! +If `p,q,r` are collinear, then `COLLINEAR` is returned. +If not, then `p,q,r` define a plane \f$ P\f$. The return value in this case is +either `POSITIVE` or `NEGATIVE`, but we don't specify it explicitly. +However, we guarantee that all calls to this predicate over 3 points in \f$ P\f$ +will return a coherent orientation if considered a 2D orientation in \f$ P\f$. +*/ +Orientation operator()(const Kernel::Point_3&p, +const Kernel::Point_3&q, +const Kernel::Point_3&r); + + +}; /* end Kernel::CoplanarOrientation_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with three arguments) + +\sa `Kernel::ConstructCentroid_3` +\sa `CGAL::centroid` +\sa `CGAL::barycenter` + +*/ +class ConstructBarycenter_3 { +public: + + +/*! +compute the barycenter of the points \f$ p1\f$ and \f$ p2\f$ with corresponding +weights \f$ w1\f$ and \f$ 1-w1\f$. +*/ +Kernel::Point_3 +operator()( const Kernel::Point_3& p1, const Kernel::FT&w1, +const Kernel::Point_3& p2); + +/*! +compute the barycenter of the points \f$ p1\f$ and \f$ p2\f$ with corresponding +weights \f$ w1\f$ and \f$ w2\f$. \pre w1+w2 != 0. +*/ +Kernel::Point_3 +operator()( const Kernel::Point_3& p1, const Kernel::FT&w1, +const Kernel::Point_3& p2, const Kernel::FT&w2); + +/*! +compute the barycenter of the points \f$ p1\f$, \f$ p2\f$ and \f$ p3\f$ with corresponding +weights \f$ w1\f$, \f$ w2\f$ and \f$ 1-w1-w2\f$. +*/ +Kernel::Point_3 +operator()( const Kernel::Point_3& p1, const Kernel::FT&w1, +const Kernel::Point_3& p2, const Kernel::FT&w2, +const Kernel::Point_3& p3); + +/*! +compute the barycenter of the points \f$ p1\f$, \f$ p2\f$ and \f$ p3\f$ with corresponding +weights \f$ w1\f$, \f$ w2\f$ and \f$ w3\f$. \pre w1+w2+w3 != 0. +*/ +Kernel::Point_3 +operator()( const Kernel::Point_3& p1, const Kernel::FT&w1, +const Kernel::Point_3& p2, const Kernel::FT&w2, +const Kernel::Point_3& p3, const Kernel::FT&w3); + +/*! +compute the barycenter of the points \f$ p1\f$, \f$ p2\f$, \f$ p3\f$ and \f$ p4\f$ with corresponding +weights \f$ w1\f$, \f$ w2\f$, \f$ w3\f$ and \f$ 1-w1-w2-w3\f$. +*/ +Kernel::Point_3 +operator()( const Kernel::Point_3& p1, const Kernel::FT&w1, +const Kernel::Point_3& p2, const Kernel::FT&w2, +const Kernel::Point_3& p3, const Kernel::FT&w3, +const Kernel::Point_3& p4); + +/*! +compute the barycenter of the points \f$ p1\f$, \f$ p2\f$, \f$ p3\f$ and \f$ p4\f$ with corresponding +weights \f$ w1\f$, \f$ w2\f$, \f$ w3\f$ and \f$ w4\f$. \pre w1+w2+w3+w4 != 0. +*/ +Kernel::Point_3 +operator()( const Kernel::Point_3& p1, const Kernel::FT&w1, +const Kernel::Point_3& p2, const Kernel::FT&w2, +const Kernel::Point_3& p3, const Kernel::FT&w3, +const Kernel::Point_3& p4, const Kernel::FT&w4); + + +}; /* end Kernel::ConstructBarycenter_3 */ + + + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Sphere_3` +\sa `CGAL::Circle_3` +\sa `CGAL::squared_radius` + +*/ +class ComputeSquaredRadius_3 { +public: + + +/*! +returns the squared radius of \f$ s\f$. +*/ +Kernel::FT operator()(const Kernel::Sphere_3& s); + +/*! +returns the squared radius of \f$ c\f$. +*/ +Kernel::FT operator()(const Kernel::Circle_3& c); + +/*! +returns the squared radius of the sphere passing through \f$ p\f$, \f$ q\f$, \f$ r\f$ +and \f$ s\f$. \pre `p, q, r` and `s` are not coplanar. +*/ +Kernel::FT operator()(const Kernel::Point_3& p, +const Kernel::Point_3& q, +const Kernel::Point_3& r, +const Kernel::Point_3& s); + +/*! +returns the squared radius of the sphere passing through \f$ p\f$, \f$ q\f$ and +\f$ r\f$, and whose center is in the plane defined by these three points. +*/ +Kernel::FT operator()(const Kernel::Point_3& p, +const Kernel::Point_3& q, +const Kernel::Point_3& r); + +/*! +returns the squared radius of the smallest circle passing through \f$ p\f$, +and \f$ q\f$, i.e. one fourth of the squared distance between \f$ p\f$ and \f$ q\f$. +*/ +Kernel::FT operator()(const Kernel::Point_3& p, +const Kernel::Point_3& q); + +/*! +returns the squared radius of the smallest circle passing through \f$ p\f$, i.e. \f$ 0\f$. +*/ +Kernel::FT operator()(const Kernel::Point_3& p); + + +}; /* end Kernel::ComputeSquaredRadius_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with five arguments) + +\sa `CGAL::side_of_bounded_sphere` + +*/ +class SideOfBoundedSphere_3 { +public: + + +/*! +returns the relative position of point `t` +to the sphere defined by \f$ p\f$, \f$ q\f$, \f$ r\f$, and \f$ s\f$. The order +of the points \f$ p\f$, \f$ q\f$, \f$ r\f$, and \f$ s\f$ does not matter. +\pre `p, q, r` and `s` are not coplanar. +*/ +Bounded_side operator()(const Kernel::Point_3&p, +const Kernel::Point_3&q, +const Kernel::Point_3&r, +const Kernel::Point_3&s, +const Kernel::Point_3&t); + +/*! +returns the position of the point `t` relative to the sphere +passing through \f$ p\f$, \f$ q\f$, and \f$ r\f$ and whose center is in the plane defined +by these three points. +*/ +Bounded_side operator()(const Kernel::Point_3&p, +const Kernel::Point_3&q, +const Kernel::Point_3&r, +const Kernel::Point_3&t); + +/*! +returns the position of the point `t` relative to the sphere +that has \f$ pq\f$ as its diameter. +*/ +Bounded_side operator()(const Kernel::Point_3&p, +const Kernel::Point_3&q, +const Kernel::Point_3&t); + + +}; /* end Kernel::SideOfBoundedSphere_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Point_3` + +*/ +class ConstructTranslatedPoint_3 { +public: + + +/*! +returns the point obtained by translating `p` by the vector +`v`. +*/ +Kernel::Point_3 operator()(const Kernel::Point_3& p, +const Kernel::Vector_3& v); + +/*! +returns the point obtained by translating a point at the origin by the vector +`v`. +*/ +Kernel::Point_3 operator()(const Origin& o, +const Kernel::Vector_3& v); + + +}; /* end Kernel::ConstructTranslatedPoint_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Segment_3` + +*/ +class ConstructOppositeSegment_3 { +public: + + +/*! +returns the segment representing the same set of points as \f$ s\f$, +but with opposite orientation. +*/ +Kernel::Segment_3 operator()(const Kernel::Segment_3& s); + + +}; /* end Kernel::ConstructOppositeSegment_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor + +*/ +class ComputeXmin_2 { +public: + +/// \name Refines +/// @{ + +/*! +returns the smallest \f$ x\f$-coordinate of the iso-rectangle. +*/ +Kernel::FT operator()(const Kernel::Iso_rectangle_2& r) const; + +/// @} + +}; /* end Kernel::ComputeXmin_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with three arguments) + +\sa `CGAL::Direction_2` + +*/ +class CounterclockwiseInBetween_2 { +public: + + +/*! +returns `true` iff `d` is not equal to `d1`, and +while rotating counterclockwise starting at `d1`, +`d` is reached strictly before `d2` is reached. +Note that true is returned if `d1` == `d2`, unless +also `d` == `d1`. +*/ +bool operator()(const Kernel::Direction_2&d, +const Kernel::Direction_2&d1, +const Kernel::Direction_2&d2); + + +}; /* end Kernel::CounterclockwiseInBetween_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `CGAL::Line_2` + +*/ +class ConstructOppositeLine_2 { +public: + + +/*! +returns the line representing the same set of points as \f$ l\f$, +but with opposite direction. +*/ +Kernel::Line_2 operator()(const Kernel::Line_2& l); + + +}; /* end Kernel::ConstructOppositeLine_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with four arguments) + +\sa `CGAL::side_of_oriented_circle` + +*/ +class SideOfOrientedCircle_2 { +public: + + +/*! +returns the relative position of point `t` +to the oriented circle defined by \f$ p\f$, \f$ q\f$ and \f$ r\f$. +The order of the points \f$ p\f$, \f$ q\f$ and \f$ r\f$ is important, +since it determines the orientation of the implicitly +constructed circle. + +If \f$ p\f$, \f$ q\f$ and \f$ r\f$ are collinear, the circle degenerates in a line. +`ON_ORIENTED_BOUNDARY` is returned if \f$ t\f$ is also collinear or if two +points are identical, +otherwise, `side_of_oriented_circle(r, q, t, p)` is returned. + +*/ +Oriented_side operator()(const Kernel::Point_2&p, +const Kernel::Point_2&q, +const Kernel::Point_2&r, +const Kernel::Point_2&t); + + +}; /* end Kernel::SideOfOrientedCircle_2 */ + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with three arguments) + +\sa `CGAL::Triangle_3` + +*/ +class ConstructTriangle_3 { +public: + + +/*! +introduces a triangle with vertices \f$ p\f$, \f$ q\f$ and \f$ r\f$. +*/ +Kernel::Triangle_3 operator()(const Kernel::Point_3 &p, +const Kernel::Point_3 &q, +const Kernel::Point_3 &r); + + +}; /* end Kernel::ConstructTriangle_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Plane_3` + +*/ +class ConstructPerpendicularLine_3 { +public: + + +/*! +returns the line that is perpendicular to `pl` and that +passes through point `p`. The line is oriented from +the negative to the positive side of `pl` +*/ +Kernel::Line_3 operator()(const Kernel::Plane_3& pl, +const Kernel::Point_3& p); + + +}; /* end Kernel::ConstructPerpendicularLine_3 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Circle_2` +\sa `CGAL::Iso_rectangle_2` +\sa `CGAL::Triangle_2` + +*/ +class HasOnUnboundedSide_2 { +public: + + +/*! +returns true iff \f$ p\f$ lies on the unbounded side of \f$ c\f$. +*/ +bool operator()(const Kernel::Circle_2&c, +const Kernel::Point_2&p); + +/*! +returns true iff \f$ p\f$ lies on the unbounded side of \f$ i\f$. +*/ +bool operator()(const Kernel::Iso_rectangle_2&i, +const Kernel::Point_2&p); + +/*! +returns true iff \f$ p\f$ lies on the unbounded side of \f$ t\f$. +*/ +bool operator()(const Kernel::Triangle_2&t, +const Kernel::Point_2&p); + + +}; /* end Kernel::HasOnUnboundedSide_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Iso_rectangle_2` + +*/ +class ConstructIsoRectangle_2 { +public: + + +/*! +introduces an iso-oriented rectangle with diagonal +opposite vertices \f$ p\f$ and \f$ q\f$ such that \f$ p\f$ is the +lexicographically smallest point in the rectangle. +*/ +Kernel::Iso_rectangle_2 operator()(const Kernel::Point_2 &p, +const Kernel::Point_2 &q); + +/*! +introduces an iso-oriented rectangle with diagonal +opposite vertices \f$ p\f$ and \f$ q\f$. The `int` argument value is +only used to distinguish the two overloaded functions. +\pre \f$ p.x()<=q.x()\f$ and \f$ p.y()<=q.y()\f$. +*/ +Kernel::Iso_rectangle_2 operator()(const Kernel::Point_2 &p, +const Kernel::Point_2 &q, +int); + +/*! +introduces an iso-oriented rectangle `fo` whose +minimal \f$ x\f$ coordinate is the one of `left`, the +maximal \f$ x\f$ coordinate is the one of `right`, the +minimal \f$ y\f$ coordinate is the one of `bottom`, the +maximal \f$ y\f$ coordinate is the one of `top`. +*/ +Kernel::Iso_rectangle_2 +operator()(const Kernel::Point_2 &left, +const Kernel::Point_2 &right, +const Kernel::Point_2 &bottom, +const Kernel::Point_2 &top); + + +}; /* end Kernel::ConstructIsoRectangle_2 */ + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with one argument) + +\sa `Kernel::CartesianConstIterator_2` + +*/ +class ConstructCartesianConstIterator_2 { +public: + + +/*! +returns an iterator on the 0'th Cartesian coordinate of `p`. +*/ +Kernel::Cartesian_const_iterator_2 operator()(const Kernel::Point_2 +&p); + +/*! +returns the past the end iterator of the Cartesian coordinates of `p`. +*/ +Kernel::Cartesian_const_iterator_2 operator()(const Kernel::Point_2 +&p, int); + +/*! +returns an iterator on the 0'th Cartesian coordinate of `v`. +*/ +Kernel::Cartesian_const_iterator_2 operator()(const Kernel::Vector_2 +&v); + +/*! +returns the past the end iterator of the Cartesian coordinates of `v`. +*/ +Kernel::Cartesian_const_iterator_2 operator()(const Kernel::Vector_2 +&v, int); + + +}; /* end Kernel::ConstructCartesianConstIterator_2 */ + + + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with three arguments) + +\sa `CGAL::normal` +\sa `CGAL::unit_normal` + +*/ +class ConstructNormal_3 { +public: + + +/*! +computes the normal of the vectors`q-p` and `r-p`. +*/ +Kernel::Vector_3 operator()(const Kernel::Point_3& p, +const Kernel::Point_3& q, +const Kernel::Point_3& r ); + + +}; /* end Kernel::ConstructNormal_3 */ + +/*! +\ingroup PkgKernel23ConceptsFunctionObjects +\cgalconcept + +A model for this must provide: + +\refines ::AdaptableFunctor (with two arguments) + +\sa `CGAL::Plane_3` + +*/ +class ConstructPerpendicularPlane_3 { +public: + +/*! +returns the plane perpendicular to \f$ l\f$ passing through \f$ p\f$, +such that the normal direction of the plane coincides with the direction of +the line. +*/ +Kernel::Plane_3 operator()(const Kernel::Line_3& l, +const Kernel::Point_3& p); + +}; /* end Kernel::ConstructPerpendicularPlane_3 */ + +/// @} + + +/// \name Types +/// The following types describe the return types of predicates. They +/// typically map to `bool` and \cgal kernel enum types, except when +/// an interval arithmetic number type is used such as within the +/// filtering kernels, in which case it is `Uncertain` or +/// similar. +/// @{ + +/*! +a model of `FieldNumberType` +*/ +typedef Hidden_type FT; + +/*! +a model of `RingNumberType` +*/ +typedef Hidden_type RT; + +/*! +`bool` or `Uncertain` +*/ +typedef Hidden_type Boolean; + +/*! +`CGAL::Sign` or `Uncertain` +*/ +typedef Hidden_type Sign; + +/*! +`CGAL::Comparison_result` or `Uncertain` +*/ +typedef Hidden_type Comparison_result; + +/*! +`CGAL::Orientation` or `Uncertain` +*/ +typedef Hidden_type Orientation; + +/*! +`CGAL::Oriented_side` or `Uncertain` +*/ +typedef Hidden_type Oriented_side; + +/*! +`CGAL::Bounded_side` or `Uncertain` +*/ +typedef Hidden_type Bounded_side; + +/*! +`CGAL::Angle` or `Uncertain` +*/ +typedef Hidden_type Angle; + +/// @} + +/// \name Constants +/// @{ + +/*! +A Boolean value indicating whether the predicates are filtered (as in +`Filtered_kernel`). This helps propagating such decisions to traits +classes which are built on top of a kernel, so that they can decide to +filter their own predicates or not. +*/ +static const bool Has_filtered_predicates; + +/// @} + +/// \name Coordinate Access +/// @{ + +/*! +a model of `Kernel::CartesianConstIterator_2` +*/ +typedef Hidden_type Cartesian_const_iterator_2; + +/// @} + +/// \name Geometric Objects +/// @{ + +/*! +a model of `Kernel::Point_2` +*/ +typedef Hidden_type Point_2; + +/*! +a model of `Kernel::Vector_2` +*/ +typedef Hidden_type Vector_2; + +/*! +a model of `Kernel::Direction_2` +*/ +typedef Hidden_type Direction_2; + +/*! +a model of `Kernel::Line_2` +*/ +typedef Hidden_type Line_2; + +/*! +a model of `Kernel::Ray_2` +*/ +typedef Hidden_type Ray_2; + +/*! +a model of `Kernel::Segment_2` +*/ +typedef Hidden_type Segment_2; + +/*! +a model of `Kernel::Triangle_2` +*/ +typedef Hidden_type Triangle_2; + +/*! +a model of `Kernel::IsoRectangle_2` +*/ +typedef Hidden_type Iso_rectangle_2; + +/*! +a model of `Kernel::Circle_2` +*/ +typedef Hidden_type Circle_2; + +/*! +a model of `Kernel::Object_2` +*/ +typedef Hidden_type Object_2; + +/// @} + +/// \name Constructions +/// @{ + +/*! +a model of `Kernel::ConstructPoint_2` +*/ +typedef Hidden_type Construct_point_2; + +/*! +a model of `Kernel::ConstructVector_2` +*/ +typedef Hidden_type Construct_vector_2; + +/*! +a model of `Kernel::ConstructDirection_2` +*/ +typedef Hidden_type Construct_direction_2; + +/*! +a model of `Kernel::ConstructSegment_2` +*/ +typedef Hidden_type Construct_segment_2; + +/*! +a model of `Kernel::ConstructLine_2` +*/ +typedef Hidden_type Construct_line_2; + +/*! +a model of `Kernel::ConstructRay_2` +*/ +typedef Hidden_type Construct_ray_2; + +/*! +a model of `Kernel::ConstructCircle_2` +*/ +typedef Hidden_type Construct_circle_2; + +/*! +a model of `Kernel::ConstructTriangle_2` +*/ +typedef Hidden_type Construct_triangle_2; + +/*! +a model of `Kernel::ConstructIsoRectangle_2` +*/ +typedef Hidden_type Construct_iso_rectangle_2; + +/*! +a model of `Kernel::ConstructObject_2` +*/ +typedef Hidden_type Construct_object_2; + +/*! +a model of `Kernel::ConstructScaledVector_2` +*/ +typedef Hidden_type Construct_scaled_vector_2; + +/*! +a model of `Kernel::ConstructTranslatedPoint_2` +*/ +typedef Hidden_type Construct_translated_point_2; + +/*! +a model of `Kernel::ConstructPointOn_2` +*/ +typedef Hidden_type Construct_point_on_2; + +/*! +a model of `Kernel::ConstructProjectedPoint_2` +*/ +typedef Hidden_type Construct_projected_point_2; + +/*! +a model of `Kernel::ConstructProjectedXYPoint_2` +*/ +typedef Hidden_type Construct_projected_xy_point_2; + +/*! +a model of `Kernel::ConstructCartesianConstIterator_2` +*/ +typedef Hidden_type Construct_cartesian_const_iterator_2; + +/*! +a model of `Kernel::ConstructVertex_2` +*/ +typedef Hidden_type Construct_vertex_2; + +/*! +a model of `Kernel::ConstructBbox_2` +*/ +typedef Hidden_type Construct_bbox_2; + +/*! +a model of `Kernel::ConstructPerpendicularVector_2` +*/ +typedef Hidden_type Construct_perpendicular_vector_2; + +/*! +a model of `Kernel::ConstructPerpendicularDirection_2` +*/ +typedef Hidden_type Construct_perpendicular_direction_2; + +/*! +a model of `Kernel::ConstructPerpendicularLine_2` +*/ +typedef Hidden_type Construct_perpendicular_line_2; + +/*! +a model of `Kernel::ConstructMaxVertex_2` +*/ +typedef Hidden_type Construct_max_vertex_2; + +/*! +a model of `Kernel::ConstructMidpoint_2` +*/ +typedef Hidden_type Construct_midpoint_2; + +/*! +a model of `Kernel::ConstructEquidistantLine_3` +*/ +typedef Hidden_type Construct_equidistant_line_3; + +/*! +a model of `Kernel::ConstructMinVertex_2` +*/ +typedef Hidden_type Construct_min_vertex_2; + +/*! +a model of `Kernel::ConstructCenter_2` +*/ +typedef Hidden_type Construct_center_2; + +/*! +a model of `Kernel::ConstructCentroid_2` +*/ +typedef Hidden_type Construct_centroid_2; + +/*! +a model of `Kernel::ConstructCircumcenter_2` +*/ +typedef Hidden_type Construct_circumcenter_2; + +/*! +a model of `Kernel::ConstructBisector_2` +*/ +typedef Hidden_type Construct_bisector_2; + +/*! +a model of `Kernel::ConstructOppositeDirection_2` +*/ +typedef Hidden_type Construct_opposite_direction_2; + +/*! +a model of `Kernel::ConstructOppositeSegment_2` +*/ +typedef Hidden_type Construct_opposite_segment_2; + +/*! +a model of `Kernel::ConstructOppositeRay_2` +*/ +typedef Hidden_type Construct_opposite_ray_2; + +/*! +a model of `Kernel::ConstructOppositeLine_2` +*/ +typedef Hidden_type Construct_opposite_line_2; + +/*! +a model of `Kernel::ConstructOppositeTriangle_2` +*/ +typedef Hidden_type Construct_opposite_triangle_2; + +/*! +a model of `Kernel::ConstructOppositeCircle_2` +*/ +typedef Hidden_type Construct_opposite_circle_2; + +/*! +a model of `Kernel::ConstructOppositeVector_2` +*/ +typedef Hidden_type Construct_opposite_vector_2; + +/*! +a model of `Kernel::Intersect_2` +*/ +typedef Hidden_type Intersect_2; + +/*! +a model of `Kernel::Assign_2` +*/ +typedef Hidden_type Assign_2; + +/*! +a model of `Kernel::ComputeSquaredDistance_2` +*/ +typedef Hidden_type Compute_squared_distance_2; + +/*! +a model of `Kernel::ComputeSquaredLength_2` +*/ +typedef Hidden_type Compute_squared_length_2; + +/*! +a model of `Kernel::ComputeSquaredRadius_2` +*/ +typedef Hidden_type Compute_squared_radius_2; + +/*! +a model of `Kernel::ComputeArea_2` +*/ +typedef Hidden_type Compute_area_2; + +/*! +a model of `Kernel::ComputeDeterminant_2` +*/ +typedef Hidden_type Compute_determinant_2; + +/// @} + +/// \name Generalized Predicates +/// @{ + +/*! +a model of `Kernel::Angle_2` +*/ +typedef Hidden_type Angle_2; + +/*! +a model of `Kernel::Equal_2` +*/ +typedef Hidden_type Equal_2; + +/*! +a model of `Kernel::EqualX_2` +*/ +typedef Hidden_type Equal_x_2; + +/*! +a model of `Kernel::EqualY_2` +*/ +typedef Hidden_type Equal_y_2; + +/*! +a model of `Kernel::LessX_2` +*/ +typedef Hidden_type Less_x_2; + +/*! +a model of `Kernel::LessY_2` +*/ +typedef Hidden_type Less_y_2; + +/*! +a model of `Kernel::LessXY_2` +*/ +typedef Hidden_type Less_xy_2; + +/*! +a model of `Kernel::LessYX_2` +*/ +typedef Hidden_type Less_yx_2; + +/*! +a model of `Kernel::CompareX_2` +*/ +typedef Hidden_type Compare_x_2; + +/*! +a model of `Kernel::CompareXAtY_2` +*/ +typedef Hidden_type Compare_x_at_y_2; + +/*! +a model of `Kernel::CompareY_2` +*/ +typedef Hidden_type Compare_y_2; + +/*! +a model of `Kernel::CompareXY_2` +*/ +typedef Hidden_type Compare_xy_2; + +/*! +a model of `Kernel::CompareYX_2` +*/ +typedef Hidden_type Compare_yx_2; + +/*! +a model of `Kernel::CompareYAtX_2` +*/ +typedef Hidden_type Compare_y_at_x_2; + +/*! +a model of `Kernel::CompareDistance_2` +*/ +typedef Hidden_type Compare_distance_2; + +/*! +a model of `Kernel::CompareAngleWithXAxis_2` +*/ +typedef Hidden_type Compare_angle_with_x_axis_2; + +/*! +a model of `Kernel::CompareSlope_2` +*/ +typedef Hidden_type Compare_slope_2; + +/*! +a model of `Kernel::LessDistanceToPoint_2` +*/ +typedef Hidden_type Less_distance_to_point_2; + +/*! +a model of `Kernel::LessSignedDistanceToLine_2` +*/ +typedef Hidden_type Less_signed_distance_to_line_2; + +/*! +a model of `Kernel::LessRotateCCW_2` +*/ +typedef Hidden_type Less_rotate_ccw_2; + +/*! +a model of `Kernel::LeftTurn_2` +*/ +typedef Hidden_type Left_turn_2; + +/*! +a model of `Kernel::Collinear_2` +*/ +typedef Hidden_type Collinear_2; + +/*! +a model of `Kernel::Orientation_2` +*/ +typedef Hidden_type Orientation_2; + +/*! +a model of `Kernel::SideOfOrientedCircle_2` +*/ +typedef Hidden_type Side_of_oriented_circle_2; + +/*! +a model of `Kernel::SideOfBoundedCircle_2` +*/ +typedef Hidden_type Side_of_bounded_circle_2; + +/*! +a model of `Kernel::IsHorizontal_2` +*/ +typedef Hidden_type Is_horizontal_2; + +/*! +a model of `Kernel::IsVertical_2` +*/ +typedef Hidden_type Is_vertical_2; + +/*! +a model of `Kernel::IsDegenerate_2` +*/ +typedef Hidden_type Is_degenerate_2; + +/*! +a model of `Kernel::HasOn_2` +*/ +typedef Hidden_type Has_on_2; + +/*! +a model of `Kernel::CollinearHasOn_2` +*/ +typedef Hidden_type Collinear_has_on_2; + +/*! +a model of `Kernel::HasOnBoundedSide_2` +*/ +typedef Hidden_type Has_on_bounded_side_2; + +/*! +a model of `Kernel::HasOnUnboundedSide_2` +*/ +typedef Hidden_type Has_on_unbounded_side_2; + +/*! +a model of `Kernel::HasOnBoundary_2` +*/ +typedef Hidden_type Has_on_boundary_2; + +/*! +a model of `Kernel::HasOnPositiveSide_2` +*/ +typedef Hidden_type Has_on_positive_side_2; + +/*! +a model of `Kernel::HasOnNegativeSide_2` +*/ +typedef Hidden_type Has_on_negative_side_2; + +/*! +a model of `Kernel::OrientedSide_2` +*/ +typedef Hidden_type Oriented_side_2; + +/*! +a model of `Kernel::BoundedSide_2` +*/ +typedef Hidden_type Bounded_side_2; + +/*! +a model of `Kernel::AreParallel_2` +*/ +typedef Hidden_type Are_parallel_2 ; + +/*! +a model of `Kernel::AreOrderedAlongLine_2` +*/ +typedef Hidden_type Are_ordered_along_line_2 ; + +/*! +a model of `Kernel::AreStrictlyOrderedAlongLine_2` +*/ +typedef Hidden_type Are_strictly_ordered_along_line_2; + +/*! +a model of `Kernel::CollinearAreOrderedAlongLine_2` +*/ +typedef Hidden_type Collinear_are_ordered_along_line_2; + +/*! +a model of `Kernel::CollinearAreStrictlyOrderedAlongLine_2` +*/ +typedef Hidden_type Collinear_are_strictly_ordered_along_line_2; + +/*! +a model of `Kernel::CounterclockwiseInBetween_2` +*/ +typedef Hidden_type Counterclockwise_in_between_2; + +/*! +a model of `Kernel::DoIntersect_2` +*/ +typedef Hidden_type Do_intersect_2; + +/// @} + +/// \name Coordinate Access +/// @{ + +/*! +a model of `Kernel::CartesianConstIterator_3` +*/ +typedef Hidden_type Cartesian_const_iterator_3; + +/// @} + +/// \name Geometric Objects +/// @{ + +/*! +a model of `Kernel::Point_3` +*/ +typedef Hidden_type Point_3; + +/*! +a model of `Kernel::Vector_3` +*/ +typedef Hidden_type Vector_3; + +/*! +a model of `Kernel::Direction_3` +*/ +typedef Hidden_type Direction_3; + +/*! +a model of `Kernel::IsoCuboid_3` +*/ +typedef Hidden_type Iso_cuboid_3; + +/*! +a model of `Kernel::Line_3` +*/ +typedef Hidden_type Line_3; + +/*! +a model of `Kernel::Ray_3` +*/ +typedef Hidden_type Ray_3; + +/*! +a model of `Kernel::Circle_3` +*/ +typedef Hidden_type Circle_3; + +/*! +a model of `Kernel::Sphere_3` +*/ +typedef Hidden_type Sphere_3; + +/*! +a model of `Kernel::Segment_3` +*/ +typedef Hidden_type Segment_3; + +/*! +a model of `Kernel::Plane_3` +*/ +typedef Hidden_type Plane_3; + +/*! +a model of `Kernel::Triangle_3` +*/ +typedef Hidden_type Triangle_3; + +/*! +a model of `Kernel::Tetrahedron_3` +*/ +typedef Hidden_type Tetrahedron_3; + +/*! +a model of `Kernel::Object_3` +*/ +typedef Hidden_type Object_3; + +/// @} + +/// \name Constructions +/// @{ + +/*! +a model of `Kernel::ConstructPoint_3` +*/ +typedef Hidden_type Construct_point_3; + +/*! +a model of `Kernel::ConstructVector_3` +*/ +typedef Hidden_type Construct_vector_3; + +/*! +a model of `Kernel::ConstructDirection_3` +*/ +typedef Hidden_type Construct_direction_3; + +/*! +a model of `Kernel::ConstructPlane_3` +*/ +typedef Hidden_type Construct_plane_3; + +/*! +a model of `Kernel::ConstructIsoCuboid_3` +*/ +typedef Hidden_type Construct_iso_cuboid_3; + +/*! +a model of `Kernel::ConstructLine_3` +*/ +typedef Hidden_type Construct_line_3; + +/*! +a model of `Kernel::ConstructRay_3` +*/ +typedef Hidden_type Construct_ray_3; + +/*! +a model of `Kernel::ConstructSphere_3` +*/ +typedef Hidden_type Construct_sphere_3; + +/*! +a model of `Kernel::ConstructSegment_3` +*/ +typedef Hidden_type Construct_segment_3; + +/*! +a model of `Kernel::ConstructTriangle_3` +*/ +typedef Hidden_type Construct_triangle_3; + +/*! +a model of `Kernel::ConstructTetrahedron_3` +*/ +typedef Hidden_type Construct_tetrahedron_3; + +/*! +a model of `Kernel::ConstructObject_3` +*/ +typedef Hidden_type Construct_object_3; + +/*! +a model of `Kernel::ConstructScaledVector_3` +*/ +typedef Hidden_type Construct_scaled_vector_3; + +/*! +a model of `Kernel::ConstructTranslatedPoint_3` +*/ +typedef Hidden_type Construct_translated_point_3; + +/*! +a model of `Kernel::ConstructPointOn_3` +*/ +typedef Hidden_type Construct_point_on_3; + +/*! +a model of `Kernel::ConstructProjectedPoint_3` +*/ +typedef Hidden_type Construct_projected_point_3; + +/*! +a model of `Kernel::ConstructLiftedPoint_3` +*/ +typedef Hidden_type Construct_lifted_point_3; + +/*! +a model of `Kernel::ConstructCartesianConstIterator_3` +*/ +typedef Hidden_type Construct_cartesian_const_iterator_3; + +/*! +a model of `Kernel::ConstructVertex_3` +*/ +typedef Hidden_type Construct_vertex_3; + +/*! +a model of `Kernel::ConstructBbox_3` +*/ +typedef Hidden_type Construct_bbox_3; + +/*! +a model of `Kernel::ConstructSupportingPlane_3` +*/ +typedef Hidden_type Construct_supporting_plane_3; + +/*! +a model of `Kernel::ConstructOrthogonalVector_3` +*/ +typedef Hidden_type Construct_orthogonal_vector_3; + +/*! +a model of `Kernel::ConstructBaseVector_3` +*/ +typedef Hidden_type Construct_base_vector_3; + +/*! +a model of `Kernel::ConstructPerpendicularPlane_3` +*/ +typedef Hidden_type Construct_perpendicular_plane_3; + +/*! +a model of `Kernel::ConstructRadicalPlane_3` +*/ +typedef Hidden_type Construct_radical_plane_3; + +/*! +a model of `Kernel::ConstructPerpendicularLine_3` +*/ +typedef Hidden_type Construct_perpendicular_line_3; + +/*! +a model of `Kernel::ConstructMidpoint_3` +*/ +typedef Hidden_type Construct_midpoint_3; + +/*! +a model of `Kernel::ConstructCenter_3` +*/ +typedef Hidden_type Construct_center_3; + +/*! +a model of `Kernel::ConstructCentroid_3` +*/ +typedef Hidden_type Construct_centroid_3; + +/*! +a model of `Kernel::ConstructCircumcenter_3` +*/ +typedef Hidden_type Construct_circumcenter_3; + +/*! +a model of `Kernel::ConstructBisector_3` +*/ +typedef Hidden_type Construct_bisector_3; + +/*! +a model of `Kernel::ConstructCrossProductVector_3` +*/ +typedef Hidden_type Construct_cross_product_vector_3; + +/*! +a model of `Kernel::ConstructOppositeDirection_3` +*/ +typedef Hidden_type Construct_opposite_direction_3; + +/*! +a model of `Kernel::ConstructOppositeSegment_3` +*/ +typedef Hidden_type Construct_opposite_segment_3; + +/*! +a model of `Kernel::ConstructOppositeRay_3` +*/ +typedef Hidden_type Construct_opposite_ray_3; + +/*! +a model of `Kernel::ConstructOppositeLine_3` +*/ +typedef Hidden_type Construct_opposite_line_3; + +/*! +a model of `Kernel::ConstructOppositePlane_3` +*/ +typedef Hidden_type Construct_opposite_plane_3; + +/*! +a model of `Kernel::ConstructOppositeSphere_3` +*/ +typedef Hidden_type Construct_opposite_sphere_3; + +/*! +a model of `Kernel::ConstructOppositeVector_3` +*/ +typedef Hidden_type Construct_opposite_vector_3; + +/*! +a model of `Kernel::Intersect_3` +*/ +typedef Hidden_type Intersect_3; + +/*! +a model of `Kernel::Assign_3` +*/ +typedef Hidden_type Assign_3; + +/*! +a model of `Kernel::ComputeArea_3` +*/ +typedef Hidden_type Compute_area_3; + +/*! +a model of `Kernel::ComputeSquaredArea_3` +*/ +typedef Hidden_type Compute_squared_area_3; + +/*! +a model of `Kernel::ComputeAreaDividedByPi_3` +*/ +typedef Hidden_type Compute_area_divided_by_pi_3; + +/*! +a model of `Kernel::ComputeApproximateArea_3` +*/ +typedef Hidden_type Compute_approximate_area_3; + +/*! +a model of `Kernel::ComputeDeterminant_3` +*/ +typedef Hidden_type Compute_determinant_3; + +/*! +a model of `Kernel::ComputeSquaredDistance_3` +*/ +typedef Hidden_type Compute_squared_distance_3; + +/*! +a model of `Kernel::ComputeSquaredLength_3` +*/ +typedef Hidden_type Compute_squared_length_3; + +/*! +a model of `Kernel::ComputeSquaredLengthDividedByPiSquare_3` +*/ +typedef Hidden_type Compute_squared_length_divided_by_pi_square_3; + +/*! +a model of `Kernel::ComputeApproximateSquaredLength_3` +*/ +typedef Hidden_type Compute_approximate_squared_length_3; + +/*! +a model of `Kernel::ComputeSquaredRadius_3` +*/ +typedef Hidden_type Compute_squared_radius_3; + +/*! +a model of `Kernel::ComputeVolume_3` +*/ +typedef Hidden_type Compute_volume_3; + +/// @} + +/// \name Generalized Predicates +/// @{ + +/*! +a model of `Kernel::Angle_3` +*/ +typedef Hidden_type Angle_3; + +/*! +a model of `Kernel::Equal_3` +*/ +typedef Hidden_type Equal_3; + +/*! +a model of `Kernel::EqualX_3` +*/ +typedef Hidden_type Equal_x_3; + +/*! +a model of `Kernel::EqualY_3` +*/ +typedef Hidden_type Equal_y_3; + +/*! +a model of `Kernel::EqualZ_3` +*/ +typedef Hidden_type Equal_z_3; + +/*! +a model of `Kernel::EqualXY_3` +*/ +typedef Hidden_type Equal_xy_3; + +/*! +a model of `Kernel::LessX_3` +*/ +typedef Hidden_type Less_x_3; + +/*! +a model of `Kernel::LessY_3` +*/ +typedef Hidden_type Less_y_3; + +/*! +a model of `Kernel::LessZ_3` +*/ +typedef Hidden_type Less_z_3; + +/*! +a model of `Kernel::LessXY_3` +*/ +typedef Hidden_type Less_xy_3; + +/*! +a model of `Kernel::LessXYZ_3` +*/ +typedef Hidden_type Less_xyz_3; + +/*! +a model of `Kernel::CompareX_3` +*/ +typedef Hidden_type Compare_x_3; + +/*! +a model of `Kernel::CompareY_3` +*/ +typedef Hidden_type Compare_y_3; + +/*! +a model of `Kernel::CompareZ_3` +*/ +typedef Hidden_type Compare_z_3; + +/*! +a model of `Kernel::CompareXY_3` +*/ +typedef Hidden_type Compare_xy_3; + +/*! +a model of `Kernel::CompareXYZ_3` +*/ +typedef Hidden_type Compare_xyz_3; + +/*! +a model of `Kernel::LessSignedDistanceToPlane_3` +*/ +typedef Hidden_type Less_signed_distance_to_plane_3; + +/*! +a model of `Kernel::LessDistanceToPoint_3` +*/ +typedef Hidden_type Less_distance_to_point_3; + +/*! +a model of `Kernel::CompareDihedralAngle_3` +*/ +typedef Hidden_type Compare_dihedral_angle_3; + +/*! +a model of `Kernel::CompareDistance_3` +*/ +typedef Hidden_type Compare_distance_3; + +/*! +a model of `Kernel::Collinear_3` +*/ +typedef Hidden_type Collinear_3; + +/*! +a model of `Kernel::Coplanar_3` +*/ +typedef Hidden_type Coplanar_3; + +/*! +a model of `Kernel::Orientation_3` +*/ +typedef Hidden_type Orientation_3; + +/*! +a model of `Kernel::CoplanarOrientation_3` +*/ +typedef Hidden_type Coplanar_orientation_3; + +/*! +a model of `Kernel::CoplanarSideOfBoundedCircle_3` +*/ +typedef Hidden_type Coplanar_side_of_bounded_circle_3; + +/*! +a model of `Kernel::SideOfOrientedSphere_3` +*/ +typedef Hidden_type Side_of_oriented_sphere_3; + +/*! +a model of `Kernel::SideOfBoundedSphere_3` +*/ +typedef Hidden_type Side_of_bounded_sphere_3; + +/*! +a model of `Kernel::IsDegenerate_3` +*/ +typedef Hidden_type Is_degenerate_3; + +/*! +a model of `Kernel::HasOn_3` +*/ +typedef Hidden_type Has_on_3; + +/*! +a model of `Kernel::HasOnBoundedSide_3` +*/ +typedef Hidden_type Has_on_bounded_side_3; + +/*! +a model of `Kernel::HasOnUnboundedSide_3` +*/ +typedef Hidden_type Has_on_unbounded_side_3; + +/*! +a model of `Kernel::HasOnBoundary_3` +*/ +typedef Hidden_type Has_on_boundary_3; + +/*! +a model of `Kernel::HasOnPositiveSide_3` +*/ +typedef Hidden_type Has_on_positive_side_3; + +/*! +a model of `Kernel::HasOnNegativeSide_3` +*/ +typedef Hidden_type Has_on_negative_side_3; + +/*! +a model of `Kernel::OrientedSide_3` +*/ +typedef Hidden_type Oriented_side_3; + +/*! +a model of `Kernel::BoundedSide_3` +*/ +typedef Hidden_type Bounded_side_3; + +/*! +a model of `Kernel::AreParallel_3` +*/ +typedef Hidden_type Are_parallel_3 ; + +/*! +a model of `Kernel::AreOrderedAlongLine_3` +*/ +typedef Hidden_type Are_ordered_along_line_3 ; + +/*! +a model of `Kernel::AreStrictlyOrderedAlongLine_3` +*/ +typedef Hidden_type Are_strictly_ordered_along_line_3; + +/*! +a model of `Kernel::CollinearAreOrderedAlongLine_3` +*/ +typedef Hidden_type Collinear_are_ordered_along_line_3; + +/*! +a model of `Kernel::CollinearAreStrictlyOrderedAlongLine_3` +*/ +typedef Hidden_type Collinear_are_strictly_ordered_along_line_3; + +/*! +a model of `Kernel::DoIntersect_3` +*/ +typedef Hidden_type Do_intersect_3; + +/// @} + +/// \name Operations +/// For each of the function objects above, there must exist a member +/// function that requires no arguments and returns an instance of +/// that function object. The name of the member function is the +/// uncapitalized name of the type returned with the suffix `_object` +/// appended. For example, for the function object +/// `Kernel::Construct_vector_2` the following member function must +/// exist: + +/// @{ + +/*! + +*/ +Kernel::Construct_vector_2 construct_vector_2_object() const ; + +/// @} + + + +/// @} + +}; /* end Kernel */ + diff --git a/Kernel_23/doc/Kernel_23/Kernel_23.txt b/Kernel_23/doc/Kernel_23/Kernel_23.txt new file mode 100644 index 00000000000..096f9d558f9 --- /dev/null +++ b/Kernel_23/doc/Kernel_23/Kernel_23.txt @@ -0,0 +1,727 @@ +namespace CGAL { +/*! + +\mainpage 2D and 3D Geometry Kernel +\anchor chapterkernel23 + +\authors Hervé Brönnimann, Andreas Fabri, Geert-Jan Giezeman, Susan Hert, Michael Hoffmann, Lutz Kettner, Sylvain Pion, and Stefan Schirra + +# Introduction # + +\cgal, the Computational Geometry Algorithms Library, is written in +\cpp and consists of three major parts. +The first part is the kernel, which consists of constant-size non-modifiable +geometric primitive objects and operations on these objects. +The objects are represented both as stand-alone classes that are +parameterized by a representation class, which specifies +the underlying number types used for calculations and as members of the +kernel classes, which allows for more flexibility and adaptability of the +kernel. +The second part is a collection of basic geometric data structures and +algorithms, which are parameterized by traits classes that define the +interface between the data structure or algorithm and the primitives they use. +In many cases, the kernel classes provided in \cgal can be used as traits +classes for these data structures and algorithms. +The third part of the library consists of non-geometric support facilities, +such as circulators, random sources, I/O support for debugging and for +interfacing \cgal to various visualization tools. + +This part of the reference manual covers the kernel. +The kernel contains objects of constant size, such as point, vector, +direction, line, ray, segment, triangle, iso-oriented rectangle and +tetrahedron. +With each type comes a set of functions which can be applied to an object +of this type. +You will typically find access functions (e.g. to the coordinates of a point), +tests of the position of a point relative to the object, a function returning +the bounding box, the length, or the area of an object, and so on. +The \cgal kernel further contains basic operations such as affine +transformations, detection and computation of intersections, and distance +computations. + +## Robustness ## + +The correctness proof of nearly all geometric algorithms presented +in theory papers assumes exact computation with real numbers. +This leads to a fundamental problem with the implementation of geometric +algorithms. +Naively, often the exact real arithmetic is replaced by inexact floating-point +arithmetic in the implementation. +This often leads to acceptable results for many input data. +However, even for the implementation of the simplest geometric +algorithms this simplification occasionally does not work. +Rounding errors introduced by an inaccurate arithmetic may lead to +inconsistent decisions, causing unexpected failures for some correct +input data. +There are many approaches to this problem, one of them is to compute +exactly (compute so accurate that all decisions made by the algorithm +are exact) which is possible in many cases but more expensive +than standard floating-point arithmetic. +C. M. Hoffmann \cite h-gsm-89, \cite h-pargc-89 illustrates some +of the problems arising in the implementation of geometric algorithms +and discusses some approaches to solve them. +A more recent overview is given in \cite s-rpigc-00. +The exact computation paradigm is discussed by Yap and Dubé +\cite yd-ecp-95 and Yap \cite y-tegc-97. + +In \cgal you can choose the underlying number types and arithmetic. +You can use different types of arithmetic simultaneously and the choice can +be easily changed, e.g. for testing. +So you can choose between implementations with fast but occasionally inexact +arithmetic and implementations guaranteeing exact computation and exact +results. +Of course you have to pay for the exactness in terms of execution time +and storage space. +See the dedicated chapter +for more details on number types and their capabilities and performance. + +# Kernel Representations # + +Our object of study is the \f$ d\f$-dimensional affine Euclidean space. +Here we are mainly concerned with cases \f$ d=2\f$ and \f$ d=3\f$. +Objects in that space are sets of points. A common way to represent +the points is the use of Cartesian coordinates, +which assumes a reference frame (an origin and \f$ d\f$ orthogonal axes). +In that framework, a point is represented by a \f$ d\f$-tuple +\f$ (c_0,c_1,\ldots,c_{d-1})\f$, +and so are vectors in the underlying linear space. Each point is +represented uniquely by such Cartesian coordinates. +Another way to represent points is by homogeneous coordinates. In that +framework, a point is represented by a \f$ (d+1)\f$-tuple +\f$ (h_0,h_1,\ldots,h_d)\f$. +Via the formulae \f$ c_i = h_i/h_d\f$, +the corresponding point with Cartesian coordinates +\f$ (c_0,c_1,\ldots,c_{d-1})\f$ +can be computed. Note that homogeneous coordinates are not unique. +For \f$ \lambda\ne 0\f$, the tuples \f$ (h_0,h_1,\ldots,h_d)\f$ and +\f$ (\lambda\cdot h_0,\lambda\cdot h_1,\ldots,\lambda\cdot h_d)\f$ +represent the same point. +For a point with Cartesian coordinates \f$ (c_0,c_1,\ldots,c_{d-1})\f$ a +possible homogeneous representation is \f$ (c_0,c_1,\ldots,c_{d-1},1)\f$. +Homogeneous coordinates in fact allow to represent +objects in a more general space, the projective space +\f$ \mathbb{P}^d\f$. +In \cgal, we do not compute in projective geometry. Rather, we use +homogeneous coordinates to avoid division operations, +since the additional coordinate can serve as a common denominator. + +## Genericity Through Parameterization ## + +Almost all the kernel objects (and the corresponding functions) are +templates with a parameter that allows the user to choose the +representation of the kernel objects. A type that is used as an +argument for this parameter must fulfill certain requirements on +syntax and semantics. The list of requirements defines an abstract +kernel concept. For all kernel objects types, the types +`CGAL::Type` and +`Kernel::Type` are identical. + +\cgal offers four families of concrete models for the concept Kernel, +two based on the Cartesian representation of +points and two based on the homogeneous representation of points. The +interface of the kernel objects is designed such that it works well +with both Cartesian and homogeneous +representation. For example, points in 2D have a constructor with +three arguments as well (the three homogeneous coordinates of the +point). The common interfaces parameterized with a kernel class allow +one to develop code independent of the chosen representation. We said +"families" of models, because both families are parameterized too. +A user can choose the number type used to represent the coordinates. + +For reasons that will become evident later, a kernel class provides +two typenames for number types, namely `Kernel::FT` and `Kernel::RT`. +The type `Kernel::FT` must fulfill the +requirements on what is called a FieldNumberType in \cgal. This +roughly means that `Kernel::FT` is a type for which operations +\f$ +\f$, \f$ -\f$, \f$ *\f$ and \f$ /\f$ are defined with semantics (approximately) +corresponding to those of a field in a mathematical sense. Note that, +strictly speaking, the built-in type `int` does not fulfill the +requirements on a field type, since `int`s correspond to elements +of a ring rather than a field, especially operation \f$ /\f$ is not the +inverse of \f$ *\f$. The requirements on the type `Kernel::RT` are +weaker. This type must fulfill the requirements on what is called a +RingNumberType in \cgal. This roughly means that +`Kernel::RT` is a type for which operations \f$ +\f$, \f$ -\f$, \f$ *\f$ are +defined with semantics (approximately) corresponding to those of a +ring in a mathematical sense. + +## Cartesian Kernels ## + +With `Cartesian` you can choose a +Cartesian representation of coordinates. When you +choose Cartesian representation you have to +declare at the same time the type of the coordinates. A number type +used with the `Cartesian` representation class should be a +FieldNumberType as described above. As mentioned above, the built-in +type `int` is not a FieldNumberType. However, for some +computations with Cartesian representation, no +division operation is needed, i.e., a `RingNumberType` is sufficient in +this case. With `Cartesian`, both +`Cartesian::FT` and +`Cartesian::RT` are mapped to +`FieldNumberType`. + +`Cartesian` uses reference counting internally to +save copying costs. \cgal also provides +`Simple_cartesian`, a kernel that uses +Cartesian representation but no reference +counting. Debugging is easier with +`Simple_cartesian`, since the coordinates are +stored within the class and hence direct access to the coordinates is +possible. Depending on the algorithm, it can also be slightly more or +less efficient than `Cartesian`. Again, in +`Simple_cartesian` both +`Simple_cartesian::FT` and +`Simple_cartesian::RT` are mapped to +`FieldNumberType`. + +## Homogeneous Kernels ## + +Homogeneous coordinates permit to avoid division operations in +numerical computations, since the additional coordinate can serve as a +common denominator. Avoiding divisions can be useful for exact +geometric computation. With `Homogeneous` you can +choose a homogeneous representation for the coordinates of the kernel +objects. As for the Cartesian representation, one +has to declare the type used to store the coordinates. Since the +homogeneous representation does not use divisions, the number type +associated with a homogeneous representation class must be a model for +the weaker concept `RingNumberType` only. However, some operations +provided by this kernel involve divisions, for example computing +squared distances or Cartesian coordinates. To +keep the requirements on the number type parameter of +`Homogeneous` low, the number type +`Quotient` is used for operations that require +divisions. This number type can be viewed as an adaptor which turns a +`RingNumberType` into a `FieldNumberType`. It maintains numbers as +quotients, i.e., a numerator and a denominator. With +`Homogeneous`, +`Homogeneous::FT` is equal to +`Quotient`, while +`Homogeneous::RT` is equal to +`RingNumberType`. + +`Homogeneous` uses reference counting internally +to save copying costs. \cgal also provides +`Simple_homogeneous`, a kernel that uses +homogeneous representation but no reference +counting. Debugging is easier with +`Simple_homogeneous`, since the coordinates are +stored within the class and hence direct access to the coordinates is +possible. Depending on the algorithm, it can also be slightly more or +less efficient than `Homogeneous`. Again, in +`Simple_homogeneous` the type +`Simple_homogeneous::FT` is equal to +`Quotient` while +`Simple_homogeneous::RT` is equal to +`RingNumberType`. + +## Naming Conventions ## + +The use of kernel classes not only avoids problems, it also makes all +\cgal classes very uniform. They always consist of: +
    + +
  1. The capitalized base name of the geometric object, such as +`Point`, `Segment`, or `Triangle`. + +
  2. An underscore followed by the dimension of the object, +for example \f$ \_2\f$, \f$ \_3\f$, or \f$ \_d\f$. + +
  3. A kernel class as parameter, which itself is +parameterized with a number type, such as +`Cartesian` or +`Homogeneous`. +
+ +## Kernel as a Traits Class ## + +Algorithms and data structures in the basic library of \cgal are +parameterized by a traits class that subsumes the objects on which the +algorithm or data structure operates as well as the operations to do +so. For most of the algorithms and data structures in the basic +library you can use a kernel as a traits class. For some algorithms +you even do not have to specify the kernel; it is detected +automatically using the types of the geometric objects passed to the +algorithm. In some other cases, the algorithms or data structures +needs more than is provided by the kernel concept. In these cases, a +kernel can not be used as a traits class. + +## Choosing a Kernel and Predefined Kernels ## + +If you start with integral Cartesian coordinates, +many geometric computations will involve integral numerical values +only. Especially, this is true for geometric computations that +evaluate only predicates, which are tantamount to determinant +computations. Examples are triangulation of point sets and convex hull +computation. In this case, the Cartesian +representation is probably the first choice, even with a ring type. +You might use limited precision integer types like `int` or +`long`, use `double` to present your integers (they have more +bits in their mantissa than an `int` and overflow nicely), or an +arbitrary precision integer type like the wrapper `Gmpz` for the +GMP integers, `leda_integer`, or `MP_Float`. Note, that unless +you use an arbitrary precision ring type, incorrect results might +arise due to overflow. + +If new points are to be constructed, for example the +intersection point of two lines, computation of +Cartesian coordinates usually involves divisions. +Hence, one needs to use a `FieldNumberType` with +Cartesian representation, or alternatively, switch +to homogeneous representation. The type `double` is a - though +imprecise - model for `FieldNumberType`. You can also put any +`RingNumberType` into the `Quotient` adaptor to get a field type +which then can be put into `Cartesian`. But using homogeneous +representation on the `RingNumberType` is usually the better option. +Other valid `FieldNumberType`s are `leda_rational` and +`leda_real`. + +If it is crucial for you that the computation is reliable, the right +choice is probably a number type that guarantees exact computation. +The `Filtered_kernel` provides a way to apply filtering techniques +\cite cgal:bbp-iayed-01 to achieve a kernel with exact and efficient +predicates. Still other people will prefer the built-in +type double, because they need speed and can live with +approximate results, or even algorithms that, from time to time, +crash or compute incorrect results due to accumulated rounding errors. + +Predefined kernels. + +For the user's convenience, \cgal provides 3 typedefs to generally useful +kernels. + +
    +
  • They are all Cartesian kernels. +
  • They all support constructions of points from double Cartesian +coordinates. +
  • All these 3 kernels provide exact geometric predicates. +
  • They handle geometric constructions differently: +
      +
    • `Exact_predicates_exact_constructions_kernel`: provides exact +geometric constructions, in addition to exact geometric predicates. +
    • `Exact_predicates_exact_constructions_kernel_with_sqrt`: +same as `Exact_predicates_exact_constructions_kernel`, but the +number type it provides +(`Exact_predicates_exact_constructions_kernel_with_sqrt::FT`) +supports the square root operation exactly +\footnote{Currently it requires having either LEDA or CORE installed}. +
    • `Exact_predicates_inexact_constructions_kernel`: provides exact +geometric predicates, but geometric constructions may be inexact due to +round-off errors. It is however enough for most \cgal algorithms, and +faster than both `Exact_predicates_exact_constructions_kernel` and +`Exact_predicates_exact_constructions_kernel_with_sqrt`. +
    +
+ +# Kernel Geometry # + +## Points and Vectors ## + +In \cgal, we strictly distinguish between points, vectors and directions. +A point is a point in the Euclidean space +\f$ \E^d\f$, a vector is the difference of two points \f$ p_2\f$, \f$ p_1\f$ +and denotes the direction and the distance from \f$ p_1\f$ to \f$ p_2\f$ in the +vector space \f$ \R^d\f$, and a direction is a vector where we forget +about its length. +They are different mathematical concepts. For example, they behave +different under affine transformations and an addition of two +points is meaningless in affine geometry. By putting them in different +classes we not only get cleaner code, but also type checking by the +compiler which avoids ambiguous expressions. Hence, it pays twice to +make this distinction. + +\cgal defines a symbolic constant `ORIGIN` of type `Origin` +which denotes the point at the origin. This constant is used in the conversion +between points and vectors. Subtracting it from a point \f$ p\f$ results in the +locus vector of \f$ p\f$. + +\code{.cpp} +Point_2< Cartesian > p(1.0, 1.0), q; +Vector_2< Cartesian > v; +v = p - ORIGIN; +q = ORIGIN + v; +assert( p == q ); +\endcode + +In order to obtain the point corresponding to a vector \f$ v\f$ you simply +have to add \f$ v\f$ to `ORIGIN`. If you want to determine +the point \f$ q\f$ in the middle between two points \f$ p_1\f$ and \f$ p_2\f$, you can write\footnote{you might call `midpoint(p_1,p_2)` instead} + +\code{.cpp} +q = p_1 + (p_2 - p_1) / 2.0; +\endcode + +Note that these constructions do not involve any performance overhead for +the conversion with the currently available representation classes. + +## Kernel Objects ## + +Besides points (`Point_2`, `Point_3`, `Point_d`), +vectors (`Vector_2`, `Vector_3`), and +directions (`Direction_2`, `Direction_3`), +\cgal provides lines, rays, segments, planes, +triangles, tetrahedra, iso-rectangles, iso-cuboids, circles and spheres. + +Lines (`Line_2`, `Line_3`) in \cgal are oriented. In +two-dimensional space, they induce a partition of the plane +into a positive side and a negative side. +Any two points on a line induce an orientation +of this line. +A ray (`Ray_2`, `Ray_3`) is semi-infinite interval on a line, +and this line is oriented from the finite endpoint of this interval towards +any other point in this interval. A segment (`Segment_2`, +`Segment_3`) is a bounded interval on a directed line, +and the endpoints are ordered so that they induce the same direction +as that of the line. + +Planes are affine subspaces of dimension two in \f$ \E^3\f$, passing through +three points, or a point and a line, ray, or segment. +\cgal provides a correspondence between any plane in the ambient +space \f$ \E^3\f$ and the embedding of \f$ \E^2\f$ in that space. +Just like lines, planes are oriented and partition space into a positive side +and a negative side. +In \cgal, there are no special classes for half-spaces. Half-spaces in 2D and +3D are supposed to be represented by oriented lines and planes, respectively. + +Concerning polygons and polyhedra, the kernel provides triangles, +iso-oriented rectangles, iso-oriented cuboids and tetrahedra. +More complex polygons\footnote{Any sequence of points can be seen as a (not necessary simple) polygon or polyline. This view is used frequently in the basic library as well.} +and polyhedra or polyhedral surfaces can be obtained +from the basic library (`Polygon_2`, `Polyhedron_3`), +so they are not part of the kernel. +As with any Jordan curves, triangles, iso-oriented rectangles and circles +separate the plane into two regions, one bounded and one unbounded. + +## Orientation and Relative Position ## + +Geometric objects in \cgal have member functions that test the +position of a point relative to the object. Full dimensional objects +and their boundaries are represented by the same type, +e.g. half-spaces and hyperplanes are not distinguished, neither are balls and +spheres and discs and circles. Such objects split the ambient space into two +full-dimensional parts, a bounded part and an unbounded part +(e.g. circles), or two unbounded parts (e.g. hyperplanes). By default these +objects are oriented, i.e., one of the resulting parts is called the +positive side, the other one is called the negative side. Both of +these may be unbounded. + +For these objects there is a function `oriented_side()` that +determines whether a test point is on the positive side, the negative +side, or on the oriented boundary. These function returns a value of type +`Oriented_side`. + +Those objects that split the space in a bounded and an unbounded part, have +a member function `bounded_side()` with return type +`Bounded_side`. + +If an object is lower dimensional, e.g. a triangle in three-dimensional +space or a segment in two-dimensional space, there is only a test whether a +point belongs to the object or not. This member function, which takes a +point as an argument and returns a Boolean value, is called `has_on()` + +# Predicates and Constructions # + +## Predicates ## + +Predicates are at the heart of a geometry kernel. They are basic units +for the composition of geometric algorithms and encapsulate decisions. +Hence their correctness is crucial for the control flow and hence for +the correctness of an implementation of a geometric algorithm. \cgal uses +the term predicate in a generalized sense. Not only components returning a +Boolean value are called predicates but also components returning an +enumeration type like a `Comparison_result` or an `Orientation`. +We say components, because predicates are implemented both as functions and +function objects (provided by a kernel class). + +\cgal provides predicates for the orientation of point +sets (`orientation`, `leftturn`, `rightturn`, `collinear`, +`coplanar`), for comparing points according to some given order, +especially for comparing Cartesian coordinates +(e.g. `lexicographically_xy_smaller`), in-circle and in-sphere tests, +and predicates to compare distances. + +## Constructions ## + +Functions and function objects that generate objects that are neither +of type `bool` nor enum types are called constructions. +Constructions involve computation of new numerical values and may be +imprecise due to rounding errors unless a kernel with an exact number type is +used. + +Affine transformations (`Aff_transformation_2`, +`Aff_transformation_3`) allow to generate new object instances under +arbitrary affine transformations. These transformations include translations, +rotations (in 2D only) and scaling. Most of the geometric objects in a +kernel have a member function `transform(Aff_transformation t)` +which applies the transformation to the object instance. + +\cgal also provides a set of functions that detect or compute the +intersection +between objects of the 2D kernel, and many objects in the 3D kernel, +and functions to calculate their +squared distance. +Moreover, some member functions of kernel objects are constructions. + +So there are routines that compute the square of the Euclidean distance, but no +routines that compute the distance itself. Why? +First of all, the two values can be derived from each other quite easily (by +taking the square root or taking the square). So, supplying only the one and +not the other is only a minor inconvenience for the user. +Second, often either value can be used. This is for example the case when +(squared) distances are compared. +Third, the library wants to stimulate the use of the squared distance instead +of the distance. The squared distance can be computed in more cases and the +computation is cheaper. +We do this by not providing the perhaps more natural routine, +The problem of a distance routine is that it needs the `sqrt` +operation. +This has two drawbacks: +
    +
  • The `sqrt` operation can be costly. Even if it is not very costly for +a specific number type and platform, avoiding it is always cheaper. +
  • There are number types on which no `sqrt` operation is defined, +especially integer types and rationals. +
+ +## Polymorphic Return Values ## + +Some functions can return different types of objects. A typical +\cpp solution to this problem is to derive all possible return +types from a common base class, to return a pointer to this +class and to perform a dynamic cast on this pointer. The class +`Object` provides an abstraction. +An object `obj` of the class `Object` can +represent an arbitrary class. The only operations it provides is +to make copies and assignments, so that you can put them in lists +or arrays. Note that `Object` is NOT a common base class for the +elementary classes. Therefore, there is no +automatic conversion from these classes to `Object`. Rather +this is done with the global function `make_object()`. This +encapsulation mechanism requires the use of +`object_cast` to access the encapsulated class (a less +efficient way, which is now discouraged, used to be to +use the `assign` function). + +HEADING:Example +-------------- + +In the following example, the object class is used as return value for the +intersection computation, as there are possibly different return values. + +\code{.cpp} +typedef Cartesian K; +typedef K::Point_2 Point_2; +typedef K::Segment_2 Segment_2; + +Segment_2 segment_1, segment_2; + +std::cin >> segment_1 >> segment_2; + +Object obj = intersection(segment_1, segment_2); + +if (const Point_2 *point = object_cast(&obj)) { + // do something with point +} else if (const Segment_2 *segment = object_cast(&obj)) { + // do something with segment +} else { + // there was no intersection +} +\endcode + +The intersection routine itself looks roughly as follows: + +\code{.cpp} +template < class Kernel > +Object intersection(Segment_2 s1, Segment_2 s2) +{ +if (intersection in a point) { +Point_2 p = ... ; +return make_object(p); +} else if (intersection in a segment) { +Segment_2 s = ... ; +return make_object(s); +} +return Object(); +} +\endcode + +## Constructive Predicates ## + +For testing where a point \f$ p\f$ lies with respect to a plane defined by three +points \f$ q\f$, \f$ r\f$ and \f$ s\f$, one may be tempted to construct the plane +`Plane_3(q,r,s)` and use the method `oriented_side(p)`. +This may pay off if many tests with respect to the plane are made. +Nevertheless, unless the number type is exact, the constructed plane +is only approximated, and round-off errors may lead +`oriented_side(p)` to return an orientation +which is different from the orientation of \f$ p\f$, \f$ q\f$, \f$ r\f$, +and \f$ s\f$. + +In \cgal, we provide predicates in which such +geometric decisions are made directly with a reference to the input points +\f$ p\f$, \f$ q\f$, \f$ r\f$, \f$ s\f$, without an intermediary object like a plane. +For the above test, the recommended way to get the result is to use +`orientation(p,q,r,s)`. For exact number types, the situation is different. +If several tests are to be made with the same +plane, it pays off to construct the plane and to use `oriented_side(p)`. + +\section sectionextensiblekernel Extensible Kernel + +This manual section describe how users can plug user defined +geometric classes in existing \cgal kernels. This is best +illustrated by an example. + +## Introduction ## + +\cgal defines the concept of a geometry kernel. Such a kernel provides types, +construction objects and generalized predicates. Most implementations +of Computational Geometry algorithms and data structures in the basic +library of \cgal were done in a way that classes or functions can be +parametrized with a geometric traits class. + +In most cases this geometric traits class must be a model of the \cgal geometry +kernel concept (but there are some exceptions). + +## An Extensive Example ## + +Assume you have the following point class, where the coordinates are +stored in an array of `doubles`, where we have another data member +`color`, which shows up in the constructor. + +\cgalexample{MyPointC2.h} + +As said earlier the class is pretty minimalistic, for +example it has no `bbox()` method. One +might assume that a basic library algorithm which computes +a bounding box (e.g, to compute the bounding box of a polygon), +will not compile. Luckily it will, because it does not +use of member functions of geometric objects, but it makes +use of the functor `Kernel::Construct_bbox_2`. + +To make the right thing happen with `MyPointC2` we +have to provide the following functor. + +\cgalexample{MyConstruct_bbox_2.h} + +Things are similar for random access to the Cartesian +coordinates of a point. As the coordinates are stored +in an array of `doubles` we can use `double*` as +random access iterator. + +\cgalexample{MyConstruct_coord_iterator.h} + +The last functor we have to provide is the one which constructs +points. That is you are not forced to add the constructor +with the `Origin` as parameter to your class, nor the constructor with +homogeneous coordinates. +The functor is a kind of glue layer between the \cgal algorithms +and your class. + +\cgalexample{MyConstruct_point_2.h} + +Now we are ready to put the puzzle together. We won't explain it in +detail, but you see that there are `typedefs` to the new point +class and the functors. All the other types are inherited. + +\cgalexample{MyKernel.h} + +Finally, we give an example how this new kernel can be used. +Predicates and constructions work with the new point, they +can be a used to construct segments and triangles with, and +data structures from the Basic Library, as the Delaunay +triangulation work with them. + +The kernel itself can be +made robust by plugging it in the `Filtered_kernel`. + +\cgalexample{MyKernel.cpp} + +## Limitations ## + +The point class must have member functions `x()` and `y()` +(and `z()` for the 3d point). We will probably +introduce function objects that take care of coordinate +access. + +As we enforce type equality between `MyKernel::Point_2` and `Point_2`, +the constructor with the color as third argument is not available. + +\section sectionprojectiontraits Projection Traits Classes + +It is sometimes useful to apply 2D algorithms to the projection of 3D points on +a plane. Examples are +triangulated terrains, which are points with elevation, or surface +reconstruction from parallel slices, where one wants to check the simplicity +or orientation of polygons. + +For this purpose \cgal provides several projection traits classes, +which are a model of traits class concepts of 2D triangulations, +2D polygon and 2D convex hull traits classes. The projection traits classes +are listed in the "Is Model for the Concepts" sections of the concepts. + +# Design and Implementation History # + +At a meeting at Utrecht University in January 1995, +Olivier Devillers, Andreas Fabri, Wolfgang Freiseisen, +Geert-Jan Giezeman, Mark Overmars, Stefan Schirra, Otfried Schwarzkopf +(now Otfried Cheong), and Sven Schönherr +discussed the foundations of the \cgal kernel. +Many design and software engineering issues were addressed, +e.g. naming conventions, coupling of classes +(flat versus deep class hierarchy), +memory allocation, programming conventions, mutability of +atomic objects, points and vectors, storing additional information, +orthogonality of operations on the kernel objects, +viewing non-constant-size objects like polygons as +dynamic data structures (and hence not as part of the (innermost) kernel). + +The people attending the meeting delegated the compilation of +a draft specification to Stefan Schirra. +The resulting draft specification was intentionally modeled on \cgal's +precursors \protocgal and \plageo as well as on the geometric part of \leda. +The specification already featured coexistence of +Cartesian and +homogeneous representation of point/vector data and parameterization +by number type(s). +During the discussion of the draft a kernel design group was formed. +The members of this group were Andreas Fabri, Geert-Jan Giezeman, +Lutz Kettner, Stefan Schirra, and Sven Schönherr. +The work of the kernel design group led to significant changes and +improvements of the original design, e.g. the strong separation between +points and vectors. Probably the most important enhancement was the design +of a common superstructure for the previously uncoupled +Cartesian and +homogeneous representations. One can say, that the kernel was designed +by this group. +The kernel was later revised based on suggestions by Hervé Brönnimann, +Bernd Gärtner, Michael Hoffmann, and Lutz Kettner. + +A first version of the kernel was internally made available at the beginning +of the \cgal-project (esprit ltr iv project number 21957). +Since then many more people contributed to the evolution of the kernel +through discussions on the \cgal mailing lists. +The implementation based on +Cartesian representation was (initially) provided +by Andreas Fabri, the homogeneous representation (initially) by Stefan Schirra. +Intersection and distance computations were implemented by Geert-Jan Giezeman. +Further work has been done by Susan Hert on the overall maintenance of the +kernel. +Philippe Guigue has provided efficient intersection tests for 3D triangles. +Andreas Fabri, Michael Hoffmann and Sylvain Pion have improved the support for +the extensibility and adaptability of the kernel. Pedro Machado +Manhães de Castro and Monique Teillaud introduced 3D circles. In 2010, +Pierre Alliez, Stéphane Tayeb and Camille Wormser added intersection constructions +for 3D triangles and efficient intersection tests for bounding boxes. + +## Acknowledgment ## + +This work was supported +by the Graduiertenkolleg 'Algorithmische Diskrete Mathematik', +under grant DFG We 1265/2-1, +and by ESPRIT IV Long Term Research Projects No. 21957 (CGAL) +and No. 28155 (GALIA). + +*/ +} /* namespace CGAL */ + diff --git a/Kernel_23/doc/Kernel_23/PackageDescription.txt b/Kernel_23/doc/Kernel_23/PackageDescription.txt new file mode 100644 index 00000000000..47320497016 --- /dev/null +++ b/Kernel_23/doc/Kernel_23/PackageDescription.txt @@ -0,0 +1,30 @@ + + +/// \defgroup PkgKernel23 2D and 3D Linear Geometry Kernel + +/// \defgroup PkgKernel23Concepts Concepts +/// \ingroup PkgKernel23 + +/// \defgroup PkgKernel23ConceptsGeomObject Kernel Geometric Object Concepts +/// \ingroup PkgKernel23Concepts + +/// \defgroup PkgKernel23ConceptsFunctionObjects Kernel Function Object Concepts +/// \ingroup PkgKernel23Concepts + +/// \defgroup kernel_predef Predefined Kernels +/// \ingroup PkgKernel23 +/// Kernels that come with \cgal + +/*! +\addtogroup PkgKernel23 +\todo check generated documentation +\PkgDescriptionBegin{2D and 3D Linear Geometry Kernel} +\PkgPicture{pointSegmentTriangle.png} +\PkgAuthor{Hervé Brönnimann, Andreas Fabri, Geert-Jan Giezeman, Susan Hert, Michael Hoffmann, Lutz Kettner, Sylvain Pion, and Stefan Schirra} +\PkgDesc{This package contains kernels each containing objects of constant size, such as point, vector, direction, line, ray, segment, circle as well as predicates and constructions for these objects. The kernels mainly differ in the way they handle robustness issues.} +\PkgSince{0.9} +\cgalbib{ cgal:bfghhkps-lgk23-12 } +\license{ Label \ref licensesLGPL "LGPL" } +\PkgDescriptionEnd +*/ + diff --git a/Kernel_23/doc/Kernel_23/fig/IsoCuboid.gif b/Kernel_23/doc/Kernel_23/fig/IsoCuboid.gif new file mode 100644 index 00000000000..81eff04df39 Binary files /dev/null and b/Kernel_23/doc/Kernel_23/fig/IsoCuboid.gif differ diff --git a/Kernel_23/doc/Kernel_23/fig/IsoCuboid.pdf b/Kernel_23/doc/Kernel_23/fig/IsoCuboid.pdf new file mode 100644 index 00000000000..22b840e2b60 Binary files /dev/null and b/Kernel_23/doc/Kernel_23/fig/IsoCuboid.pdf differ diff --git a/Kernel_23/doc/Kernel_23/fig/arrlinthree.gif b/Kernel_23/doc/Kernel_23/fig/arrlinthree.gif new file mode 100644 index 00000000000..db05e69db29 Binary files /dev/null and b/Kernel_23/doc/Kernel_23/fig/arrlinthree.gif differ diff --git a/Kernel_23/doc/Kernel_23/fig/arrlintwo.gif b/Kernel_23/doc/Kernel_23/fig/arrlintwo.gif new file mode 100644 index 00000000000..6a118cf4d32 Binary files /dev/null and b/Kernel_23/doc/Kernel_23/fig/arrlintwo.gif differ diff --git a/Kernel_23/doc/Kernel_23/fig/arrthree.gif b/Kernel_23/doc/Kernel_23/fig/arrthree.gif new file mode 100644 index 00000000000..a5a1e93903c Binary files /dev/null and b/Kernel_23/doc/Kernel_23/fig/arrthree.gif differ diff --git a/Kernel_23/doc/Kernel_23/fig/arrthree2.gif b/Kernel_23/doc/Kernel_23/fig/arrthree2.gif new file mode 100644 index 00000000000..2866c912c89 Binary files /dev/null and b/Kernel_23/doc/Kernel_23/fig/arrthree2.gif differ diff --git a/Kernel_23/doc/Kernel_23/fig/arrtwo.gif b/Kernel_23/doc/Kernel_23/fig/arrtwo.gif new file mode 100644 index 00000000000..cdfdc188cff Binary files /dev/null and b/Kernel_23/doc/Kernel_23/fig/arrtwo.gif differ diff --git a/Kernel_23/doc/Kernel_23/fig/arrtwo2.gif b/Kernel_23/doc/Kernel_23/fig/arrtwo2.gif new file mode 100644 index 00000000000..e988a673b00 Binary files /dev/null and b/Kernel_23/doc/Kernel_23/fig/arrtwo2.gif differ diff --git a/Kernel_23/doc/Kernel_23/fig/compare1.gif b/Kernel_23/doc/Kernel_23/fig/compare1.gif new file mode 100644 index 00000000000..d32ecc63fc3 Binary files /dev/null and b/Kernel_23/doc/Kernel_23/fig/compare1.gif differ diff --git a/Kernel_23/doc/Kernel_23/fig/compare1.pdf b/Kernel_23/doc/Kernel_23/fig/compare1.pdf new file mode 100644 index 00000000000..db9de2710ba Binary files /dev/null and b/Kernel_23/doc/Kernel_23/fig/compare1.pdf differ diff --git a/Kernel_23/doc/Kernel_23/fig/compare2.gif b/Kernel_23/doc/Kernel_23/fig/compare2.gif new file mode 100644 index 00000000000..e2d0e751fd9 Binary files /dev/null and b/Kernel_23/doc/Kernel_23/fig/compare2.gif differ diff --git a/Kernel_23/doc/Kernel_23/fig/compare2.pdf b/Kernel_23/doc/Kernel_23/fig/compare2.pdf new file mode 100644 index 00000000000..aea3a95f573 Binary files /dev/null and b/Kernel_23/doc/Kernel_23/fig/compare2.pdf differ diff --git a/Kernel_23/doc/Kernel_23/fig/compare_x_at_y.gif b/Kernel_23/doc/Kernel_23/fig/compare_x_at_y.gif new file mode 100644 index 00000000000..52b86d6ab91 Binary files /dev/null and b/Kernel_23/doc/Kernel_23/fig/compare_x_at_y.gif differ diff --git a/Kernel_23/doc/Kernel_23/fig/compare_x_at_y.pdf b/Kernel_23/doc/Kernel_23/fig/compare_x_at_y.pdf new file mode 100644 index 00000000000..41b62fc2a98 Binary files /dev/null and b/Kernel_23/doc/Kernel_23/fig/compare_x_at_y.pdf differ diff --git a/Kernel_23/doc/Kernel_23/fig/pointSegmentTriangle.png b/Kernel_23/doc/Kernel_23/fig/pointSegmentTriangle.png new file mode 100644 index 00000000000..97f9bb480a6 Binary files /dev/null and b/Kernel_23/doc/Kernel_23/fig/pointSegmentTriangle.png differ diff --git a/Kernel_23/doc/Kernel_23/fig/transvecthree.gif b/Kernel_23/doc/Kernel_23/fig/transvecthree.gif new file mode 100644 index 00000000000..5a478dbca9a Binary files /dev/null and b/Kernel_23/doc/Kernel_23/fig/transvecthree.gif differ diff --git a/Kernel_23/doc/Kernel_23/fig/transvectwo.gif b/Kernel_23/doc/Kernel_23/fig/transvectwo.gif new file mode 100644 index 00000000000..b7396c6c9c8 Binary files /dev/null and b/Kernel_23/doc/Kernel_23/fig/transvectwo.gif differ