- added a return boolean value to the coordinate functions

- removed some function calles that passed the traits (natural_ and regular_coordinate_function_2)
- small fixes in the doc and in the license
This commit is contained in:
Julia Flötotto 2004-01-27 18:56:09 +00:00
parent 2dce0a3747
commit dca851e516
46 changed files with 291 additions and 493 deletions

2
.gitattributes vendored
View File

@ -937,7 +937,9 @@ Packages/Installation/doc_tex/installation/Fig/a-simp.ipe -text
Packages/Installation/doc_tex/installation/Fig/c-simp.ipe -text
Packages/Installation/doc_tex/installation/Fig/g-simp.ipe -text
Packages/Installation/doc_tex/installation/Fig/l-simp.ipe -text
Packages/Interpolation/doc_tex/Interpolation/nn_coords.gif -text svneol=unset#unset
Packages/Interpolation/doc_tex/Interpolation/nn_coords.ipe -text
Packages/Interpolation/doc_tex/basic/Interpolation/nn_coords.gif svneol=native#unset
Packages/Kernel_23/doc_tex/kernel/IsoCuboid.eps -text
Packages/Kernel_23/doc_tex/kernel/IsoCuboid.gif -text svneol=unset#unset
Packages/Kernel_23/doc_tex/kernel/arrlinthree.gif -text svneol=unset#unset

View File

@ -0,0 +1 @@
\section{Design and Implementation History}

View File

@ -0,0 +1,2 @@
nn_coords.gif

View File

