This commit is contained in:
Efi Fogel 2003-05-21 10:20:35 +00:00
parent dcae231db3
commit 2035885950
2 changed files with 150 additions and 216 deletions

View File

@ -30,57 +30,57 @@
\ccInheritsFrom
\ccStyle{CGAL::Planar_map_2<Dcel,Traits>}
The fact that the modifying insert functions override the
inherited functions (the expected behaviour) should be noted. The
insert functions of \ccRefName\ are designed to handle possibly
intersecting, non-$x$-monotone or overlapping curves and are
slower. For non-intersecting, $x$-monotone curves are intserted
one can use the set of insertion functions that begin with the
prefix \ccc{non_intersecting}.
Note that the modifying insertion-functions override the
inherited functions. The insertion functions of \ccRefName\ handle
general curves, including non-$x$-monotone curves, pairwise overlapping,
or pairwise intersecting curves, and are slower than their counterparts
of the \ccStyle{CGAL::Planar_map_2<Dcel,Traits>} base class.
$X$-monotone curves that are pairwise disjoint in their interiors can be
inserted efficiently through a subset of insertion functions listed below.
These functions begin with the prefix \ccc{non_intersecting}.
%\comment{iddo: need to be virtual in planar map}.
\ccTypes
\ccNestedType{Pmwx_change_notification}{}
\ccNestedType{Pmwx_change_notification}{}
\ccCreation
\ccCreationVariable{pmwx}
\ccCreationVariable{pmwx}
\ccConstructor{Planar_map_with_intersections_2<Planar_map>();}
{creates an empty planar map with the default point location strategy.}
\ccConstructor{Planar_map_with_intersections_2<Planar_map>();}
{creates an empty planar map with the default point location strategy.}
\ccConstructor{Planar_map_with_intersections_2<Planar_map>(Pm_point_location_base<Planar_map> *pl);}
{creates an empty planar map with \ccc{*pl} as the point location strategy.}
\ccConstructor{Planar_map_with_intersections_2<Planar_map>(Pm_point_location_base<Planar_map> *pl);}
{creates an empty planar map with \ccc{*pl} as the point location strategy.}
\ccConstructor{Planar_map_with_intersections_2<Planar_map>(const Traits& tr, Pm_point_location_base<Planar_map> *pl);}
{creates an empty planar map with \ccc{tr} as the traits class and \ccc{*pl} as the point location strategy.}
\ccConstructor{Planar_map_with_intersections_2<Planar_map>(const Traits& tr, Pm_point_location_base<Planar_map> *pl);}
{creates an empty planar map with \ccc{tr} as the traits class and \ccc{*pl} as the point location strategy.}
\ccOperations
\ccMethod{Halfedge_handle insert(const X_monotone_curve_2& cv,
Pmwx_change_notification *en = NULL);}
{inserts the $x$-monotone curve \ccStyle{cv} into the planar map.
Returns the last inserted halfedge whose target points to the
target point of \ccStyle{cv}.
\ccPrecond{\ccc{cv} is not equivalent to a point.}}
\ccMethod{Halfedge_handle insert(const X_monotone_curve_2& cv, Pmwx_change_notification *en = NULL);}
{inserts the $x$-monotone curve \ccStyle{cv} into the planar map.
Returns the last inserted halfedge whose target points to the
target point of \ccStyle{cv}.
\ccPrecond{\ccc{cv} is not equivalent to a point. }
}
\ccMethod{Halfedge_handle insert_from_vertex(const X_monotone_curve_2& cv, Vertex_handle src,
Pmwx_change_notification *en = NULL);}
{inserts the $x$-monotone curve \ccStyle{cv}, for
which the source vertex, \ccStyle{src}, is already in the
arrangement.
Returns the last inserted halfedge whose target points to the
target point of \ccStyle{cv}.
This function is more efficient than the \ccc{insert} function,
since it does not invoke a point location query for the
endpoint \ccc{src}. Therefore,
whenever possible, it is recommended to use this one rather
than \ccc{insert}.
\ccPrecond{\ccc{src} holds a point which is the same as \ccc{cv's}
source.}
\ccPrecond{\ccc{cv} is not equivalent to a point. }
}
\ccMethod{Halfedge_handle insert_from_vertex(const X_monotone_curve_2& cv,
Vertex_handle src,
Pmwx_change_notification *en = NULL);}
{inserts the $x$-monotone curve \ccStyle{cv}, for
which the source vertex, \ccStyle{src}, is already in the
arrangement.
Returns the last inserted halfedge whose target points to the
target point of \ccStyle{cv}.
This function is more efficient than the \ccc{insert} function,
since it does not invoke a point location query for the
endpoint \ccc{src}. Therefore,
whenever possible, it is recommended to use this one rather
than \ccc{insert}.
\ccPrecond{\ccc{src} holds a point which is the same as \ccc{cv's}
source.}
\ccPrecond{\ccc{cv} is not equivalent to a point.}}
\begin{ccAdvanced}
@ -92,45 +92,42 @@ they are more efficient than their counterpart insert-functions.
{\em see also} \ref{PM_sec:pm} for details including the full list of
preconditions.
\ccMethod{Halfedge_handle
non_intersecting_insert(const X_monotone_curve_2 & cv,
Change_notification * en = NULL);}
{inserts the curve \ccc{cv} into the
map. \ccc{non_intersecting_insert()} returns a handle to a new
halfedge directed in the same way as the curve \ccc{cv}.
\ccPrecond{\ccc{cv} has no proper intersection with any curve of the
map. }
}
\ccMethod{Halfedge_handle
non_intersecting_insert(const X_monotone_curve_2 & cv,
Change_notification * en = NULL);}
{inserts the curve \ccc{cv} into the
map. \ccc{non_intersecting_insert()} returns a handle to a new
halfedge directed in the same way as the curve \ccc{cv}.
\ccPrecond{\ccc{cv} has no proper intersection with any curve of the
map.}}
\ccMethod{template <class X_monotone_curve_2_iterator>
Halfedge_iterator
non_intersecting_insert(const X_monotone_curve_2_iterator & begin,
const X_monotone_curve_2_iterator & end,
Change_notification * en = NULL);}
\ccMethod{template <class X_monotone_curve_2_iterator>
Halfedge_iterator
non_intersecting_insert(const X_monotone_curve_2_iterator & begin,
const X_monotone_curve_2_iterator & end,
Change_notification * en = NULL);}
{iterates through a given range of curves, inserting the curves into
the map. \ccc{begin} and \ccc{end} are input iterators that point to
the first curve and past-the-end curve of the range
respectively. \ccc{non_intersecting_insert()} returns a handle to a
new halfedge directed in the same way as the last curve in the range.
\ccPrecond{the curves of the map do not intersect the curves in the
given range in the interiors of the curves respectively. }
}
given range in the interiors of the curves respectively.}}
\ccMethod{Halfedge_handle
non_intersecting_insert_in_face_interior(const X_monotone_curve_2 & cv,
Face_handle f,
\ccMethod{Halfedge_handle
non_intersecting_insert_in_face_interior(const X_monotone_curve_2 & cv,
Face_handle f,
Change_notification * en = NULL);}
{inserts the curve \ccc{cv} as a new inner component of the face
\ccc{f}. \ccc{non_intersecting_insert_in_face_interior()} returns a
handle to a new halfedge directed in the same way as \ccc{cv}.
\ccPrecond{\ccc{cv} has no proper intersection with any curve of the
map. }
}
map.}}
\ccMethod{Halfedge_handle
non_intersecting_insert_from_vertex(const X_monotone_curve_2 & cv,
Halfedge_handle h,
Change_notification * en = NULL);}
\ccMethod{Halfedge_handle
non_intersecting_insert_from_vertex(const X_monotone_curve_2 & cv,
Halfedge_handle h,
Change_notification * en = NULL);}
{inserts the curve \ccc{cv} into the map. One endpoint of \ccc{cv}
is the point of the target vertex, \ccc{v}, of the given halfedge
\ccc{h}. \ccc{non_intersecting_insert_from_vertex} returns a handle
@ -139,14 +136,13 @@ preconditions.
circular list of halfedges that share the same target vertex
\ccc{v}.
\ccPrecond{\ccc{cv} has no proper intersection with any curve of the
map. }
}
map.}}
\ccMethod{Halfedge_handle
non_intersecting_insert_at_vertices(const X_monotone_curve_2 & cv,
Halfedge_handle h1,
Halfedge_handle h2,
Change_notification * en = NULL);}
\ccMethod{Halfedge_handle
non_intersecting_insert_at_vertices(const X_monotone_curve_2 & cv,
Halfedge_handle h1,
Halfedge_handle h2,
Change_notification * en = NULL);}
{inserts the curve \ccc{cv} into the map. The two endpoints of
\ccc{cv} are held by the two target vertices \ccc{v1} and \ccc{v2}
of \ccc{h1} and \ccc{h2}
@ -161,10 +157,10 @@ preconditions.
map. }
}
\ccMethod{Halfedge_handle
non_intersecting_insert_from_vertex(const X_monotone_curve_2 & cv,
Vertex_handle v1,
Change_notification * en = NULL);}
\ccMethod{Halfedge_handle
non_intersecting_insert_from_vertex(const X_monotone_curve_2 & cv,
Vertex_handle v1,
Change_notification * en = NULL);}
{inserts the curve \ccc{cv} into the map. One endpoint of \ccc{cv}
is the point of the given vertex \ccc{v}, that is already in the
map. \ccc{non_intersecting_insert_from_vertex} returns a handle to a
@ -173,11 +169,11 @@ preconditions.
map. }
}
\ccMethod{Halfedge_handle
non_intersecting_insert_at_vertices(const X_monotone_curve_2 & cv,
Vertex_handle v1,
Vertex_handle v2,
Change_notification * en = NULL);}
\ccMethod{Halfedge_handle
non_intersecting_insert_at_vertices(const X_monotone_curve_2 & cv,
Vertex_handle v1,
Vertex_handle v2,
Change_notification * en = NULL);}
{inserts the curve \ccc{cv} into the map. The two endpoints of
\ccc{cv} are held by the two given vertices \ccc{v1} and \ccc{v2}
respectively, that are already in the
@ -190,35 +186,6 @@ preconditions.
\end{ccAdvanced}
% The following operations have the same functionality as their
% counterparts in the planar map.
%
% \ccMethod{Vertex_iterator vertices_begin();}{}
% \ccMethod{Vertex_iterator vertices_end();}{}
% \ccMethod{Size number_of_vertices();}{}
% \ccMethod{Halfedge_iterator halfedges_begin();}{}
% \ccMethod{Halfedge_iterator halfedges_end();}{}
% \ccMethod{Size number_of_halfedges();}{}
% \ccMethod{Face_iterator faces_begin();}{}
% \ccMethod{Face_iterator faces_end();}{}
% \ccMethod{Size number_of_faces();}{}
%
% \ccMethod{Halfedge_handle split_edge(Halfedge_handle e, const X_monotone_curve_2& c1,
% const X_monotone_curve_2& c2);}{}
% \ccMethod{Halfedge_handle locate(const Point& p, Locate_type& lt);}{}
% \ccMethod{Halfedge_handle vertical_ray_shoot(const Point& p, Locate_type& lt, bool up);}{}
%
% \ccMethod{Face_handle unbounded_face();}{}
%
% \ccMethod{bool is_valid(bool verbose=false);}{}
\end{ccRefClass}
% +------------------------------------------------------------------------+
%%RefPage: end of main body, begin of footer
\ccRefPageEnd
% EOF
% +------------------------------------------------------------------------+

View File

@ -30,57 +30,57 @@
\ccInheritsFrom
\ccStyle{CGAL::Planar_map_2<Dcel,Traits>}
The fact that the modifying insert functions override the
inherited functions (the expected behaviour) should be noted. The
insert functions of \ccRefName\ are designed to handle possibly
intersecting, non-$x$-monotone or overlapping curves and are
slower. For non-intersecting, $x$-monotone curves are intserted
one can use the set of insertion functions that begin with the
prefix \ccc{non_intersecting}.
Note that the modifying insertion-functions override the
inherited functions. The insertion functions of \ccRefName\ handle
general curves, including non-$x$-monotone curves, pairwise overlapping,
or pairwise intersecting curves, and are slower than their counterparts
of the \ccStyle{CGAL::Planar_map_2<Dcel,Traits>} base class.
$X$-monotone curves that are pairwise disjoint in their interiors can be
inserted efficiently through a subset of insertion functions listed below.
These functions begin with the prefix \ccc{non_intersecting}.
%\comment{iddo: need to be virtual in planar map}.
\ccTypes
\ccNestedType{Pmwx_change_notification}{}
\ccNestedType{Pmwx_change_notification}{}
\ccCreation
\ccCreationVariable{pmwx}
\ccCreationVariable{pmwx}
\ccConstructor{Planar_map_with_intersections_2<Planar_map>();}
{creates an empty planar map with the default point location strategy.}
\ccConstructor{Planar_map_with_intersections_2<Planar_map>();}
{creates an empty planar map with the default point location strategy.}
\ccConstructor{Planar_map_with_intersections_2<Planar_map>(Pm_point_location_base<Planar_map> *pl);}
{creates an empty planar map with \ccc{*pl} as the point location strategy.}
\ccConstructor{Planar_map_with_intersections_2<Planar_map>(Pm_point_location_base<Planar_map> *pl);}
{creates an empty planar map with \ccc{*pl} as the point location strategy.}
\ccConstructor{Planar_map_with_intersections_2<Planar_map>(const Traits& tr, Pm_point_location_base<Planar_map> *pl);}
{creates an empty planar map with \ccc{tr} as the traits class and \ccc{*pl} as the point location strategy.}
\ccConstructor{Planar_map_with_intersections_2<Planar_map>(const Traits& tr, Pm_point_location_base<Planar_map> *pl);}
{creates an empty planar map with \ccc{tr} as the traits class and \ccc{*pl} as the point location strategy.}
\ccOperations
\ccMethod{Halfedge_handle insert(const X_monotone_curve_2& cv,
Pmwx_change_notification *en = NULL);}
{inserts the $x$-monotone curve \ccStyle{cv} into the planar map.
Returns the last inserted halfedge whose target points to the
target point of \ccStyle{cv}.
\ccPrecond{\ccc{cv} is not equivalent to a point.}}
\ccMethod{Halfedge_handle insert(const X_monotone_curve_2& cv, Pmwx_change_notification *en = NULL);}
{inserts the $x$-monotone curve \ccStyle{cv} into the planar map.
Returns the last inserted halfedge whose target points to the
target point of \ccStyle{cv}.
\ccPrecond{\ccc{cv} is not equivalent to a point. }
}
\ccMethod{Halfedge_handle insert_from_vertex(const X_monotone_curve_2& cv, Vertex_handle src,
Pmwx_change_notification *en = NULL);}
{inserts the $x$-monotone curve \ccStyle{cv}, for
which the source vertex, \ccStyle{src}, is already in the
arrangement.
Returns the last inserted halfedge whose target points to the
target point of \ccStyle{cv}.
This function is more efficient than the \ccc{insert} function,
since it does not invoke a point location query for the
endpoint \ccc{src}. Therefore,
whenever possible, it is recommended to use this one rather
than \ccc{insert}.
\ccPrecond{\ccc{src} holds a point which is the same as \ccc{cv's}
source.}
\ccPrecond{\ccc{cv} is not equivalent to a point. }
}
\ccMethod{Halfedge_handle insert_from_vertex(const X_monotone_curve_2& cv,
Vertex_handle src,
Pmwx_change_notification *en = NULL);}
{inserts the $x$-monotone curve \ccStyle{cv}, for
which the source vertex, \ccStyle{src}, is already in the
arrangement.
Returns the last inserted halfedge whose target points to the
target point of \ccStyle{cv}.
This function is more efficient than the \ccc{insert} function,
since it does not invoke a point location query for the
endpoint \ccc{src}. Therefore,
whenever possible, it is recommended to use this one rather
than \ccc{insert}.
\ccPrecond{\ccc{src} holds a point which is the same as \ccc{cv's}
source.}
\ccPrecond{\ccc{cv} is not equivalent to a point.}}
\begin{ccAdvanced}
@ -92,45 +92,42 @@ they are more efficient than their counterpart insert-functions.
{\em see also} \ref{PM_sec:pm} for details including the full list of
preconditions.
\ccMethod{Halfedge_handle
non_intersecting_insert(const X_monotone_curve_2 & cv,
Change_notification * en = NULL);}
{inserts the curve \ccc{cv} into the
map. \ccc{non_intersecting_insert()} returns a handle to a new
halfedge directed in the same way as the curve \ccc{cv}.
\ccPrecond{\ccc{cv} has no proper intersection with any curve of the
map. }
}
\ccMethod{Halfedge_handle
non_intersecting_insert(const X_monotone_curve_2 & cv,
Change_notification * en = NULL);}
{inserts the curve \ccc{cv} into the
map. \ccc{non_intersecting_insert()} returns a handle to a new
halfedge directed in the same way as the curve \ccc{cv}.
\ccPrecond{\ccc{cv} has no proper intersection with any curve of the
map.}}
\ccMethod{template <class X_monotone_curve_2_iterator>
Halfedge_iterator
non_intersecting_insert(const X_monotone_curve_2_iterator & begin,
const X_monotone_curve_2_iterator & end,
Change_notification * en = NULL);}
\ccMethod{template <class X_monotone_curve_2_iterator>
Halfedge_iterator
non_intersecting_insert(const X_monotone_curve_2_iterator & begin,
const X_monotone_curve_2_iterator & end,
Change_notification * en = NULL);}
{iterates through a given range of curves, inserting the curves into
the map. \ccc{begin} and \ccc{end} are input iterators that point to
the first curve and past-the-end curve of the range
respectively. \ccc{non_intersecting_insert()} returns a handle to a
new halfedge directed in the same way as the last curve in the range.
\ccPrecond{the curves of the map do not intersect the curves in the
given range in the interiors of the curves respectively. }
}
given range in the interiors of the curves respectively.}}
\ccMethod{Halfedge_handle
non_intersecting_insert_in_face_interior(const X_monotone_curve_2 & cv,
Face_handle f,
\ccMethod{Halfedge_handle
non_intersecting_insert_in_face_interior(const X_monotone_curve_2 & cv,
Face_handle f,
Change_notification * en = NULL);}
{inserts the curve \ccc{cv} as a new inner component of the face
\ccc{f}. \ccc{non_intersecting_insert_in_face_interior()} returns a
handle to a new halfedge directed in the same way as \ccc{cv}.
\ccPrecond{\ccc{cv} has no proper intersection with any curve of the
map. }
}
map.}}
\ccMethod{Halfedge_handle
non_intersecting_insert_from_vertex(const X_monotone_curve_2 & cv,
Halfedge_handle h,
Change_notification * en = NULL);}
\ccMethod{Halfedge_handle
non_intersecting_insert_from_vertex(const X_monotone_curve_2 & cv,
Halfedge_handle h,
Change_notification * en = NULL);}
{inserts the curve \ccc{cv} into the map. One endpoint of \ccc{cv}
is the point of the target vertex, \ccc{v}, of the given halfedge
\ccc{h}. \ccc{non_intersecting_insert_from_vertex} returns a handle
@ -139,14 +136,13 @@ preconditions.
circular list of halfedges that share the same target vertex
\ccc{v}.
\ccPrecond{\ccc{cv} has no proper intersection with any curve of the
map. }
}
map.}}
\ccMethod{Halfedge_handle
non_intersecting_insert_at_vertices(const X_monotone_curve_2 & cv,
Halfedge_handle h1,
Halfedge_handle h2,
Change_notification * en = NULL);}
\ccMethod{Halfedge_handle
non_intersecting_insert_at_vertices(const X_monotone_curve_2 & cv,
Halfedge_handle h1,
Halfedge_handle h2,
Change_notification * en = NULL);}
{inserts the curve \ccc{cv} into the map. The two endpoints of
\ccc{cv} are held by the two target vertices \ccc{v1} and \ccc{v2}
of \ccc{h1} and \ccc{h2}
@ -161,10 +157,10 @@ preconditions.
map. }
}
\ccMethod{Halfedge_handle
non_intersecting_insert_from_vertex(const X_monotone_curve_2 & cv,
Vertex_handle v1,
Change_notification * en = NULL);}
\ccMethod{Halfedge_handle
non_intersecting_insert_from_vertex(const X_monotone_curve_2 & cv,
Vertex_handle v1,
Change_notification * en = NULL);}
{inserts the curve \ccc{cv} into the map. One endpoint of \ccc{cv}
is the point of the given vertex \ccc{v}, that is already in the
map. \ccc{non_intersecting_insert_from_vertex} returns a handle to a
@ -173,11 +169,11 @@ preconditions.
map. }
}
\ccMethod{Halfedge_handle
non_intersecting_insert_at_vertices(const X_monotone_curve_2 & cv,
Vertex_handle v1,
Vertex_handle v2,
Change_notification * en = NULL);}
\ccMethod{Halfedge_handle
non_intersecting_insert_at_vertices(const X_monotone_curve_2 & cv,
Vertex_handle v1,
Vertex_handle v2,
Change_notification * en = NULL);}
{inserts the curve \ccc{cv} into the map. The two endpoints of
\ccc{cv} are held by the two given vertices \ccc{v1} and \ccc{v2}
respectively, that are already in the
@ -190,35 +186,6 @@ preconditions.
\end{ccAdvanced}
% The following operations have the same functionality as their
% counterparts in the planar map.
%
% \ccMethod{Vertex_iterator vertices_begin();}{}
% \ccMethod{Vertex_iterator vertices_end();}{}
% \ccMethod{Size number_of_vertices();}{}
% \ccMethod{Halfedge_iterator halfedges_begin();}{}
% \ccMethod{Halfedge_iterator halfedges_end();}{}
% \ccMethod{Size number_of_halfedges();}{}
% \ccMethod{Face_iterator faces_begin();}{}
% \ccMethod{Face_iterator faces_end();}{}
% \ccMethod{Size number_of_faces();}{}
%
% \ccMethod{Halfedge_handle split_edge(Halfedge_handle e, const X_monotone_curve_2& c1,
% const X_monotone_curve_2& c2);}{}
% \ccMethod{Halfedge_handle locate(const Point& p, Locate_type& lt);}{}
% \ccMethod{Halfedge_handle vertical_ray_shoot(const Point& p, Locate_type& lt, bool up);}{}
%
% \ccMethod{Face_handle unbounded_face();}{}
%
% \ccMethod{bool is_valid(bool verbose=false);}{}
\end{ccRefClass}
% +------------------------------------------------------------------------+
%%RefPage: end of main body, begin of footer
\ccRefPageEnd
% EOF
% +------------------------------------------------------------------------+