@ -1,3 +1,5 @@
%\ccAuthor{Julia Fl{\"o}totto}
This chapter describes \cgal's interpolation package which implements
natural neighbor coordinate functions as well as different
methods for scattered data interpolation most of which are based on
@ -13,7 +15,7 @@ Scattered data interpolation solves the following problem: given
measures of a function on a set of discrete data points, the task is
to interpolate this function on an arbitrary query point.
More formally, let $\mathcal{P}=\{\mathbf{p_1},\ldots ,\mathbf{p_n}\}$ be a set of
$n$ point in $\mathbb{R}^2$ or $\mathbb{R}^3$ and $\Phi$ be a scalar
$n$ points in $\mathbb{R}^2$ or $\mathbb{R}^3$ and $\Phi$ be a scalar
function defined inside the convex hull of $\mathcal{P}$. We assume that
the function values are known at the points of $\mathcal{P}$, i.e. to
each $\mathbf{p_i} \in \mathcal{P}$, we associate $z_i =
@ -21,4 +23,4 @@ each $\mathbf{p_i} \in \mathcal{P}$, we associate $z_i =
at $\mathbf{p_i}$. It is denoted $\mathbf{g_i}= \nabla
\Phi(\mathbf{p_i})$. The interpolation is carried out for an arbitrary query point
$\mathbf{x}$. Except for interpolation on surfaces, $\mathbf{x}$ must lie
in the convex hull of $\mathcal{P}$.
inside the convex hull of $\mathcal{P}$.

View File

@ -5,4 +5,5 @@
\input{Interpolation/introduction}
\input{Interpolation/coordinates}
\input{Interpolation/surface_coords}
\input{Interpolation/interpolation}
\input{Interpolation/interpolation}
%\input{Interpolation/design_implementation_history}

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -49,7 +49,7 @@ plane $\mathcal{H}$. All predicates and constructions used by
corresponding operators on three-dimensional points. For example, the
power test predicate (which takes three weighted $2D$ points
$p'$, $q'$, $r'$ of the regular triangulation and tests the power
distance of a fourth point $t'$ respect to the power circle orthogonal
distance of a fourth point $t'$ with respect to the power circle orthogonal
to $p$, $q$, $r$) is replaced by a
\ccc{Side_of_plane_centered_sphere_2_3} predicate that tests the
position of a $3D$ point $t$ with respect to the sphere centered on

View File

@ -18,8 +18,8 @@ the container. Given an instance of the container's key type, it
returns a pair of the container's value type and a boolean indicating
whether the retrieval was successful.\\
This class can be used to provide the function\_values and
function\_gradients of the interpolation functions.
This class can be used to provide the values and gradients of the
interpolation functions.
\ccInclude{CGAL/interpolation_functions.h}

View File

@ -1,58 +0,0 @@
% +------------------------------------------------------------------------+
% | Reference manual page: Regular_neighbor_coordinates_traits_2.tex
% +------------------------------------------------------------------------+
% | 06.04.2000 Author
% | Package: Package
% |
\RCSdef{\RCSRegular_neighbor_coordinatetraitsRev}{$Revision$}
\RCSdefDate{\RCSRegular_neighbor_coordinatetraitsDate}{$Date$}
% |
%%RefPage: end of header, begin of main body
% +------------------------------------------------------------------------+
\begin{ccRefClass}{Regular_neighbor_coordinates_traits_2<R, Weight>}
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
%% \ccHtmlIndexC[class]{} %% add further index entries
\ccCreationVariable{traits}
\ccInheritsFrom
\ccc{Regular_triangulation_euclidean_traits_2<R, Weight>}.
\ccDefinition \ccRefName\
%is a model for the concept \ccc{Regular_neighbor_coordinateTraits} and
can be used to instantiate the geometric traits class of the
function \ccc{regular_neighbor_coordinates_2} or the
\ccc{Regular_triangulation_2<Gt, Tds>} passed as parameter to this
function.
\ccInclude{CGAL/Regular_neighbor_coordinates_traits_2.h}
\ccIsModel
\ccRefConceptPage{RegularTriangulationTraits_2}
\ccIndexSubitem[c]{RegularTriangulationTraits_2}{model} \\
\ccTypes
\ccTypedef{typedef R::FT FT;}{}
\ccGlue
\ccTypedef{typedef R::Compute_squared_distance_2
Compute_squared_distance_d;}{}
\ccOperations
\ccAutoIndexingOff
\ccMemberFunction{Compute_squared_distance_d
compute_squared_distance_d_object() const;}{}
\ccSeeAlso
\ccRefIdfierPage{CGAL::regular_neighbor_coordinates_2} \\
\ccRefIdfierPage{CGAL::Regular_triangulation_euclidean_traits_2<R, Weight>} \\
\ccIndexSubitemEnd{Interpolation}{Regular_neighbor_coordinates_traits_2}
\end{ccRefClass}
% +------------------------------------------------------------------------+
%%RefPage: end of main body, begin of footer
% EOF
% +------------------------------------------------------------------------+

View File

@ -57,17 +57,13 @@
\ccGlue
\ccTypedef{typedef K::Ray_3 Ray_2;}{}
\ccGlue
\ccTypedef{typedef K::Direction_3 Direction_2;}{}
\ccGlue
\ccTypedef{typedef K::Vector_3 Vector_2;}{}
\ccGlue
\ccTypedef{typedef K::Construct_triangle_3 Construct_triangle_2;}{}
\ccGlue
\ccTypedef{typedef K::Construct_ray_3 Construct_ray_2;}{}
\ccGlue
\ccTypedef{typedef K::Construct_direction_3 Construct_direction_2;}{}
\ccGlue
\ccTypedef{typedef K::Compare_distance_3 Compare_distance_2;}{}
\ccTypedef{typedef K::Compare_distance_3 Compare_distance_2;}{}
\ccTypedef{Compute_area_3<Rep> Compute_area_2;}
{An instance of this function object class computes the square
root of the result of \ccc{K::Compute_squared_area_3}.

View File

@ -8,7 +8,6 @@
\input{Interpolation_ref/Interpolation_traits_2}
\input{Interpolation_ref/natural_neighbor_coordinates_2}
\input{Interpolation_ref/regular_neighbor_coordinates_2}
\input{Interpolation_ref/Regular_neighbor_coordinates_traits_2}
\input{Interpolation_ref/sibson_gradient_fitting}
\input{Interpolation_ref/GradientFittingTraits}
\input{Interpolation_ref/Interpolation_gradient_fitting_traits_2}

View File

@ -23,71 +23,51 @@ of the triangulation.
\ccInclude{CGAL/natural_neighbor_coordinates_2.h}
\ccFunction{template <class Dt, class OutputIterator, class Traits>
std::pair< OutputIterator, typename Traits::FT >
\ccFunction{template < class Dt, class OutputIterator > CGAL::Triple<
OutputIterator, typename Dt::Geom_traits::FT, bool >
natural_neighbor_coordinates_2(const Dt& dt, const typename
Traits::Point_2& p, OutputIterator out, const Traits& traits,
typename Dt::Face_handle start = typename Dt::Face_handle(NULL));} {
computes the natural neighbor coordinates for \ccc{p} with respect
to the points in the two-dimensional Delaunay triangulation \ccc{dt}.
The template class \ccc{Dt} should be of type
Dt::Geom_traits::Point_2& p, OutputIterator out, typename
Dt::Face_handle start = typename Dt::Face_handle());} { computes the
natural neighbor coordinates for \ccc{p} with respect to the points
in the two-dimensional Delaunay triangulation \ccc{dt}. The
template class \ccc{Dt} should be of type
\ccc{Delaunay_triangulation_2<Traits, Tds>}. The value type of the
\ccc{OutputIterator} is a pair of \ccc{Dt::Point_2} and the
coordinate value of type \ccc{Dt::Geom_traits::FT}. The sequence of
point/coordinate pairs that is computed by the function is placed
starting at \ccc{out}. The function returns a pair with an iterator
that is placed past-the-end of the resulting sequence of
point/coordinate pairs and the normalization factor of the
coordinates.
\ccPrecond %
\ccc{p} lies in the convex hull of the
points in \ccc{dt}.
}
starting at \ccc{out}. The function returns a triple with an
iterator that is placed past-the-end of the resulting sequence of
point/coordinate pairs, the normalization factor of the coordinates
and a boolean value which is set to true iff the coordinate
computation was successful, i.e. if \ccc{p} lies inside the
convex hull of the points in \ccc{dt}. }
\ccFunction{template < class Dt, class OutputIterator > std::pair<
OutputIterator, typename Dt::Geom_traits::FT >
natural_neighbor_coordinates_2(const Dt& dt, const typename
Dt::Geom_traits::Point_2& p, OutputIterator out, typename
Dt::Face_handle start = typename Dt::Face_handle(NULL));}
%
{The same as above. This function instantiates the template parameter
\ccc{Traits} to be \ccc{Dt::Geom_traits}.}
\ccFunction{template <class Dt, class OutputIterator, class Traits,
class EdgeIterator > std::pair< OutputIterator, typename Traits::FT
> natural_neighbor_coordinates_2(const Dt& dt, const typename
Traits::Point_2& p, OutputIterator out, EdgeIterator hole_begin,
EdgeIterator hole_end, const Traits& traits);} { The same as above.
\ccFunction{template <class Dt, class OutputIterator,
class EdgeIterator > CGAL::Triple< OutputIterator, typename Dt::Geom_traits::FT,
bool > natural_neighbor_coordinates_2(const Dt& dt, const typename
Dt::Geom_traits::Point_2& p, OutputIterator out, EdgeIterator hole_begin,
EdgeIterator hole_end);} { The same as above.
\ccc{hole_begin} and \ccc{hole_end} determines the iterator range
over the boundary edges of the conflict zone of \ccc{p} in the
triangulation. It is the result of the function
\ccc{T.get_boundary_of_conflicts(p,std::back_inserter(hole),
start)}, see \ccc{Delaunay_triangulation_2<Traits, Tds>}.}
\ccFunction{template <class Dt, class OutputIterator> std::pair<
OutputIterator, typename Dt::Geom_traits::FT >
natural_neighbor_coordinates_2(const Dt& dt, typename
Dt::Vertex_handle vh, OutputIterator out);}{This function computes
\ccFunction{template <class Dt, class OutputIterator>
CGAL::Triple< OutputIterator, typename Dt::Geom_traits::FT, bool >
natural_neighbor_coordinates_2(const Dt& dt,
typename Dt::Vertex_handle vh, OutputIterator out);}{This function computes
the natural neighbor coordinates of the point \ccc{vh->point()} with respect to
the vertices of \ccc{dt} excluding \ccc{vh->point()}. The same as above for the
remaining parameters.}
\ccFunction{template <class Dt, class OutputIterator>
std::pair< OutputIterator, typename Dt::Geom_traits::FT >
natural_neighbor_coordinates_2(const Dt& dt,
typename Dt::Vertex_handle vh, OutputIterator out);}{The template
parameter \ccc{Traits} of the function above is instantiated to
\ccc{Dt::Geom_traits}.}
\ccHeading{Requirements}
\begin{enumerate}
\item \ccc{Dt} are equivalent to the class
\ccc{Delaunay_triangulation_2<Traits, Tds>}.
\item \ccc{OutputIterator::value_type} is equivalent to
\ccc{std::pair<Dt::Point_2, Dt::Geom_traits::FT>}, i.e.\ a pair
associating a point and its natural neighbor coordinate.
\item \ccc{Traits} is a model of the concept \ccc{DelaunayTriangulationTraits_2}. %\ccIndexMainItem[c]{DelaunayTriangulationTraits_2}.
\item The traits class \ccc{Traits} of \ccc{Dt} is a model of the
concept \ccc{DelaunayTriangulationTraits_2}.
%\ccIndexMainItem[c]{DelaunayTriangulationTraits_2}.
Only the following members of this traits class are used:
\begin{itemize}
\item \ccc{Construct_circumcenter_2}
@ -97,6 +77,9 @@ of the triangulation.
\item[] Additionally, \ccc{Traits} must meet the requirements for
the traits class of the \ccc{polygon_area_2} function.
\end{itemize}
\item \ccc{OutputIterator::value_type} is equivalent to
\ccc{std::pair<Dt::Point_2, Dt::Geom_traits::FT>}, i.e.\ a pair
associating a point and its natural neighbor coordinate.
\end{enumerate}
\ccSeeAlso
@ -105,10 +88,12 @@ of the triangulation.
\ccRefIdfierPage{CGAL::surface_neighbor_coordinates_3} \\
\ccRefIdfierPage{CGAL::regular_neighbor_coordinates_2}
\ccImplementation This function computes the area of the sub-cells stolen from the
Voronoi cells of the points in \ccc{dt} when inserting \ccc{p}. The
total area of the Voronoi cell of \ccc{p} is also computed and
returned by the function.
\ccImplementation This function computes the area of the sub-cells
stolen from the Voronoi cells of the points in \ccc{dt} when inserting
\ccc{p}. The total area of the Voronoi cell of \ccc{p} is also
computed and returned by the function. If \ccc{p} lies outside the
convex hull, the coordinate values cannot be computed and the third
value of the result triple is set to \ccc{false}.
\ccIndexSubitemEnd{Interpolation}{natural_neighbor_coordinates_2}
\end{ccRefFunction}

View File

@ -24,11 +24,11 @@ coordinates regular neighbor coordinates.
\ccInclude{CGAL/regular_neighbor_coordinates_2.h}
\ccFunction{template <class Rt, class OutputIterator, class Traits>
std::pair< OutputIterator, typename Traits::FT >
\ccFunction{template < class Rt, class OutputIterator > CGAL::Triple<
OutputIterator, typename Rt::Geom_traits::FT, bool >
regular_neighbor_coordinates_2(const Rt& rt, const typename
Traits::Weighted_point& p, OutputIterator out, const Traits& traits,
typename Rt::Face_handle start = typename Rt::Face_handle(NULL));} {
Rt::Geom_traits::Weighted_point& p, OutputIterator out, typename
Rt::Face_handle start = typename Rt::Face_handle());} {
computes the regular neighbor coordinates for \ccc{p} with respect
to the weighted points in the two-dimensional regular triangulation
\ccc{rt}. The template class \ccc{Rt} should be of type
@ -36,33 +36,22 @@ coordinates regular neighbor coordinates.
\ccc{OutputIterator} is a pair of \ccc{Rt::Weighted_point} and the
coordinate value of type \ccc{Rt::Geom_traits::FT}. The sequence of
point/coordinate pairs that is computed by the function is placed
starting at \ccc{out}. The function returns a pair with an iterator
that is placed past-the-end of the resulting sequence of
point/coordinate pairs and the normalization factor of the
coordinates.
\ccPrecond %
\ccc{p} lies in the convex hull of the
points in \ccc{rt}.
starting at \ccc{out}. The function returns a triple with an
iterator that is placed past-the-end of the resulting sequence of
point/coordinate pairs, the normalization factor of the coordinates
and a boolean value which is set to true iff the coordinate
computation was successful, i.e. if \ccc{p} lies inside the
convex hull of the points in \ccc{rt}.
}
\ccFunction{template < class Rt, class OutputIterator > std::pair<
OutputIterator, typename Rt::Geom_traits::FT >
regular_neighbor_coordinates_2(const Rt& rt, const typename
Rt::Geom_traits::Weighted_point& p, OutputIterator out, typename
Rt::Face_handle start = typename Rt::Face_handle(NULL));}
%
{The same as above. This function instantiates the template parameter
\ccc{Traits} to be \ccc{Rt::Geom_traits}.}
\ccFunction{template <class Rt, class OutputIterator, class Traits,
class EdgeIterator, class VertexIterator > std::pair<
OutputIterator, typename Traits::FT >
\ccFunction{template <class Rt, class OutputIterator,
class EdgeIterator, class VertexIterator > CGAL::Triple<
OutputIterator, typename Traits::FT, bool >
regular_neighbor_coordinates_2(const Rt& rt, const typename
Traits::Weighted_point& p, OutputIterator out, EdgeIterator
hole_begin, EdgeIterator hole_end, VertexIterator
hidden_vertices_begin, VertexIterator hidden_vertices_end, const
Traits& traits);} { The same as above. \ccc{hole_begin} and
hidden_vertices_begin, VertexIterator hidden_vertices_end);}
{ The same as above. \ccc{hole_begin} and
\ccc{hole_end} determines the iterator range over the boundary edges
of the conflict zone of \ccc{p} in the triangulation \ccc{rt}.
\ccc{hidden_vertices_begin} and \ccc{hidden_vertices_end} determines
@ -73,39 +62,35 @@ coordinates regular neighbor coordinates.
start)}, see \ccc{Regular_triangulation_2<Traits, Tds>}.}
\ccFunction{template <class Rt, class OutputIterator, class Traits>
std::pair< OutputIterator, typename Rt::Geom_traits::FT >
\ccFunction{template <class Rt, class OutputIterator>
CGAL::Triple< OutputIterator, typename Rt::Geom_traits::FT, bool >
regular_neighbor_coordinates_2(const Rt& rt, typename
Rt::Vertex_handle vh, OutputIterator out);}{This function computes
the regular neighbor coordinates of the point \ccc{vh->point()} with respect to
the vertices of \ccc{rt} excluding \ccc{vh->point()}. The same as above for the
remaining parameters.}
\ccFunction{template <class Rt, class OutputIterator>
std::pair< OutputIterator, typename Rt::Geom_traits::FT >
regular_neighbor_coordinates_2(const Rt& rt,
typename Rt::Vertex_handle vh, OutputIterator out);}{The template
parameter \ccc{Traits} of the function above is instantiated to
\ccc{Rt::Geom_traits}.}
\ccHeading{Requirements}
\begin{enumerate}
\item \ccc{Rt} are equivalent to the class
\ccc{Regular_triangulation_2<Traits, Tds>}.
\item The traits class \ccc{Traits} of \ccc{Rt} is a model of the
concept \ccc{RegularTriangulationTraits_2}. It provides the number
type \ccc{FT} which is a model for \ccc{FieldNumberType} and it must
meet the requirements for the traits class of the
\ccc{polygon_area_2} function. A model of this traits class is
\ccc{Regular_triangulation_euclidean_traits_2<K, Weight>}.
\item \ccc{OutputIterator::value_type} is equivalent to
\ccc{std::pair<Rt::Weighted_point, Rt::Geom_traits::FT>}, i.e.\ a pair
associating a point and its regular neighbor coordinate.
\item \ccc{Traits} provides the number type \ccc{FT} which is a model
for \ccc{FieldNumberType} and it must meet the requirements for the
traits class of the \ccc{polygon_area_2} function. A model of this
traits class is \ccc{Regular_neighbor_coordinate_traits_2<K,
Weight>}.
\end{enumerate}
\ccImplementation This function computes the areas stolen from the
Voronoi cells of points in \ccc{rt} by the insertion of \ccc{p}. The
total area of the Voronoi cell of \ccc{p} is also computed and
returned by the function.
returned by the function. If \ccc{p} lies outside the convex hull, the
coordinate values cannot be computed and the third value of the result
triple is set to \ccc{false}.
\ccSeeAlso
\ccRefIdfierPage{CGAL::natural_neighbor_coordinates_2} \\

View File

@ -77,7 +77,7 @@ coordinates.
\ccc{OutputIterator::value_type} is a pair associating a point to a
vector. The sequence of point/gradient pairs computed by this
function is placed starting at \ccc{out}. The function returns an
iterator that is placed past-the-end of the resulting sequence.The
iterator that is placed past-the-end of the resulting sequence. The
requirements are the same as above. The template class \ccc{Rt} must
be equivalent to \ccc{Regular_triangulation_2<Gt, Tds>}.}
@ -94,10 +94,7 @@ coordinates.
\ccImplementation This function implements Sibson's gradient
estimation method based on natural neighbor coordinates
\cite{s-bdnni-81}. It computes the weighted sum of matrices and
vectors. The vector is the multiplied with the inverse matrix yielding
the result.
\cite{s-bdnni-81}.
\ccIndexSubitemEnd{Interpolation}{sibson_gradient_fitting}
\end{ccRefFunction}

View File

@ -20,7 +20,7 @@ surface points associated to a finite set of sample points issued from
the surface. The coordinates are computed from the intersection of the
Voronoi cell of the query point \ccc{p} with the tangent plane to the
surface at \ccc{p}. If the sampling is sufficiently dense, the
coordinate systems meets the properties described in the manual pages
coordinate system meets the properties described in the manual pages
and in \cite{bf-lcss-02},\cite{prisme-these-flototto}. The query
point \ccc{p} needs to lie inside the convex hull of the projection of
the sample points onto the tangent plane at \ccc{p}.
@ -28,7 +28,7 @@ the sample points onto the tangent plane at \ccc{p}.
\ccInclude{CGAL/surface_neighbor_coordinates_3.h}
\ccFunction{template <class OutputIterator, class InputIterator, class
Kernel> std::pair< OutputIterator, typename Kernel::FT >
Kernel> CGAL::Triple< OutputIterator, typename Kernel::FT, bool >
surface_neighbor_coordinates_3(InputIterator first, InputIterator
beyond, const typename Kernel::Point_3& p, const typename
Kernel::Vector_3& normal, OutputIterator out, const Kernel& K);}{
@ -36,24 +36,24 @@ the sample points onto the tangent plane at \ccc{p}.
$\left[\right.$\ccc{first}, \ccc{beyond}$\left.\right)$.
\ccc{InputIterator::value_type} is the point type
\ccc{Kernel::Point_3}. The tangent plane is defined by the point
\ccc{p} and the vector \ccc{normal}. The
parameter \ccc{K} determines the kernel type that will instantiate
\ccc{p} and the vector \ccc{normal}. The parameter \ccc{K}
determines the kernel type that will instantiate
the template parameter of \ccc{Voronoi_intersection_2_traits_3<K>}. \\
The natural neighbor coordinates for \ccc{p} are computed in the
power diagram that results from the intersection of the $3D$ Voronoi
diagram of $\mathcal{P}$ with the tangent plane. The sequence of
point/coordinate pairs that is computed by the function is placed
starting at \ccc{out}. The function returns a pair with an iterator
that is placed past-the-end of the resulting sequence of
point/coordinate pairs and the normalization factor of the
coordinates.
\ccPrecond %
\ccc{p} lies in the convex hull of the projection of the points
$\mathcal{P}$ onto the tangent plane.}
starting at \ccc{out}. The function returns a triple with an
iterator that is placed past-the-end of the resulting sequence of
point/coordinate pairs, the normalization factor of the coordinates
and a boolean value which is set to true iff the coordinate
computation was successful, i.e. if \ccc{p} lies inside the convex
hull of the projection of the points $\mathcal{P}$ onto the tangent
plane.}
\ccFunction{template <class OutputIterator, class InputIterator, class
ITraits> std::pair< OutputIterator, typename ITraits::FT >
ITraits> CGAL::Triple< OutputIterator, typename ITraits::FT, bool >
surface_neighbor_coordinates_3(InputIterator first, InputIterator
beyond, const typename ITraits::Point_2& p,OutputIterator out, const
ITraits& traits);}{ the same as above only that the traits class
@ -61,40 +61,40 @@ the sample points onto the tangent plane at \ccc{p}.
to \ccc{Voronoi_intersection_2_traits_3<K>}.}
The next functions return, in addition, a boolean value that certifies
whether or not, the Voronoi cell of \ccc{p} can be affected by points
that lie outside the input range, i.e.\ outside the ball centered on \ccc{p}
passing through the
furthest sample point from \ccc{p} in the range
The next functions return, in addition, a second boolean value (the
fourth value of the quadrupel) that certifies whether or not, the
Voronoi cell of \ccc{p} can be affected by points that lie outside the
input range, i.e.\ outside the ball centered on \ccc{p} passing
through the furthest sample point from \ccc{p} in the range
$\left[\right.$\ccc{first}, \ccc{beyond}$\left.\right)$. If the sample
points are collected by a $k$-nearest neighbor or a range search
query, this permits to check whether the neighborhood which has been
considered is large enough.
\ccFunction{template <class OutputIterator, class InputIterator, class
Kernel> Triple< OutputIterator, typename Kernel::FT, bool >
surface_neighbor_coordinates_certified_3(InputIterator first,
Kernel> CGAL::Quadruple< OutputIterator, typename Kernel::FT, bool,
bool > surface_neighbor_coordinates_certified_3(InputIterator first,
InputIterator beyond, const typename Kernel::Point_3& p, const
typename Kernel::Vector_3& normal, OutputIterator out, const Kernel&
K);}{Similar to the first function. The additional third return
K);}{Similar to the first function. The additional fourth return
value is \ccc{true} if the furthest point in the range
$\left[\right.$\ccc{first}, \ccc{beyond}$\left.\right)$ is further
away from \ccc{p} than twice the distance from \ccc{p} to the
furthest vertex of the intersection of the Voronoi cell of \ccc{p}
with the tangent plane defined by \ccc{(p,normal)}. It is
\ccc{false} otherwise.} \ccFunction{template <class OutputIterator,
class InputIterator, class Kernel> Triple< OutputIterator, typename
Kernel::FT, bool >
class InputIterator, class Kernel> CGAL::Quadruple< OutputIterator,
typename Kernel::FT, bool, bool >
surface_neighbor_coordinates_certified_3(InputIterator first,
InputIterator beyond, const typename Kernel::Point_2& p, const
typename Kernel::FT& max_distance, OutputIterator out, const Kernel&
kernel);} { The same as above except that this function takes the
maximal distance from p to the points in the range
$\left[\right.$\ccc{first}, \ccc{beyond}$\left.\right)$ as additional
parameter.}
$\left[\right.$\ccc{first}, \ccc{beyond}$\left.\right)$ as
additional parameter.}
\ccFunction{template <class OutputIterator, class InputIterator, class
ITraits> Triple< OutputIterator, typename ITraits::FT, bool >
ITraits> CGAL::Quadruple< OutputIterator, typename ITraits::FT, bool, bool >
surface_neighbor_coordinates_certified_3(InputIterator first,
InputIterator beyond, const typename ITraits::Point_2& p,
OutputIterator out, const ITraits& traits);}{The same as above only
@ -103,7 +103,7 @@ considered is large enough.
to \ccc{Voronoi_intersection_2_traits_3<K>}.}
\ccFunction{template <class OutputIterator, class InputIterator, class
ITraits> Triple< OutputIterator, typename ITraits::FT, bool >
ITraits> CGAL::Quadruple< OutputIterator, typename ITraits::FT, bool, bool >
surface_neighbor_coordinates_certified_3(InputIterator first,
InputIterator beyond, const typename ITraits::Point_2& p, const
typename ITraits::FT& max_distance, OutputIterator out, const
@ -117,11 +117,11 @@ necessarily neighbors in the Delaunay triangulation of $\mathcal{P}
\cup \{p\}$.
\ccFunction{template < class Dt, class OutputIterator >
std::pair< OutputIterator, typename Dt::Geom_traits::FT >
CGAL::Triple< OutputIterator, typename Dt::Geom_traits::FT, bool >
surface_neighbor_coordinates_3(const Dt& dt, const typename
Dt::Geom_traits::Point_2& p, const typename
Dt::Geom_traits::Vector_3& normal, OutputIterator out, typename
Dt::Face_handle start = typename Dt::Face_handle(NULL));} {computes
Dt::Face_handle start = typename Dt::Face_handle());} {computes
the surface neighbor coordinates with respect to the points that are
vertices of the Delaunay triangulation \ccc{dt}. The type \ccc{Dt}
must be equivalent to \ccc{Delaunay_triangulation_3<Gt, Tds>}. The
@ -133,11 +133,11 @@ necessarily neighbors in the Delaunay triangulation of $\mathcal{P}
\ccFunction{template < class Dt, class OutputIterator,
class ITraits> std::pair< OutputIterator, typename
Dt::Geom_traits::FT > surface_neighbor_coordinates_3(const Dt& dt,
class ITraits> CGAL::Triple< OutputIterator, typename
Dt::Geom_traits::FT, bool > surface_neighbor_coordinates_3(const Dt& dt,
const typename Dt::Geom_traits::Point_2& p, OutputIterator out,
const ITraits& traits, typename Dt::Face_handle start = typename
Dt::Face_handle(NULL));}
Dt::Face_handle());}
%
{The same as above only that the parameter \ccc{traits} instantiates
the geometric traits class. Its type \ccc{ITraits} must be
@ -163,7 +163,8 @@ necessarily neighbors in the Delaunay triangulation of $\mathcal{P}
\ccImplementation This functions construct the regular triangulation of the input points
instantiated with \ccc{Voronoi_intersection_2_traits_3<Kernel>} or \ccc{ITraits} if provided.
They return the result of the function call
\ccc{regular_neighbor_coordinates_2} with the regular triangulation and \ccc{p} as arguments.
\ccc{regular_neighbor_coordinates_2}
with the regular triangulation and \ccc{p} as arguments.
\ccIndexSubitemEnd{Interpolation}{surface_neighbor_coordinates_3}
\end{ccRefFunction}

View File

@ -115,7 +115,7 @@ necessarily neighbors in the Delaunay triangulation of $\mathcal{P}
surface_neighbors_3(const Dt& dt, const typename
Dt::Geom_traits::Point_2& p, const typename
Dt::Geom_traits::Vector_3& normal, OutputIterator out, typename
Dt::Face_handle start = typename Dt::Face_handle(NULL));} {computes
Dt::Face_handle start = typename Dt::Face_handle());} {computes
the surface neighbor coordinates with respect to the points that are
vertices of the Delaunay triangulation \ccc{dt}. The type \ccc{Dt}
must be equivalent to \ccc{Delaunay_triangulation_3<Gt, Tds>}. The
@ -131,7 +131,7 @@ necessarily neighbors in the Delaunay triangulation of $\mathcal{P}
OutputIterator surface_neighbors_3(const Dt& dt,
const typename Dt::Geom_traits::Point_2& p, OutputIterator out,
const ITraits& traits, typename Dt::Face_handle start = typename
Dt::Face_handle(NULL));}
Dt::Face_handle());}
%
{The same as above only that the parameter \ccc{traits} instantiates
the geometric traits class. Its type \ccc{ITraits} must be

View File

@ -0,0 +1 @@
\section{Design and Implementation History}

View File

@ -0,0 +1,2 @@
nn_coords.gif

View File

@ -1,3 +1,5 @@
%\ccAuthor{Julia Fl{\"o}totto}
This chapter describes \cgal's interpolation package which implements
natural neighbor coordinate functions as well as different
methods for scattered data interpolation most of which are based on
@ -13,7 +15,7 @@ Scattered data interpolation solves the following problem: given
measures of a function on a set of discrete data points, the task is
to interpolate this function on an arbitrary query point.
More formally, let $\mathcal{P}=\{\mathbf{p_1},\ldots ,\mathbf{p_n}\}$ be a set of
$n$ point in $\mathbb{R}^2$ or $\mathbb{R}^3$ and $\Phi$ be a scalar
$n$ points in $\mathbb{R}^2$ or $\mathbb{R}^3$ and $\Phi$ be a scalar
function defined inside the convex hull of $\mathcal{P}$. We assume that
the function values are known at the points of $\mathcal{P}$, i.e. to
each $\mathbf{p_i} \in \mathcal{P}$, we associate $z_i =
@ -21,4 +23,4 @@ each $\mathbf{p_i} \in \mathcal{P}$, we associate $z_i =
at $\mathbf{p_i}$. It is denoted $\mathbf{g_i}= \nabla
\Phi(\mathbf{p_i})$. The interpolation is carried out for an arbitrary query point
$\mathbf{x}$. Except for interpolation on surfaces, $\mathbf{x}$ must lie
in the convex hull of $\mathcal{P}$.
inside the convex hull of $\mathcal{P}$.

View File

@ -5,4 +5,5 @@
\input{Interpolation/introduction}
\input{Interpolation/coordinates}
\input{Interpolation/surface_coords}
\input{Interpolation/interpolation}
\input{Interpolation/interpolation}
%\input{Interpolation/design_implementation_history}

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@ -49,7 +49,7 @@ plane $\mathcal{H}$. All predicates and constructions used by
corresponding operators on three-dimensional points. For example, the
power test predicate (which takes three weighted $2D$ points
$p'$, $q'$, $r'$ of the regular triangulation and tests the power
distance of a fourth point $t'$ respect to the power circle orthogonal
distance of a fourth point $t'$ with respect to the power circle orthogonal
to $p$, $q$, $r$) is replaced by a
\ccc{Side_of_plane_centered_sphere_2_3} predicate that tests the
position of a $3D$ point $t$ with respect to the sphere centered on

View File

@ -18,8 +18,8 @@ the container. Given an instance of the container's key type, it
returns a pair of the container's value type and a boolean indicating
whether the retrieval was successful.\\
This class can be used to provide the function\_values and
function\_gradients of the interpolation functions.
This class can be used to provide the values and gradients of the
interpolation functions.
\ccInclude{CGAL/interpolation_functions.h}

View File

@ -1,58 +0,0 @@
% +------------------------------------------------------------------------+
% | Reference manual page: Regular_neighbor_coordinates_traits_2.tex
% +------------------------------------------------------------------------+
% | 06.04.2000 Author
% | Package: Package
% |
\RCSdef{\RCSRegular_neighbor_coordinatetraitsRev}{$Revision$}
\RCSdefDate{\RCSRegular_neighbor_coordinatetraitsDate}{$Date$}
% |
%%RefPage: end of header, begin of main body
% +------------------------------------------------------------------------+
\begin{ccRefClass}{Regular_neighbor_coordinates_traits_2<R, Weight>}
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
%% \ccHtmlIndexC[class]{} %% add further index entries
\ccCreationVariable{traits}
\ccInheritsFrom
\ccc{Regular_triangulation_euclidean_traits_2<R, Weight>}.
\ccDefinition \ccRefName\
%is a model for the concept \ccc{Regular_neighbor_coordinateTraits} and
can be used to instantiate the geometric traits class of the
function \ccc{regular_neighbor_coordinates_2} or the
\ccc{Regular_triangulation_2<Gt, Tds>} passed as parameter to this
function.
\ccInclude{CGAL/Regular_neighbor_coordinates_traits_2.h}
\ccIsModel
\ccRefConceptPage{RegularTriangulationTraits_2}
\ccIndexSubitem[c]{RegularTriangulationTraits_2}{model} \\
\ccTypes
\ccTypedef{typedef R::FT FT;}{}
\ccGlue
\ccTypedef{typedef R::Compute_squared_distance_2
Compute_squared_distance_d;}{}
\ccOperations
\ccAutoIndexingOff
\ccMemberFunction{Compute_squared_distance_d
compute_squared_distance_d_object() const;}{}
\ccSeeAlso
\ccRefIdfierPage{CGAL::regular_neighbor_coordinates_2} \\
\ccRefIdfierPage{CGAL::Regular_triangulation_euclidean_traits_2<R, Weight>} \\
\ccIndexSubitemEnd{Interpolation}{Regular_neighbor_coordinates_traits_2}
\end{ccRefClass}
% +------------------------------------------------------------------------+
%%RefPage: end of main body, begin of footer
% EOF
% +------------------------------------------------------------------------+

View File

@ -57,17 +57,13 @@
\ccGlue
\ccTypedef{typedef K::Ray_3 Ray_2;}{}
\ccGlue
\ccTypedef{typedef K::Direction_3 Direction_2;}{}
\ccGlue
\ccTypedef{typedef K::Vector_3 Vector_2;}{}
\ccGlue
\ccTypedef{typedef K::Construct_triangle_3 Construct_triangle_2;}{}
\ccGlue
\ccTypedef{typedef K::Construct_ray_3 Construct_ray_2;}{}
\ccGlue
\ccTypedef{typedef K::Construct_direction_3 Construct_direction_2;}{}
\ccGlue
\ccTypedef{typedef K::Compare_distance_3 Compare_distance_2;}{}
\ccTypedef{typedef K::Compare_distance_3 Compare_distance_2;}{}
\ccTypedef{Compute_area_3<Rep> Compute_area_2;}
{An instance of this function object class computes the square
root of the result of \ccc{K::Compute_squared_area_3}.

View File

@ -8,7 +8,6 @@
\input{Interpolation_ref/Interpolation_traits_2}
\input{Interpolation_ref/natural_neighbor_coordinates_2}
\input{Interpolation_ref/regular_neighbor_coordinates_2}
\input{Interpolation_ref/Regular_neighbor_coordinates_traits_2}
\input{Interpolation_ref/sibson_gradient_fitting}
\input{Interpolation_ref/GradientFittingTraits}
\input{Interpolation_ref/Interpolation_gradient_fitting_traits_2}

View File

@ -23,71 +23,51 @@ of the triangulation.
\ccInclude{CGAL/natural_neighbor_coordinates_2.h}
\ccFunction{template <class Dt, class OutputIterator, class Traits>
std::pair< OutputIterator, typename Traits::FT >
\ccFunction{template < class Dt, class OutputIterator > CGAL::Triple<
OutputIterator, typename Dt::Geom_traits::FT, bool >
natural_neighbor_coordinates_2(const Dt& dt, const typename
Traits::Point_2& p, OutputIterator out, const Traits& traits,
typename Dt::Face_handle start = typename Dt::Face_handle(NULL));} {
computes the natural neighbor coordinates for \ccc{p} with respect
to the points in the two-dimensional Delaunay triangulation \ccc{dt}.
The template class \ccc{Dt} should be of type
Dt::Geom_traits::Point_2& p, OutputIterator out, typename
Dt::Face_handle start = typename Dt::Face_handle());} { computes the
natural neighbor coordinates for \ccc{p} with respect to the points
in the two-dimensional Delaunay triangulation \ccc{dt}. The
template class \ccc{Dt} should be of type
\ccc{Delaunay_triangulation_2<Traits, Tds>}. The value type of the
\ccc{OutputIterator} is a pair of \ccc{Dt::Point_2} and the
coordinate value of type \ccc{Dt::Geom_traits::FT}. The sequence of
point/coordinate pairs that is computed by the function is placed
starting at \ccc{out}. The function returns a pair with an iterator
that is placed past-the-end of the resulting sequence of
point/coordinate pairs and the normalization factor of the
coordinates.
\ccPrecond %
\ccc{p} lies in the convex hull of the
points in \ccc{dt}.
}
starting at \ccc{out}. The function returns a triple with an
iterator that is placed past-the-end of the resulting sequence of
point/coordinate pairs, the normalization factor of the coordinates
and a boolean value which is set to true iff the coordinate
computation was successful, i.e. if \ccc{p} lies inside the
convex hull of the points in \ccc{dt}. }
\ccFunction{template < class Dt, class OutputIterator > std::pair<
OutputIterator, typename Dt::Geom_traits::FT >
natural_neighbor_coordinates_2(const Dt& dt, const typename
Dt::Geom_traits::Point_2& p, OutputIterator out, typename
Dt::Face_handle start = typename Dt::Face_handle(NULL));}
%
{The same as above. This function instantiates the template parameter
\ccc{Traits} to be \ccc{Dt::Geom_traits}.}
\ccFunction{template <class Dt, class OutputIterator, class Traits,
class EdgeIterator > std::pair< OutputIterator, typename Traits::FT
> natural_neighbor_coordinates_2(const Dt& dt, const typename
Traits::Point_2& p, OutputIterator out, EdgeIterator hole_begin,
EdgeIterator hole_end, const Traits& traits);} { The same as above.
\ccFunction{template <class Dt, class OutputIterator,
class EdgeIterator > CGAL::Triple< OutputIterator, typename Dt::Geom_traits::FT,
bool > natural_neighbor_coordinates_2(const Dt& dt, const typename
Dt::Geom_traits::Point_2& p, OutputIterator out, EdgeIterator hole_begin,
EdgeIterator hole_end);} { The same as above.
\ccc{hole_begin} and \ccc{hole_end} determines the iterator range
over the boundary edges of the conflict zone of \ccc{p} in the
triangulation. It is the result of the function
\ccc{T.get_boundary_of_conflicts(p,std::back_inserter(hole),
start)}, see \ccc{Delaunay_triangulation_2<Traits, Tds>}.}
\ccFunction{template <class Dt, class OutputIterator> std::pair<
OutputIterator, typename Dt::Geom_traits::FT >
natural_neighbor_coordinates_2(const Dt& dt, typename
Dt::Vertex_handle vh, OutputIterator out);}{This function computes
\ccFunction{template <class Dt, class OutputIterator>
CGAL::Triple< OutputIterator, typename Dt::Geom_traits::FT, bool >
natural_neighbor_coordinates_2(const Dt& dt,
typename Dt::Vertex_handle vh, OutputIterator out);}{This function computes
the natural neighbor coordinates of the point \ccc{vh->point()} with respect to
the vertices of \ccc{dt} excluding \ccc{vh->point()}. The same as above for the
remaining parameters.}
\ccFunction{template <class Dt, class OutputIterator>
std::pair< OutputIterator, typename Dt::Geom_traits::FT >
natural_neighbor_coordinates_2(const Dt& dt,
typename Dt::Vertex_handle vh, OutputIterator out);}{The template
parameter \ccc{Traits} of the function above is instantiated to
\ccc{Dt::Geom_traits}.}
\ccHeading{Requirements}
\begin{enumerate}
\item \ccc{Dt} are equivalent to the class
\ccc{Delaunay_triangulation_2<Traits, Tds>}.
\item \ccc{OutputIterator::value_type} is equivalent to
\ccc{std::pair<Dt::Point_2, Dt::Geom_traits::FT>}, i.e.\ a pair
associating a point and its natural neighbor coordinate.
\item \ccc{Traits} is a model of the concept \ccc{DelaunayTriangulationTraits_2}. %\ccIndexMainItem[c]{DelaunayTriangulationTraits_2}.
\item The traits class \ccc{Traits} of \ccc{Dt} is a model of the
concept \ccc{DelaunayTriangulationTraits_2}.
%\ccIndexMainItem[c]{DelaunayTriangulationTraits_2}.
Only the following members of this traits class are used:
\begin{itemize}
\item \ccc{Construct_circumcenter_2}
@ -97,6 +77,9 @@ of the triangulation.
\item[] Additionally, \ccc{Traits} must meet the requirements for
the traits class of the \ccc{polygon_area_2} function.
\end{itemize}
\item \ccc{OutputIterator::value_type} is equivalent to
\ccc{std::pair<Dt::Point_2, Dt::Geom_traits::FT>}, i.e.\ a pair
associating a point and its natural neighbor coordinate.
\end{enumerate}
\ccSeeAlso
@ -105,10 +88,12 @@ of the triangulation.
\ccRefIdfierPage{CGAL::surface_neighbor_coordinates_3} \\
\ccRefIdfierPage{CGAL::regular_neighbor_coordinates_2}
\ccImplementation This function computes the area of the sub-cells stolen from the
Voronoi cells of the points in \ccc{dt} when inserting \ccc{p}. The
total area of the Voronoi cell of \ccc{p} is also computed and
returned by the function.
\ccImplementation This function computes the area of the sub-cells
stolen from the Voronoi cells of the points in \ccc{dt} when inserting
\ccc{p}. The total area of the Voronoi cell of \ccc{p} is also
computed and returned by the function. If \ccc{p} lies outside the
convex hull, the coordinate values cannot be computed and the third
value of the result triple is set to \ccc{false}.
\ccIndexSubitemEnd{Interpolation}{natural_neighbor_coordinates_2}
\end{ccRefFunction}

View File

@ -24,11 +24,11 @@ coordinates regular neighbor coordinates.
\ccInclude{CGAL/regular_neighbor_coordinates_2.h}
\ccFunction{template <class Rt, class OutputIterator, class Traits>
std::pair< OutputIterator, typename Traits::FT >
\ccFunction{template < class Rt, class OutputIterator > CGAL::Triple<
OutputIterator, typename Rt::Geom_traits::FT, bool >
regular_neighbor_coordinates_2(const Rt& rt, const typename
Traits::Weighted_point& p, OutputIterator out, const Traits& traits,
typename Rt::Face_handle start = typename Rt::Face_handle(NULL));} {
Rt::Geom_traits::Weighted_point& p, OutputIterator out, typename
Rt::Face_handle start = typename Rt::Face_handle());} {
computes the regular neighbor coordinates for \ccc{p} with respect
to the weighted points in the two-dimensional regular triangulation
\ccc{rt}. The template class \ccc{Rt} should be of type
@ -36,33 +36,22 @@ coordinates regular neighbor coordinates.
\ccc{OutputIterator} is a pair of \ccc{Rt::Weighted_point} and the
coordinate value of type \ccc{Rt::Geom_traits::FT}. The sequence of
point/coordinate pairs that is computed by the function is placed
starting at \ccc{out}. The function returns a pair with an iterator
that is placed past-the-end of the resulting sequence of
point/coordinate pairs and the normalization factor of the
coordinates.
\ccPrecond %
\ccc{p} lies in the convex hull of the
points in \ccc{rt}.
starting at \ccc{out}. The function returns a triple with an
iterator that is placed past-the-end of the resulting sequence of
point/coordinate pairs, the normalization factor of the coordinates
and a boolean value which is set to true iff the coordinate
computation was successful, i.e. if \ccc{p} lies inside the
convex hull of the points in \ccc{rt}.
}
\ccFunction{template < class Rt, class OutputIterator > std::pair<
OutputIterator, typename Rt::Geom_traits::FT >
regular_neighbor_coordinates_2(const Rt& rt, const typename
Rt::Geom_traits::Weighted_point& p, OutputIterator out, typename
Rt::Face_handle start = typename Rt::Face_handle(NULL));}
%
{The same as above. This function instantiates the template parameter
\ccc{Traits} to be \ccc{Rt::Geom_traits}.}
\ccFunction{template <class Rt, class OutputIterator, class Traits,
class EdgeIterator, class VertexIterator > std::pair<
OutputIterator, typename Traits::FT >
\ccFunction{template <class Rt, class OutputIterator,
class EdgeIterator, class VertexIterator > CGAL::Triple<
OutputIterator, typename Traits::FT, bool >
regular_neighbor_coordinates_2(const Rt& rt, const typename
Traits::Weighted_point& p, OutputIterator out, EdgeIterator
hole_begin, EdgeIterator hole_end, VertexIterator
hidden_vertices_begin, VertexIterator hidden_vertices_end, const
Traits& traits);} { The same as above. \ccc{hole_begin} and
hidden_vertices_begin, VertexIterator hidden_vertices_end);}
{ The same as above. \ccc{hole_begin} and
\ccc{hole_end} determines the iterator range over the boundary edges
of the conflict zone of \ccc{p} in the triangulation \ccc{rt}.
\ccc{hidden_vertices_begin} and \ccc{hidden_vertices_end} determines
@ -73,39 +62,35 @@ coordinates regular neighbor coordinates.
start)}, see \ccc{Regular_triangulation_2<Traits, Tds>}.}
\ccFunction{template <class Rt, class OutputIterator, class Traits>
std::pair< OutputIterator, typename Rt::Geom_traits::FT >
\ccFunction{template <class Rt, class OutputIterator>
CGAL::Triple< OutputIterator, typename Rt::Geom_traits::FT, bool >
regular_neighbor_coordinates_2(const Rt& rt, typename
Rt::Vertex_handle vh, OutputIterator out);}{This function computes
the regular neighbor coordinates of the point \ccc{vh->point()} with respect to
the vertices of \ccc{rt} excluding \ccc{vh->point()}. The same as above for the
remaining parameters.}
\ccFunction{template <class Rt, class OutputIterator>
std::pair< OutputIterator, typename Rt::Geom_traits::FT >
regular_neighbor_coordinates_2(const Rt& rt,
typename Rt::Vertex_handle vh, OutputIterator out);}{The template
parameter \ccc{Traits} of the function above is instantiated to
\ccc{Rt::Geom_traits}.}
\ccHeading{Requirements}
\begin{enumerate}
\item \ccc{Rt} are equivalent to the class
\ccc{Regular_triangulation_2<Traits, Tds>}.
\item The traits class \ccc{Traits} of \ccc{Rt} is a model of the
concept \ccc{RegularTriangulationTraits_2}. It provides the number
type \ccc{FT} which is a model for \ccc{FieldNumberType} and it must
meet the requirements for the traits class of the
\ccc{polygon_area_2} function. A model of this traits class is
\ccc{Regular_triangulation_euclidean_traits_2<K, Weight>}.
\item \ccc{OutputIterator::value_type} is equivalent to
\ccc{std::pair<Rt::Weighted_point, Rt::Geom_traits::FT>}, i.e.\ a pair
associating a point and its regular neighbor coordinate.
\item \ccc{Traits} provides the number type \ccc{FT} which is a model
for \ccc{FieldNumberType} and it must meet the requirements for the
traits class of the \ccc{polygon_area_2} function. A model of this
traits class is \ccc{Regular_neighbor_coordinate_traits_2<K,
Weight>}.
\end{enumerate}
\ccImplementation This function computes the areas stolen from the
Voronoi cells of points in \ccc{rt} by the insertion of \ccc{p}. The
total area of the Voronoi cell of \ccc{p} is also computed and
returned by the function.
returned by the function. If \ccc{p} lies outside the convex hull, the
coordinate values cannot be computed and the third value of the result
triple is set to \ccc{false}.
\ccSeeAlso
\ccRefIdfierPage{CGAL::natural_neighbor_coordinates_2} \\

View File

@ -77,7 +77,7 @@ coordinates.
\ccc{OutputIterator::value_type} is a pair associating a point to a
vector. The sequence of point/gradient pairs computed by this
function is placed starting at \ccc{out}. The function returns an
iterator that is placed past-the-end of the resulting sequence.The
iterator that is placed past-the-end of the resulting sequence. The
requirements are the same as above. The template class \ccc{Rt} must
be equivalent to \ccc{Regular_triangulation_2<Gt, Tds>}.}
@ -94,10 +94,7 @@ coordinates.
\ccImplementation This function implements Sibson's gradient
estimation method based on natural neighbor coordinates
\cite{s-bdnni-81}. It computes the weighted sum of matrices and
vectors. The vector is the multiplied with the inverse matrix yielding
the result.
\cite{s-bdnni-81}.
\ccIndexSubitemEnd{Interpolation}{sibson_gradient_fitting}
\end{ccRefFunction}

View File

@ -20,7 +20,7 @@ surface points associated to a finite set of sample points issued from
the surface. The coordinates are computed from the intersection of the
Voronoi cell of the query point \ccc{p} with the tangent plane to the
surface at \ccc{p}. If the sampling is sufficiently dense, the
coordinate systems meets the properties described in the manual pages
coordinate system meets the properties described in the manual pages
and in \cite{bf-lcss-02},\cite{prisme-these-flototto}. The query
point \ccc{p} needs to lie inside the convex hull of the projection of
the sample points onto the tangent plane at \ccc{p}.
@ -28,7 +28,7 @@ the sample points onto the tangent plane at \ccc{p}.
\ccInclude{CGAL/surface_neighbor_coordinates_3.h}
\ccFunction{template <class OutputIterator, class InputIterator, class
Kernel> std::pair< OutputIterator, typename Kernel::FT >
Kernel> CGAL::Triple< OutputIterator, typename Kernel::FT, bool >
surface_neighbor_coordinates_3(InputIterator first, InputIterator
beyond, const typename Kernel::Point_3& p, const typename
Kernel::Vector_3& normal, OutputIterator out, const Kernel& K);}{
@ -36,24 +36,24 @@ the sample points onto the tangent plane at \ccc{p}.
$\left[\right.$\ccc{first}, \ccc{beyond}$\left.\right)$.
\ccc{InputIterator::value_type} is the point type
\ccc{Kernel::Point_3}. The tangent plane is defined by the point
\ccc{p} and the vector \ccc{normal}. The
parameter \ccc{K} determines the kernel type that will instantiate
\ccc{p} and the vector \ccc{normal}. The parameter \ccc{K}
determines the kernel type that will instantiate
the template parameter of \ccc{Voronoi_intersection_2_traits_3<K>}. \\
The natural neighbor coordinates for \ccc{p} are computed in the
power diagram that results from the intersection of the $3D$ Voronoi
diagram of $\mathcal{P}$ with the tangent plane. The sequence of
point/coordinate pairs that is computed by the function is placed
starting at \ccc{out}. The function returns a pair with an iterator
that is placed past-the-end of the resulting sequence of
point/coordinate pairs and the normalization factor of the
coordinates.
\ccPrecond %
\ccc{p} lies in the convex hull of the projection of the points
$\mathcal{P}$ onto the tangent plane.}
starting at \ccc{out}. The function returns a triple with an
iterator that is placed past-the-end of the resulting sequence of
point/coordinate pairs, the normalization factor of the coordinates
and a boolean value which is set to true iff the coordinate
computation was successful, i.e. if \ccc{p} lies inside the convex
hull of the projection of the points $\mathcal{P}$ onto the tangent
plane.}
\ccFunction{template <class OutputIterator, class InputIterator, class
ITraits> std::pair< OutputIterator, typename ITraits::FT >
ITraits> CGAL::Triple< OutputIterator, typename ITraits::FT, bool >
surface_neighbor_coordinates_3(InputIterator first, InputIterator
beyond, const typename ITraits::Point_2& p,OutputIterator out, const
ITraits& traits);}{ the same as above only that the traits class
@ -61,40 +61,40 @@ the sample points onto the tangent plane at \ccc{p}.
to \ccc{Voronoi_intersection_2_traits_3<K>}.}
The next functions return, in addition, a boolean value that certifies
whether or not, the Voronoi cell of \ccc{p} can be affected by points
that lie outside the input range, i.e.\ outside the ball centered on \ccc{p}
passing through the
furthest sample point from \ccc{p} in the range
The next functions return, in addition, a second boolean value (the
fourth value of the quadrupel) that certifies whether or not, the
Voronoi cell of \ccc{p} can be affected by points that lie outside the
input range, i.e.\ outside the ball centered on \ccc{p} passing
through the furthest sample point from \ccc{p} in the range
$\left[\right.$\ccc{first}, \ccc{beyond}$\left.\right)$. If the sample
points are collected by a $k$-nearest neighbor or a range search
query, this permits to check whether the neighborhood which has been
considered is large enough.
\ccFunction{template <class OutputIterator, class InputIterator, class
Kernel> Triple< OutputIterator, typename Kernel::FT, bool >
surface_neighbor_coordinates_certified_3(InputIterator first,
Kernel> CGAL::Quadruple< OutputIterator, typename Kernel::FT, bool,
bool > surface_neighbor_coordinates_certified_3(InputIterator first,
InputIterator beyond, const typename Kernel::Point_3& p, const
typename Kernel::Vector_3& normal, OutputIterator out, const Kernel&
K);}{Similar to the first function. The additional third return
K);}{Similar to the first function. The additional fourth return
value is \ccc{true} if the furthest point in the range
$\left[\right.$\ccc{first}, \ccc{beyond}$\left.\right)$ is further
away from \ccc{p} than twice the distance from \ccc{p} to the
furthest vertex of the intersection of the Voronoi cell of \ccc{p}
with the tangent plane defined by \ccc{(p,normal)}. It is
\ccc{false} otherwise.} \ccFunction{template <class OutputIterator,
class InputIterator, class Kernel> Triple< OutputIterator, typename
Kernel::FT, bool >
class InputIterator, class Kernel> CGAL::Quadruple< OutputIterator,
typename Kernel::FT, bool, bool >
surface_neighbor_coordinates_certified_3(InputIterator first,
InputIterator beyond, const typename Kernel::Point_2& p, const
typename Kernel::FT& max_distance, OutputIterator out, const Kernel&
kernel);} { The same as above except that this function takes the
maximal distance from p to the points in the range
$\left[\right.$\ccc{first}, \ccc{beyond}$\left.\right)$ as additional
parameter.}
$\left[\right.$\ccc{first}, \ccc{beyond}$\left.\right)$ as
additional parameter.}
\ccFunction{template <class OutputIterator, class InputIterator, class
ITraits> Triple< OutputIterator, typename ITraits::FT, bool >
ITraits> CGAL::Quadruple< OutputIterator, typename ITraits::FT, bool, bool >
surface_neighbor_coordinates_certified_3(InputIterator first,
InputIterator beyond, const typename ITraits::Point_2& p,
OutputIterator out, const ITraits& traits);}{The same as above only
@ -103,7 +103,7 @@ considered is large enough.
to \ccc{Voronoi_intersection_2_traits_3<K>}.}
\ccFunction{template <class OutputIterator, class InputIterator, class
ITraits> Triple< OutputIterator, typename ITraits::FT, bool >
ITraits> CGAL::Quadruple< OutputIterator, typename ITraits::FT, bool, bool >
surface_neighbor_coordinates_certified_3(InputIterator first,
InputIterator beyond, const typename ITraits::Point_2& p, const
typename ITraits::FT& max_distance, OutputIterator out, const
@ -117,11 +117,11 @@ necessarily neighbors in the Delaunay triangulation of $\mathcal{P}
\cup \{p\}$.
\ccFunction{template < class Dt, class OutputIterator >
std::pair< OutputIterator, typename Dt::Geom_traits::FT >
CGAL::Triple< OutputIterator, typename Dt::Geom_traits::FT, bool >
surface_neighbor_coordinates_3(const Dt& dt, const typename
Dt::Geom_traits::Point_2& p, const typename
Dt::Geom_traits::Vector_3& normal, OutputIterator out, typename
Dt::Face_handle start = typename Dt::Face_handle(NULL));} {computes
Dt::Face_handle start = typename Dt::Face_handle());} {computes
the surface neighbor coordinates with respect to the points that are
vertices of the Delaunay triangulation \ccc{dt}. The type \ccc{Dt}
must be equivalent to \ccc{Delaunay_triangulation_3<Gt, Tds>}. The
@ -133,11 +133,11 @@ necessarily neighbors in the Delaunay triangulation of $\mathcal{P}
\ccFunction{template < class Dt, class OutputIterator,
class ITraits> std::pair< OutputIterator, typename
Dt::Geom_traits::FT > surface_neighbor_coordinates_3(const Dt& dt,
class ITraits> CGAL::Triple< OutputIterator, typename
Dt::Geom_traits::FT, bool > surface_neighbor_coordinates_3(const Dt& dt,
const typename Dt::Geom_traits::Point_2& p, OutputIterator out,
const ITraits& traits, typename Dt::Face_handle start = typename
Dt::Face_handle(NULL));}
Dt::Face_handle());}
%
{The same as above only that the parameter \ccc{traits} instantiates
the geometric traits class. Its type \ccc{ITraits} must be
@ -163,7 +163,8 @@ necessarily neighbors in the Delaunay triangulation of $\mathcal{P}
\ccImplementation This functions construct the regular triangulation of the input points
instantiated with \ccc{Voronoi_intersection_2_traits_3<Kernel>} or \ccc{ITraits} if provided.
They return the result of the function call
\ccc{regular_neighbor_coordinates_2} with the regular triangulation and \ccc{p} as arguments.
\ccc{regular_neighbor_coordinates_2}
with the regular triangulation and \ccc{p} as arguments.
\ccIndexSubitemEnd{Interpolation}{surface_neighbor_coordinates_3}
\end{ccRefFunction}

View File

@ -115,7 +115,7 @@ necessarily neighbors in the Delaunay triangulation of $\mathcal{P}
surface_neighbors_3(const Dt& dt, const typename
Dt::Geom_traits::Point_2& p, const typename
Dt::Geom_traits::Vector_3& normal, OutputIterator out, typename
Dt::Face_handle start = typename Dt::Face_handle(NULL));} {computes
Dt::Face_handle start = typename Dt::Face_handle());} {computes
the surface neighbor coordinates with respect to the points that are
vertices of the Delaunay triangulation \ccc{dt}. The type \ccc{Dt}
must be equivalent to \ccc{Delaunay_triangulation_3<Gt, Tds>}. The
@ -131,7 +131,7 @@ necessarily neighbors in the Delaunay triangulation of $\mathcal{P}
OutputIterator surface_neighbors_3(const Dt& dt,
const typename Dt::Geom_traits::Point_2& p, OutputIterator out,
const ITraits& traits, typename Dt::Face_handle start = typename
Dt::Face_handle(NULL));}
Dt::Face_handle());}
%
{The same as above only that the parameter \ccc{traits} instantiates
the geometric traits class. Its type \ccc{ITraits} must be

View File

@ -15,6 +15,8 @@ struct K : CGAL::Exact_predicates_inexact_constructions_kernel {};
typedef K::FT Coord_type;
typedef K::Point_3 Point_3;
typedef K::Vector_3 Vector_3;
typedef std::vector< std::pair< Point_3, K::FT > >
Point_coordinate_vector;
int main()
{
@ -32,12 +34,20 @@ int main()
Vector_3 normal(p-CGAL::ORIGIN);
std::cout << "Compute surface neighbor coordinates for "
<< p << std::endl;
std::vector< std::pair< Point_3, Coord_type > > coords;
Coord_type norm =
Point_coordinate_vector coords;
CGAL::Triple< std::back_insert_iterator<Point_coordinate_vector>,
K::FT, bool> result =
CGAL::surface_neighbor_coordinates_3(points.begin(), points.end(),
p, normal,
std::back_inserter(coords),
K()).second;
K());
if(!result.third){
//Undersampling:
std::cout << "The coordinate computation was not successful."
<< std::endl;
return 0;
}
K::FT norm = result.second;
std::cout << "Testing the barycentric property " << std::endl;
Point_3 b(0, 0,0);

View File

@ -1,4 +1,4 @@
// Copyright (c) 1997 INRIA Sophia-Antipolis (France).
// Copyright (c) 2003 INRIA Sophia-Antipolis (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org); you may redistribute it under

View File

@ -1,4 +1,4 @@
// Copyright (c) 1997 INRIA Sophia-Antipolis (France).
// Copyright (c) 2003 INRIA Sophia-Antipolis (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org); you may redistribute it under

View File

@ -1,44 +0,0 @@
// Copyright (c) 1997 INRIA Sophia-Antipolis (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org); you may redistribute it under
// the terms of the Q Public License version 1.0.
// See the file LICENSE.QPL distributed with CGAL.
//
// Licensees holding a valid commercial license may use this file in
// accordance with the commercial license agreement provided with the software.
//
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
//
// $Source$
// $Revision$ $Date$
// $Name$
//
// Author(s) : Julia
// extended class for regular_neighbor_coordinates computation
#ifndef CGAL_REGULAR_NEIGHBOR_COORDINATES_TRAITS_2_H
#define CGAL_REGULAR_NEIGHBOR_COORDINATES_TRAITS_2_H
#include <CGAL/Regular_triangulation_euclidean_traits_2.h>
CGAL_BEGIN_NAMESPACE
template < class R, class W = typename R::RT>
class Regular_neighbor_coordinates_traits_2
: public Regular_triangulation_euclidean_traits_2<R,W>
{
public:
typedef R Rep;
typedef typename R::FT FT;
typedef typename Rep::Compute_area_2 Compute_area_2;
Compute_area_2 compute_area_2_object() const
{return Compute_area_2();}
};
CGAL_END_NAMESPACE
#endif // CGAL_REGULAR_NEIGHBOR_COORDINATES_TRAITS_2_H

View File

@ -241,7 +241,6 @@ class Compute_area_3
//-> if no sqrt is supported, cast to double
public:
typedef typename R::FT FT;
typedef typename R::Triangle_3 Triangle;
typedef typename R::Point_3 Point;
typedef typename R::Compute_squared_area_3 Compute_squared_area_3;

View File

@ -1,4 +1,4 @@
// Copyright (c) 1997 INRIA Sophia-Antipolis (France).
// Copyright (c) 2003 INRIA Sophia-Antipolis (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org); you may redistribute it under

View File

@ -1,4 +1,4 @@
// Copyright (c) 1997 INRIA Sophia-Antipolis (France).
// Copyright (c) 2003 INRIA Sophia-Antipolis (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org); you may redistribute it under

View File

@ -34,7 +34,7 @@ CGAL_BEGIN_NAMESPACE
// const typename Traits::Point_2& p,
// OutputIterator out, const Traits& traits,
// typename Dt::Face_handle start
// = typename Dt::Face_handle(NULL))
// = typename Dt::Face_handle())
//
//template <class Dt, class OutputIterator, class Traits>
//Triple< OutputIterator, typename Traits::FT, bool >
@ -47,7 +47,7 @@ Triple< OutputIterator, typename Dt::Geom_traits::FT, bool >
natural_neighbor_coordinates_2(const Dt& dt,
const typename Dt::Geom_traits::Point_2& p,
OutputIterator out, typename Dt::Face_handle start
= typename Dt::Face_handle(NULL))
= typename Dt::Face_handle())
{
typedef typename Dt::Geom_traits Traits;

View File

@ -1,4 +1,4 @@
// Copyright (c) 1997 INRIA Sophia-Antipolis (France).
// Copyright (c) 2003 INRIA Sophia-Antipolis (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org); you may redistribute it under

View File

@ -38,7 +38,7 @@ regular_neighbor_coordinates_2(const Rt& rt,
Weighted_point& p,
OutputIterator out){
return regular_neighbor_coordinates_2(rt, p, out,
typename Rt::Face_handle(NULL));
typename Rt::Face_handle());
};
//Face_handle start is known:
template <class Rt, class OutputIterator>

View File

@ -1,4 +1,4 @@
// Copyright (c) 1997 INRIA Sophia-Antipolis (France).
// Copyright (c) 2003 INRIA Sophia-Antipolis (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org); you may redistribute it under

View File

@ -1,4 +1,4 @@
// Copyright (c) 1997 INRIA Sophia-Antipolis (France).
// Copyright (c) 2003 INRIA Sophia-Antipolis (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org); you may redistribute it under
@ -35,7 +35,7 @@ CGAL_BEGIN_NAMESPACE
//-------------------------------------------------------------------
template <class OutputIterator, class InputIterator, class Kernel>
std::pair< OutputIterator, typename Kernel::FT >
Triple< OutputIterator, typename Kernel::FT, bool >
surface_neighbor_coordinates_3(InputIterator
first, InputIterator beyond,
const typename Kernel::Point_3& p,
@ -50,7 +50,7 @@ surface_neighbor_coordinates_3(InputIterator
template <class OutputIterator, class InputIterator, class ITraits>
std::pair< OutputIterator, typename ITraits::FT >
Triple< OutputIterator, typename ITraits::FT, bool >
surface_neighbor_coordinates_3(InputIterator
first, InputIterator beyond,
const typename ITraits::Point_2& p,
@ -65,7 +65,7 @@ surface_neighbor_coordinates_3(InputIterator
it.insert(first,beyond);
return
regular_neighbor_coordinates_2(it, p, out, traits);
regular_neighbor_coordinates_2(it, p, out);
}
@ -75,7 +75,7 @@ surface_neighbor_coordinates_3(InputIterator
// Voronoi cell of p is not affected by any point outside the smallest
// ball centered on p containing all points in [first,beyond)
template <class OutputIterator, class InputIterator, class Kernel>
Triple< OutputIterator, typename Kernel::FT, bool >
Quadruple< OutputIterator, typename Kernel::FT, bool, bool >
surface_neighbor_coordinates_certified_3(InputIterator
first, InputIterator beyond,
const typename Kernel::Point_3& p,
@ -92,7 +92,7 @@ surface_neighbor_coordinates_certified_3(InputIterator
// containing the points in [first, beyond] (i.e. the maximal
// distance from p to [first,beyond) as add. parameter:
template <class OutputIterator, class InputIterator, class Kernel>
Triple< OutputIterator, typename Kernel::FT, bool >
Quadruple< OutputIterator, typename Kernel::FT, bool, bool >
surface_neighbor_coordinates_certified_3(InputIterator
first, InputIterator beyond,
const typename Kernel::Point_3& p,
@ -132,7 +132,7 @@ private:
};
// Versions with instantiated traits class:
template <class OutputIterator, class InputIterator, class ITraits>
Triple< OutputIterator, typename ITraits::FT, bool >
Quadruple< OutputIterator, typename ITraits::FT, bool, bool >
surface_neighbor_coordinates_certified_3(InputIterator
first, InputIterator beyond,
const typename ITraits::Point_2& p,
@ -154,7 +154,7 @@ surface_neighbor_coordinates_certified_3(InputIterator
//with radius(maximal distance from p to [first,beyond)) as
// add. parameter:
template <class OutputIterator, class InputIterator, class ITraits>
Triple< OutputIterator, typename ITraits::FT, bool >
Quadruple< OutputIterator, typename ITraits::FT, bool, bool >
surface_neighbor_coordinates_certified_3(InputIterator
first, InputIterator beyond,
const typename
@ -175,9 +175,13 @@ surface_neighbor_coordinates_certified_3(InputIterator
//determine the furthest distance from p to the boundary of its cell
std::vector< typename ITraits::Point_2 > vor_vertices;
std::pair< OutputIterator, typename ITraits::FT >
//unfortunately, there is no function call without Face_handle
// "start" because this would cause type conflicts because
// of resembling function signatures (-> default constructor)
Triple< OutputIterator, typename ITraits::FT, bool >
res = regular_neighbor_coordinates_2
(it, p, out, std::back_inserter(vor_vertices),traits);
(it, p, out, std::back_inserter(vor_vertices),
typename I_triangulation::Face_handle());
typename ITraits::Point_2 furthest =
*std::max_element(vor_vertices.begin(), vor_vertices.end(),
@ -187,9 +191,9 @@ surface_neighbor_coordinates_certified_3(InputIterator
// might be found: return false
if(radius < 4* traits.compute_squared_distance_2_object()
(p, furthest))
return make_triple(res.first, res.second, false);
return make_quadruple(res.first, res.second, res.third, false);
return make_triple(res.first, res.second, true);
return make_quadruple(res.first, res.second,res.third, true);
}
//Sylvain:
//this class should probably be moved to CGAL/function_objects.h
@ -214,14 +218,14 @@ struct Project_vertex_iterator_to_point {
//using Delaunay triangulation for candidate point filtering:
// => no certification is necessary
template <class Dt, class OutputIterator>
std::pair< OutputIterator, typename Dt::Geom_traits::FT >
Triple< OutputIterator, typename Dt::Geom_traits::FT, bool >
surface_neighbor_coordinates_3(const Dt& dt,
const typename Dt::Geom_traits::Point_3& p,
const typename Dt::Geom_traits::Vector_3&
normal,
OutputIterator out,
typename Dt::Cell_handle start
= typename Dt::Cell_handle(NULL)){
= typename Dt::Cell_handle()){
typedef Voronoi_intersection_2_traits_3<typename Dt::Geom_traits> I_gt;
return surface_neighbor_coordinates_3(dt, p, out, I_gt(p,normal),start);
@ -229,12 +233,12 @@ surface_neighbor_coordinates_3(const Dt& dt,
};
template <class Dt, class OutputIterator, class ITraits>
std::pair< OutputIterator, typename ITraits::FT >
Triple< OutputIterator, typename ITraits::FT, bool >
surface_neighbor_coordinates_3(const Dt& dt,
const typename ITraits::Point_2& p,
OutputIterator out, const ITraits& traits,
typename Dt::Cell_handle start
= typename Dt::Cell_handle(NULL)){
= typename Dt::Cell_handle()){
typedef typename ITraits::FT Coord_type;
typedef typename ITraits::Point_2 Point_3;
@ -262,7 +266,7 @@ surface_neighbor_coordinates_3(const Dt& dt,
if(lt == Dt::VERTEX){
*out++= std::make_pair(c->vertex(li)->point(),
Coord_type(1));
return( std::make_pair(out, Coord_type(1)));
return( make_triple(out, Coord_type(1), true));
}
//the candidate points are the points of dt in conflict with p:

View File

@ -1,4 +1,4 @@
// Copyright (c) 1997 INRIA Sophia-Antipolis (France).
// Copyright (c) 2003 INRIA Sophia-Antipolis (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org); you may redistribute it under
@ -208,7 +208,7 @@ surface_neighbors_3(const Dt& dt,
normal,
OutputIterator out,
typename Dt::Cell_handle start
= typename Dt::Cell_handle(NULL)){
= typename Dt::Cell_handle()){
typedef Voronoi_intersection_2_traits_3<typename Dt::Geom_traits> I_gt;
return surface_neighbors_3(dt, p, out, I_gt(p,normal),start);
@ -221,7 +221,7 @@ surface_neighbors_3(const Dt& dt,
const typename ITraits::Point_2& p,
OutputIterator out, const ITraits& traits,
typename Dt::Cell_handle start
= typename Dt::Cell_handle(NULL)){
= typename Dt::Cell_handle()){
typedef typename ITraits::FT Coord_type;
typedef typename ITraits::Point_2 Point_3;

View File

@ -202,11 +202,11 @@ test_coords(const Triangul& T, const typename
Triangul::Geom_traits> I_traits;
//coordinate computation result types
typedef std::pair< OutputIterator,
typename Triangul::Geom_traits::FT > Result_pair;
//the result type of the certified version:
typedef CGAL::Triple< OutputIterator,
typename Triangul::Geom_traits::FT, bool > Result_triple;
//the result type of the certified version:
typedef CGAL::Quadruple< OutputIterator,
typename Triangul::Geom_traits::FT, bool, bool > Result_quadruple;
typename Triangul::Cell_handle start;
@ -214,54 +214,59 @@ test_coords(const Triangul& T, const typename
//test different function calls
switch(version){
case 0:{
Result_pair result
Result_triple result
= CGAL::surface_neighbor_coordinates_3(T, p,n,out);
assert(result.third);
norm = result.second;
break;}
case 1: {
Result_pair result =
Result_triple result =
CGAL::surface_neighbor_coordinates_3(T, p,out,I_traits(p,n));
assert(result.third);
norm = result.second; break;}
//both versions with locate:
case 2:{
start = T.locate(p);
Result_pair result = CGAL::surface_neighbor_coordinates_3(T, p,n,
Result_triple result = CGAL::surface_neighbor_coordinates_3(T, p,n,
out, start);
assert(result.third);
norm = result.second; break;}
case 3: {
start = T.locate(p);
Result_pair result =
CGAL::surface_neighbor_coordinates_3(T, p,out, I_traits(p,n),start);
Result_triple result =
CGAL::surface_neighbor_coordinates_3(T, p,out, I_traits(p,n),start);
assert(result.third);
norm = result.second; break;}
//taking all points:
case 4: {
Result_pair result
Result_triple result
= CGAL::surface_neighbor_coordinates_3(T.points_begin(),
T.points_end(),p,n,
out,
T.geom_traits());
assert(result.third);
norm = result.second; break;}
case 5: {
Result_pair result
Result_triple result
= CGAL::surface_neighbor_coordinates_3(T.points_begin(),
T.points_end(),p,
out ,I_traits(p,n));
assert(result.third);
norm = result.second; break;}
//the last two with certification:
case 6: {
Result_triple
Result_quadruple
result = CGAL::surface_neighbor_coordinates_certified_3
(T.points_begin(), T.points_end(),p,n,
out, T.geom_traits());
assert(result.third);
assert(result.third && result.fourth);
norm = result.second; break;
}
case 7: {
Result_triple
Result_quadruple
result = CGAL::surface_neighbor_coordinates_certified_3
(T.points_begin(), T.points_end(),p, out ,I_traits(p,n));
assert(result.third);
assert(result.third && result.fourth);
norm = result.second;
break;
}
@ -270,7 +275,7 @@ test_coords(const Triangul& T, const typename
std::endl;
}
assert(norm>0);
return std::make_pair(out,norm);
}

View File

@ -24,7 +24,7 @@
#include <CGAL/double.h>
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
#include <CGAL/Regular_neighbor_coordinates_traits_2.h>
#include <CGAL/Regular_triangulation_euclidean_traits_2.h>
#include <CGAL/Regular_triangulation_2.h>
#include <CGAL/_test_regular_neighbors_2.C>
@ -33,7 +33,7 @@
struct K : CGAL::Exact_predicates_exact_constructions_kernel {};
typedef double W;
typedef CGAL::Regular_neighbor_coordinates_traits_2<K,W> Gt1;
typedef CGAL::Regular_triangulation_euclidean_traits_2<K,W> Gt1;
typedef CGAL::Regular_triangulation_2<Gt1> Rt1;
int main()