mirror of https://github.com/CGAL/cgal
Merge remote-tracking branch 'afabri/Kernel_23-squared_length-GF' into gsoc2022-isosurface
This commit is contained in:
commit
07b9587eae
|
|
@ -27,7 +27,7 @@ namespace Qt {
|
||||||
}
|
}
|
||||||
|
|
||||||
template < class Gt >
|
template < class Gt >
|
||||||
class Parabola_segment_2 : public Parabola_2< Gt >
|
struct Parabola_segment_2 : public Parabola_2< Gt >
|
||||||
{
|
{
|
||||||
typedef CGAL::Parabola_2<Gt> Base;
|
typedef CGAL::Parabola_2<Gt> Base;
|
||||||
typedef typename Base::Site_2 Site_2;
|
typedef typename Base::Site_2 Site_2;
|
||||||
|
|
@ -39,10 +39,10 @@ class Parabola_segment_2 : public Parabola_2< Gt >
|
||||||
using Base::t;
|
using Base::t;
|
||||||
using Base::f;
|
using Base::f;
|
||||||
|
|
||||||
protected:
|
|
||||||
Point_2 p1, p2;
|
Point_2 p1, p2;
|
||||||
|
|
||||||
public:
|
|
||||||
Parabola_segment_2() : Parabola_2< Gt >() {}
|
Parabola_segment_2() : Parabola_2< Gt >() {}
|
||||||
|
|
||||||
template<class ApolloniusSite>
|
template<class ApolloniusSite>
|
||||||
|
|
|
||||||
|
|
@ -5703,20 +5703,25 @@ objects, so that when one object changes state, all its dependents are
|
||||||
notified and updated automatically. The observed object does not know
|
notified and updated automatically. The observed object does not know
|
||||||
anything about the observers. It merely "publishes" information about
|
anything about the observers. It merely "publishes" information about
|
||||||
changes when they occur. In our case observers can be attached to an
|
changes when they occur. In our case observers can be attached to an
|
||||||
arrangement object. An attached observer receives notifications about
|
arrangement object.
|
||||||
the changes this arrangement undergoes.
|
|
||||||
|
|
||||||
An observer object, the type of which is an instance of the
|
An observer object that observes changes in an arrangement object
|
||||||
`Arr_observer<Arrangement>` class template, stores a pointer to an
|
stores a pointer to the attached arrangement object. It receives
|
||||||
arrangement object. When the `Arr_observer<Arrangement>` class
|
notifications about the changes this arrangement undergoes. The
|
||||||
template is instantiated, the `Arrangement` parameter must be
|
observer receives notifications <em>just before</em> a structural
|
||||||
substituted with the type of the arrangement object. The observer
|
change occurs in the arrangement and <em>immediately after</em> such a
|
||||||
receives notifications <em>just before</em> a structural change occurs
|
change takes place. An observer object that observes changes in an
|
||||||
in the arrangement and <em>immediately after</em> such a change takes
|
arrangement object of type `Arrangement` must be of a type derived
|
||||||
place. `Arr_observer` serves as a base class for other
|
from `Arrangement::Observer`, which is an alias to
|
||||||
observer classes and defines a set of virtual notification
|
`Aos_observer<Arrangement_on_surface_2>`, where
|
||||||
functions, with default empty implementations. The set of functions
|
`Arrangement_on_surface_2` is the type of the arrangement object or
|
||||||
can be divided into three categories, as follows:
|
its base type. An instance of `Aos_observer<>` serves as a base type
|
||||||
|
for other observer classes and defines a set of virtual notification
|
||||||
|
functions, with default empty implementations. You can also use the
|
||||||
|
template alias `Arr_observer<Arrangement_2>`, where `Arrangement_2` is
|
||||||
|
the type of the arrangement object in case it is derived from an
|
||||||
|
instance of the template `Arrangement_on_surface_2`. The set of
|
||||||
|
functions can be divided into three categories, as follows:
|
||||||
|
|
||||||
<OL>
|
<OL>
|
||||||
|
|
||||||
|
|
@ -5782,10 +5787,10 @@ the call to `after_global_change()`.
|
||||||
</OL>
|
</OL>
|
||||||
|
|
||||||
See the Reference Manual for a detailed specification of the
|
See the Reference Manual for a detailed specification of the
|
||||||
`Arr_observer` class template and the prototypes of all notification
|
`Aos_observer` class template and the prototypes of all notification
|
||||||
functions.
|
functions.
|
||||||
|
|
||||||
Each arrangement object stores a list of pointers to `Arr_observer`
|
Each arrangement object stores a list of pointers to `Aos_observer`
|
||||||
objects. This list may be empty, in which case the arrangement does
|
objects. This list may be empty, in which case the arrangement does
|
||||||
not have to notify any external class on the structural changes it
|
not have to notify any external class on the structural changes it
|
||||||
undergoes. If, however, there are observers associated with the
|
undergoes. If, however, there are observers associated with the
|
||||||
|
|
@ -5799,7 +5804,7 @@ invoked for each observer.
|
||||||
<!-- This allows for the nesting of \Index{observer} objects. -->
|
<!-- This allows for the nesting of \Index{observer} objects. -->
|
||||||
|
|
||||||
Concrete arrangement-observer classes should inherit from
|
Concrete arrangement-observer classes should inherit from
|
||||||
`Arr_observer`. When an observer is constructed, it is attached to a
|
`Aos_observer`. When an observer is constructed, it is attached to a
|
||||||
valid arrangement supplied to the observed constructor, or
|
valid arrangement supplied to the observed constructor, or
|
||||||
alternatively the observer can be attached to the arrangement at a
|
alternatively the observer can be attached to the arrangement at a
|
||||||
later time. When this happens, the observer object inserts itself
|
later time. When this happens, the observer object inserts itself
|
||||||
|
|
@ -5809,8 +5814,8 @@ thereafter. Subsequently, the observer object unregisters itself by
|
||||||
removing itself from this list just before it is destroyed. Most
|
removing itself from this list just before it is destroyed. Most
|
||||||
concrete observer-classes do not need to use the full set of
|
concrete observer-classes do not need to use the full set of
|
||||||
notifications. Thus, the bodies of all notification methods defined in
|
notifications. Thus, the bodies of all notification methods defined in
|
||||||
the base class `Arr_observer` are empty. A concrete observer that
|
the base class `Aos_observer` are empty. A concrete observer that
|
||||||
inherits from `Arr_observer` needs to override only the relevant
|
inherits from `Aos_observer` needs to override only the relevant
|
||||||
notification methods. The remaining methods are invoked when
|
notification methods. The remaining methods are invoked when
|
||||||
corresponding changes occur, but they do nothing.
|
corresponding changes occur, but they do nothing.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,424 @@
|
||||||
|
namespace CGAL {
|
||||||
|
|
||||||
|
/*! \ingroup PkgArrangementOnSurface2Ref
|
||||||
|
*
|
||||||
|
* \anchor arr_refaos_obs
|
||||||
|
*
|
||||||
|
* `Aos_observer` serves as an abstract base class for all observer classes that
|
||||||
|
* are attached to an arrangement instance of type `Arrangement` and receive
|
||||||
|
* notifications from the arrangement. This base class handles the attachment
|
||||||
|
* of the observer to a given arrangement instance or to the detachment of the
|
||||||
|
* observer from this arrangement instance. It also gives a default empty
|
||||||
|
* implementation to all notification functions that are invoked by the
|
||||||
|
* arrangement to notify the observer on local or global changes it undergoes.
|
||||||
|
* The notification functions are all virtual functions, so they can be
|
||||||
|
* overridden by the concrete observer classes that inherit from `Aos_observer`.
|
||||||
|
*
|
||||||
|
* In order to implement a concrete arrangement observer-class, one simply needs
|
||||||
|
* to derive from `Aos_observer` and override the relevant notification
|
||||||
|
* functions. For example, if only face-split events are of interest, it is
|
||||||
|
* sufficient to override just `before_split_face()` (or just
|
||||||
|
* `after_split_face()`).
|
||||||
|
*/
|
||||||
|
template <typename Arrangement>
|
||||||
|
class Aos_observer {
|
||||||
|
public:
|
||||||
|
|
||||||
|
/// \name Types
|
||||||
|
/// @{
|
||||||
|
|
||||||
|
//! the type of the associated arrangement.
|
||||||
|
typedef unspecified_type Arrangement_2;
|
||||||
|
|
||||||
|
//! the point type.
|
||||||
|
typedef typename Arrangement_2::Point_2 Point_2;
|
||||||
|
|
||||||
|
//! the \f$x\f$-monotone curve type.
|
||||||
|
typedef typename Arrangement_2::X_monotone_curve_2 X_monotone_curve_2;
|
||||||
|
|
||||||
|
//! the type of a handle to an arrangement vertex.
|
||||||
|
typedef typename Arrangement_2::Vertex_handle Vertex_handle;
|
||||||
|
|
||||||
|
//! the type of a handle to an arrangement halfedge.
|
||||||
|
typedef typename Arrangement_2::Halfedge_handle Halfedge_handle;
|
||||||
|
|
||||||
|
//! the type of a handle to an arrangement face.
|
||||||
|
typedef typename Arrangement_2::Face_handle Face_handle;
|
||||||
|
|
||||||
|
/*! represents a connected component of the boundary (CCB), either an outer
|
||||||
|
* boundary or an inner boundary (the latter is also referred to as a hole).
|
||||||
|
*/
|
||||||
|
typedef typename Arrangement_2::Ccb_halfedge_circulator Ccb_halfedge_circulator;
|
||||||
|
|
||||||
|
/// @}
|
||||||
|
|
||||||
|
/// \name Creation
|
||||||
|
/// @{
|
||||||
|
|
||||||
|
/*! constructs an observer that is unattached to any arrangement instance. */
|
||||||
|
Aos_observer();
|
||||||
|
|
||||||
|
/*! constructs an observer and attaches it to the given arrangement `arr`. */
|
||||||
|
Aos_observer(Arrangement_2& arr);
|
||||||
|
|
||||||
|
/// @}
|
||||||
|
|
||||||
|
/// \name Modifiers
|
||||||
|
/// @{
|
||||||
|
|
||||||
|
/*! attaches the observer to the given arrangement `arr`. */
|
||||||
|
void attach(Arrangement_2& arr);
|
||||||
|
|
||||||
|
/*! detaches the observer from its arrangement. */
|
||||||
|
void detach();
|
||||||
|
|
||||||
|
/// @}
|
||||||
|
|
||||||
|
/// \name Notifications on Global Arrangement Operations
|
||||||
|
/// @{
|
||||||
|
|
||||||
|
/*! issued just before the attached arrangement is assigned with the contents of another
|
||||||
|
* arrangement.
|
||||||
|
* \param arr The other arrangement. Notice that the arrangement type is the type used to
|
||||||
|
* instantiate the observer, which is conveniently defined as
|
||||||
|
* `Arrangement_2::Base_aos`.
|
||||||
|
*/
|
||||||
|
virtual void before_assign(const typename Arrangement_2::Base_aos& arr);
|
||||||
|
|
||||||
|
/*! issued immediately after the attached arrangement has been assigned with
|
||||||
|
* the contents of another arrangement.
|
||||||
|
*/
|
||||||
|
virtual void after_assign();
|
||||||
|
|
||||||
|
/*! issued just before the attached arrangement is cleared. */
|
||||||
|
virtual void before_clear();
|
||||||
|
|
||||||
|
/*! issued immediately after the attached arrangement has been cleared, so it
|
||||||
|
* now consists only of a the unbounded face `uf`.
|
||||||
|
*/
|
||||||
|
virtual void after_clear(Face_handle uf);
|
||||||
|
|
||||||
|
/*! issued just before a global function starts to modify the attached
|
||||||
|
* arrangement. It is guaranteed that no queries (especially no point-location
|
||||||
|
* queries) are issued until the termination of the global function is
|
||||||
|
* indicated by `after_global_change()`.
|
||||||
|
*/
|
||||||
|
virtual void before_global_change();
|
||||||
|
|
||||||
|
/*!
|
||||||
|
issued immediately after a global function has stopped modifying the
|
||||||
|
attached arrangement.
|
||||||
|
*/
|
||||||
|
virtual void after_global_change();
|
||||||
|
|
||||||
|
/// @}
|
||||||
|
|
||||||
|
/// \name Notifications on Attachment or Detachment
|
||||||
|
/// @{
|
||||||
|
|
||||||
|
/*! issued just before the observer is attached to the arrangement instance
|
||||||
|
* `arr`.
|
||||||
|
* \param arr The arrangement that is about to attach the observer. Notice
|
||||||
|
* that the arrangement type is the type used to instantiate the
|
||||||
|
* observer, which is conveniently defined as
|
||||||
|
* `Arrangement_2::Base_aos`.
|
||||||
|
*/
|
||||||
|
virtual void before_attach(const typename Arrangement_2::Base_aos& arr);
|
||||||
|
|
||||||
|
/*! issued immediately after the observer has been attached to an arrangement
|
||||||
|
* instance.
|
||||||
|
*/
|
||||||
|
virtual void after_attach();
|
||||||
|
|
||||||
|
/*! issued just before the observer is detached from its arrangement instance.
|
||||||
|
*/
|
||||||
|
virtual void before_detach();
|
||||||
|
|
||||||
|
/*! issued immediately after the observer has been detached from its
|
||||||
|
* arrangement instance.
|
||||||
|
*/
|
||||||
|
virtual void after_detach();
|
||||||
|
|
||||||
|
/// @}
|
||||||
|
|
||||||
|
/// \name Notifications on Local Changes in the Arrangement
|
||||||
|
/// @{
|
||||||
|
|
||||||
|
/*! issued just before a new vertex that corresponds to the point `p` is
|
||||||
|
* created.
|
||||||
|
*/
|
||||||
|
virtual void before_create_vertex(const Point_2& p);
|
||||||
|
|
||||||
|
/*! issued immediately after a new vertex `v` has been created. Note that the
|
||||||
|
* vertex still has no incident edges and is not connected to any other vertex.
|
||||||
|
*/
|
||||||
|
virtual void after_create_vertex(Vertex_handle v);
|
||||||
|
|
||||||
|
/*! issued just before a new vertex at infinity is created, `cv` is the curve
|
||||||
|
* incident to the surface boundary, `ind` is the relevant curve-end, `ps_x`
|
||||||
|
* is the boundary condition of the vertex in \f$x\f$ and `ps_y` is the
|
||||||
|
* boundary condition of the vertex in \f$y\f$.
|
||||||
|
*/
|
||||||
|
virtual void before_create_boundary_vertex(const X_monotone_curve_2& cv,
|
||||||
|
Arr_curve_end ind,
|
||||||
|
Arr_parameter_space ps_x,
|
||||||
|
Arr_parameter_space ps_y);
|
||||||
|
|
||||||
|
/*! issued immediately after a new vertex `v` has been created. Note that the
|
||||||
|
* vertex still has no incident edges and is not connected to any other vertex.
|
||||||
|
*/
|
||||||
|
virtual void after_create_boundary_vertex(Vertex_handle v);
|
||||||
|
|
||||||
|
/*! issued just before a new edge that corresponds to the \f$x\f$-monotone
|
||||||
|
* curve `c` and connects the vertices `v1` and `v2` is created.
|
||||||
|
*/
|
||||||
|
virtual void before_create_edge(const X_monotone_curve_2& c,
|
||||||
|
Vertex_handle v1, Vertex_handle v2);
|
||||||
|
|
||||||
|
/*! issued immediately after a new edge `e` has been created. The halfedge
|
||||||
|
* that is sent to this function is always directed from `v1` to `v2` (see
|
||||||
|
* `before_create_edge()`).
|
||||||
|
*/
|
||||||
|
virtual void after_create_edge(Halfedge_handle e);
|
||||||
|
|
||||||
|
/*! issued just before a vertex `v` is modified to be associated with the point
|
||||||
|
* `p`.
|
||||||
|
*/
|
||||||
|
virtual void before_modify_vertex(Vertex_handle v, const Point_2& p);
|
||||||
|
|
||||||
|
/*! issued immediately after an existing vertex `v` has been modified. */
|
||||||
|
virtual void after_modify_vertex(Vertex_handle v);
|
||||||
|
|
||||||
|
/*! issued just before an edge `e` is modified to be associated with the
|
||||||
|
* \f$x\f$-monotone curve `c`.
|
||||||
|
*/
|
||||||
|
virtual void before_modify_edge(Halfedge_handle e,
|
||||||
|
const X_monotone_curve_2& c);
|
||||||
|
|
||||||
|
/*! issued immediately after an existing edge `e` has been modified. */
|
||||||
|
virtual void after_modify_edge(Halfedge_handle e);
|
||||||
|
|
||||||
|
/*! issued just before an edge `e` is split into two edges that should be
|
||||||
|
* associated with the \f$x\f$-monotone curves `c1` and `c2`. The vertex `v`
|
||||||
|
* corresponds to the split point, and will be used to separate the two
|
||||||
|
* resulting edges.
|
||||||
|
*/
|
||||||
|
virtual void before_split_edge(Halfedge_handle e, Vertex_handle v,
|
||||||
|
const X_monotone_curve_2& c1,
|
||||||
|
const X_monotone_curve_2& c2);
|
||||||
|
|
||||||
|
/*! issued immediately after an existing edge has been split into the two
|
||||||
|
* given edges `e1` and `e2`.
|
||||||
|
*/
|
||||||
|
virtual void after_split_edge(Halfedge_handle e1, Halfedge_handle e2);
|
||||||
|
|
||||||
|
/*! issued just before a fictitious edge `e` is split into two. The vertex at
|
||||||
|
* infinity `v` corresponds to the split point, and will be used to separate
|
||||||
|
* the two resulting edges.
|
||||||
|
*/
|
||||||
|
virtual void before_split_fictitious_edge(Halfedge_handle e, Vertex_handle v);
|
||||||
|
|
||||||
|
/*! issued immediately after an existing fictitious edge has been split into
|
||||||
|
* the two given fictitious edges `e1` and `e2`.
|
||||||
|
*/
|
||||||
|
virtual void after_split_fictitious_edge(Halfedge_handle e1,
|
||||||
|
Halfedge_handle e2);
|
||||||
|
|
||||||
|
/*! issued just before a face `f` is split into two, as a result of the
|
||||||
|
* insertion of the edge `e` into the arrangement.
|
||||||
|
*/
|
||||||
|
virtual void before_split_face(Face_handle f, Halfedge_handle e);
|
||||||
|
|
||||||
|
/*! issued immediately after the existing face `f1` has been split, such that
|
||||||
|
* a portion of it now forms a new face `f2`. The flag `is_hole` designates
|
||||||
|
* whether `f2` forms a hole (an inner CCB) inside `f1`.
|
||||||
|
*/
|
||||||
|
virtual void after_split_face(Face_handle f1, Face_handle f2, bool is_hole);
|
||||||
|
|
||||||
|
/*! issued just before outer CCB `h` inside a face `f` is split into two, as a
|
||||||
|
* result of the removal of the edge `e` from the arrangement.
|
||||||
|
*/
|
||||||
|
virtual void before_split_outer_ccb(Face_handle f, Ccb_halfedge_circulator h,
|
||||||
|
Halfedge_handle e);
|
||||||
|
|
||||||
|
/*! issued immediately after an outer CCB of the face `f` has been split,
|
||||||
|
* resulting in the two holes `h1` and `h2`.
|
||||||
|
*/
|
||||||
|
virtual void after_split_outer_ccb(Face_handle f,
|
||||||
|
Ccb_halfedge_circulator h1,
|
||||||
|
Ccb_halfedge_circulator h2);
|
||||||
|
|
||||||
|
/*! issued just before an inner CCB `h` inside a face `f` is split into two,
|
||||||
|
* as a result of the removal of the edge `e` from the arrangement.
|
||||||
|
*/
|
||||||
|
virtual void before_split_inner_ccb(Face_handle f, Ccb_halfedge_circulator h,
|
||||||
|
Halfedge_handle e);
|
||||||
|
|
||||||
|
/*! issued immediately after an inner CCB of the face `f` has been split,
|
||||||
|
* resulting in the two inner CCBs (holes) `h1` and `h2`.
|
||||||
|
*/
|
||||||
|
virtual void after_split_inner_ccb(Face_handle f,
|
||||||
|
Ccb_halfedge_circulator h1,
|
||||||
|
Ccb_halfedge_circulator h2);
|
||||||
|
|
||||||
|
/*! issued just before the edge `e` is inserted as a new outer CCB inside the
|
||||||
|
* face `f`.
|
||||||
|
*/
|
||||||
|
virtual void before_add_outer_ccb(Face_handle f, Halfedge_handle e);
|
||||||
|
|
||||||
|
/*! issued immediately after a new outer ccb `h` has been created. The outer
|
||||||
|
* ccb always consists of a single pair of twin halfedges.
|
||||||
|
*/
|
||||||
|
virtual void after_add_outer_ccb(Ccb_halfedge_circulator h);
|
||||||
|
|
||||||
|
/*! issued just before the edge `e` is inserted as a new inner CCB inside the
|
||||||
|
* face `f`.
|
||||||
|
*/
|
||||||
|
virtual void before_add_inner_ccb(Face_handle f, Halfedge_handle e);
|
||||||
|
|
||||||
|
/*! issued immediately after a new inner CCB `h` has been created. The inner
|
||||||
|
* CCB always consists of a single pair of twin halfedges.
|
||||||
|
*/
|
||||||
|
virtual void after_add_inner_ccb(Ccb_halfedge_circulator h);
|
||||||
|
|
||||||
|
/*! issued just before the vertex `v` is inserted as an isolated vertex inside
|
||||||
|
* the face `f`.
|
||||||
|
*/
|
||||||
|
virtual void before_add_isolated_vertex(Face_handle f, Vertex_handle v);
|
||||||
|
|
||||||
|
/*! issued immediately after the vertex `v` has been set as an isolated vertex.
|
||||||
|
*/
|
||||||
|
virtual void after_add_isolated_vertex(Vertex_handle v);
|
||||||
|
|
||||||
|
/*! issued just before the two edges `e1` and `e2` are merged to form a single
|
||||||
|
* edge that will be associated with the \f$x\f$-monotone curve `c`.
|
||||||
|
*/
|
||||||
|
virtual void before_merge_edge(Halfedge_handle e1, Halfedge_handle e2,
|
||||||
|
const X_monotone_curve_2& c);
|
||||||
|
|
||||||
|
/*! issued immediately after two edges have been merged to form the edge `e`.
|
||||||
|
*/
|
||||||
|
virtual void after_merge_edge(Halfedge_handle e);
|
||||||
|
|
||||||
|
/*! issued just before the two fictitious edges `e1` and `e2` are merged to
|
||||||
|
* form a single fictitious edge.
|
||||||
|
*/
|
||||||
|
virtual void before_merge_fictitious_edge(Halfedge_handle e1,
|
||||||
|
Halfedge_handle e2);
|
||||||
|
|
||||||
|
/*! issued immediately after two fictitious edges have been merged to form the
|
||||||
|
* fictitious edge `e`.
|
||||||
|
*/
|
||||||
|
virtual void after_merge_fictitious_edge(Halfedge_handle e);
|
||||||
|
|
||||||
|
/*! issued just before the two edges `f1` and `f2` are merged to form a single
|
||||||
|
* face, following the removal of the edge `e` from the arrangement.
|
||||||
|
*/
|
||||||
|
virtual void before_merge_face(Face_handle f1, Face_handle f2,
|
||||||
|
Halfedge_handle e);
|
||||||
|
|
||||||
|
/*! issued immediately after two faces have been merged to form the face `f`.
|
||||||
|
*/
|
||||||
|
virtual void after_merge_face(Face_handle f);
|
||||||
|
|
||||||
|
/*! issued just before two outer ccbs `h1` and `h2` inside the face `f` are
|
||||||
|
* merged to form a single connected component, following the insertion of the
|
||||||
|
* edge `e` into the arrangement.
|
||||||
|
*/
|
||||||
|
virtual void before_merge_outer_ccb(Face_handle f,
|
||||||
|
Ccb_halfedge_circulator h1,
|
||||||
|
Ccb_halfedge_circulator h2,
|
||||||
|
Halfedge_handle e);
|
||||||
|
|
||||||
|
/*! issued immediately after two outer cCBs have been merged to form a single
|
||||||
|
* outer CCB `h` inside the face `f`.
|
||||||
|
*/
|
||||||
|
virtual void after_merge_outer_ccb(Face_handle f, Ccb_halfedge_circulator h);
|
||||||
|
|
||||||
|
/*! issued just before two inner CCBs `h1` and `h2` inside the face `f` are
|
||||||
|
* merged to form a single connected component, following the insertion of the
|
||||||
|
* edge `e` into the arrangement.
|
||||||
|
*/
|
||||||
|
virtual void before_merge_inner_ccb(Face_handle f,
|
||||||
|
Ccb_halfedge_circulator h1,
|
||||||
|
Ccb_halfedge_circulator h2,
|
||||||
|
Halfedge_handle e);
|
||||||
|
|
||||||
|
/*! issued immediately after two inner CCBs have been merged to form a single
|
||||||
|
* inner CCB `h` inside the face `f`.
|
||||||
|
*/
|
||||||
|
virtual void after_merge_inner_ccb(Face_handle f, Ccb_halfedge_circulator h);
|
||||||
|
|
||||||
|
/*! issued just before the outer CCB `h` is moved from one face to another.
|
||||||
|
* This can happen if the face `to_f` containing the outer CCB has just been
|
||||||
|
* split from `from_f`.
|
||||||
|
*/
|
||||||
|
virtual void before_move_outer_ccb(Face_handle from_f, Face_handle to_f,
|
||||||
|
Ccb_halfedge_circulator h);
|
||||||
|
|
||||||
|
/*! issued immediately after the outer CCB `h` has been moved to a new face.
|
||||||
|
*/
|
||||||
|
virtual void after_move_outer_ccb(Ccb_halfedge_circulator h);
|
||||||
|
|
||||||
|
/*! issued just before the inner CCB `h` is moved from one face to another.
|
||||||
|
* This can happen if the face `to_f` containing the inner CCB has just been
|
||||||
|
* split from `from_f`.
|
||||||
|
*/
|
||||||
|
virtual void before_move_inner_ccb(Face_handle from_f, Face_handle to_f,
|
||||||
|
Ccb_halfedge_circulator h);
|
||||||
|
|
||||||
|
/*! issued immediately after the inner CCB `h` has been moved to a new face.
|
||||||
|
*/
|
||||||
|
virtual void after_move_inner_ccb(Ccb_halfedge_circulator h);
|
||||||
|
|
||||||
|
/*! issued just before the isolated vertex `v` is moved from one face to
|
||||||
|
* another. This can happen if the face `to_f` containing the isolated vertex
|
||||||
|
* has just been split from `from_f`.
|
||||||
|
*/
|
||||||
|
virtual void before_move_isolated_vertex(Face_handle from_f,
|
||||||
|
Face_handle to_f, Vertex_handle v);
|
||||||
|
|
||||||
|
/*! issued immediately after the isolated vertex `v` has been moved to a new
|
||||||
|
* face.
|
||||||
|
*/
|
||||||
|
virtual void after_move_isolated_vertex(Vertex_handle v);
|
||||||
|
|
||||||
|
/*! issued just before the vertex `v` is removed from the arrangement. */
|
||||||
|
virtual void before_remove_vertex(Vertex_handle v);
|
||||||
|
|
||||||
|
/*! issued immediately after a vertex has been removed (and deleted) from the
|
||||||
|
* arrangement.
|
||||||
|
*/
|
||||||
|
virtual void after_remove_vertex();
|
||||||
|
|
||||||
|
/*! issued just before the edge `e` is removed from the arrangement. */
|
||||||
|
virtual void before_remove_edge(Halfedge_handle e);
|
||||||
|
|
||||||
|
/*! issued immediately after an edge has been removed (and deleted) from the
|
||||||
|
* arrangement.
|
||||||
|
*/
|
||||||
|
virtual void after_remove_edge();
|
||||||
|
|
||||||
|
/*! issued just before the outer ccb `f` is removed from inside the face `f`.
|
||||||
|
*/
|
||||||
|
virtual void before_remove_outer_ccb(Face_handle f, Ccb_halfedge_circulator h);
|
||||||
|
|
||||||
|
/*! issued immediately after a outer CCB has been removed (and deleted) from
|
||||||
|
* inside the face `f`.
|
||||||
|
*/
|
||||||
|
virtual void after_remove_outer_ccb(Face_handle f);
|
||||||
|
|
||||||
|
/*! issued just before the inner CCB `f` is removed from inside the face `f`.
|
||||||
|
*/
|
||||||
|
virtual void before_remove_inner_ccb(Face_handle f,
|
||||||
|
Ccb_halfedge_circulator h);
|
||||||
|
|
||||||
|
/*! issued immediately after a inner CCB has been removed (and deleted) from
|
||||||
|
* inside the face `f`.
|
||||||
|
*/
|
||||||
|
virtual void after_remove_inner_ccb(Face_handle f);
|
||||||
|
|
||||||
|
/// @}
|
||||||
|
|
||||||
|
}; /* end Aos_observer */
|
||||||
|
} /* end namespace CGAL */
|
||||||
|
|
@ -1,77 +1,69 @@
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
/*!
|
/*! \ingroup PkgArrangementOnSurface2Ref
|
||||||
\ingroup PkgArrangementOnSurface2Ref
|
*
|
||||||
|
* `Arr_face_index_map` maintains a mapping of face handles of an attached
|
||||||
|
* arrangement object to indices (of type `unsigned int`). This class template
|
||||||
|
* is a model of the concept `ReadablePropertyMap`. A mapping between face
|
||||||
|
* handles and indices enables convenient usage of property-map classes supplied
|
||||||
|
* by `boost`. For example, the property-map class templates
|
||||||
|
* `boost::vector_property_map`, which is based on `std::vector`, and
|
||||||
|
* `boost::iterator_property_map`, which can be used to implement a property map
|
||||||
|
* based on a native \CC array, require the user to supply a mapping such as
|
||||||
|
* `Arr_face_index_map`.
|
||||||
|
*
|
||||||
|
* As new faces might be inserted into the attached arrangement, and
|
||||||
|
* existing faces might be removed, the notification mechanism is used
|
||||||
|
* to dynamically maintain the mapping of face handles to indices.
|
||||||
|
*
|
||||||
|
* \cgalModels{DefaultConstructible,CopyConstructible,Assignable,ReadablePropertyMap}
|
||||||
|
*
|
||||||
|
* \sa `Arr_vertex_index_map<Arrangement>`
|
||||||
|
*/
|
||||||
|
|
||||||
`Arr_face_index_map` maintains a mapping of face handles of an
|
template <typename Arrangement_>
|
||||||
attached arrangement object to indices (of type `unsigned int`).
|
class Arr_face_index_map: public Arrangement_::Observer {
|
||||||
This class template is a model of the concept
|
public:
|
||||||
`ReadablePropertyMap`. A mapping between face handles and indices
|
|
||||||
enables convenient usage of property-map classes supplied by `boost`.
|
|
||||||
For example, the property-map class templates
|
|
||||||
`boost::vector_property_map`, which is based on `std::vector`,
|
|
||||||
and `boost::iterator_property_map`, which can be used to implement
|
|
||||||
a property map based on a native \CC array, require the
|
|
||||||
user to supply a mapping such as `Arr_face_index_map`.
|
|
||||||
|
|
||||||
As new faces might be inserted into the attached arrangement, and
|
/// \name Types
|
||||||
existing faces might be removed, the notification mechanism is used
|
/// @{
|
||||||
to dynamically maintain the mapping of face handles to indices.
|
|
||||||
|
|
||||||
|
/*! the type of the attached arrangement.
|
||||||
|
*/
|
||||||
|
typedef Arrangement_ Arrangement_2;
|
||||||
|
typedef typename Arrangement_2::Base_aos Base_aos;
|
||||||
|
|
||||||
\cgalModels{DefaultConstructible,CopyConstructible,Assignable,ReadablePropertyMap}
|
typedef boost::readable_property_map_tag category;
|
||||||
|
|
||||||
\sa `Arr_observer<Arrangement>`
|
typedef unsigned int value_type;
|
||||||
\sa `Arr_vertex_index_map<Arrangement>`
|
|
||||||
*/
|
|
||||||
|
|
||||||
template< typename Arrangement >
|
typedef unsigned int reference;
|
||||||
class Arr_face_index_map: public Arr_observer<Arrangement> {
|
|
||||||
public:
|
|
||||||
|
|
||||||
/// \name Types
|
typedef Face_handle key_type;
|
||||||
/// @{
|
|
||||||
|
|
||||||
/*!
|
/*! The face handle type.
|
||||||
the type of the attached arrangement.
|
*/
|
||||||
*/
|
typedef typename Base_aos::Face_handle Face_handle;
|
||||||
typedef Arrangement Arrangement_2;
|
|
||||||
|
|
||||||
typedef boost::readable_property_map_tag category;
|
/*! The type of mapping of faces to indices.
|
||||||
|
*/
|
||||||
|
typedef Unique_hash_map<Face_handle, value_type> Index_map;
|
||||||
|
|
||||||
typedef unsigned int value_type;
|
/// @}
|
||||||
|
|
||||||
typedef unsigned int reference;
|
/// \name Creation
|
||||||
|
/// @{
|
||||||
|
|
||||||
typedef Face_handle key_type;
|
/*! constructs a map that is unattached to any arrangement instance.
|
||||||
|
*/
|
||||||
|
Arr_face_index_map();
|
||||||
|
|
||||||
/*!
|
/*! constructs a map and attaches it to the given arrangement `arr`.
|
||||||
The face handle type.
|
*/
|
||||||
*/
|
Arr_face_index_map(Base_aos& arr);
|
||||||
typedef typename Arrangement_2::Face_handle Face_handle;
|
|
||||||
|
|
||||||
/*!
|
/// @}
|
||||||
The type of mapping of faces to indices.
|
|
||||||
*/
|
|
||||||
typedef Unique_hash_map<Face_handle, value_type> Index_map;
|
|
||||||
|
|
||||||
/// @}
|
}; /* end Arr_accessor */
|
||||||
|
|
||||||
/// \name Creation
|
|
||||||
/// @{
|
|
||||||
|
|
||||||
/*!
|
|
||||||
constructs a map that is unattached to any arrangement instance.
|
|
||||||
*/
|
|
||||||
Arr_face_index_map();
|
|
||||||
|
|
||||||
/*!
|
|
||||||
constructs a map and attaches it to the given arrangement `arr`.
|
|
||||||
*/
|
|
||||||
Arr_face_index_map(Arrangement_2& arr);
|
|
||||||
|
|
||||||
/// @}
|
|
||||||
|
|
||||||
}; /* end Arr_accessor */
|
|
||||||
} /* end namespace CGAL */
|
} /* end namespace CGAL */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,408 +2,14 @@ namespace CGAL {
|
||||||
|
|
||||||
/*! \ingroup PkgArrangementOnSurface2Ref
|
/*! \ingroup PkgArrangementOnSurface2Ref
|
||||||
*
|
*
|
||||||
* \anchor arr_refarr_obs
|
* `Arr_observer<Arrangement_2>` is an alias for
|
||||||
*
|
* Aos_observer<Arrangement_on_surface_2>`,
|
||||||
* `Arr_observer` serves as an abstract base class for all observer classes that
|
* where `Arrangement_2` derives from `Arrangement_on_surface_2` and the latter
|
||||||
* are attached to an arrangement instance of type `Arrangement` and receive
|
* is an instance of the template
|
||||||
* notifications from the arrangement. This base class handles the attachment
|
* `CGAL::Arrangement_on_surface_2<GeometryTraits, TopologyTraits>`.
|
||||||
* of the observer to a given arrangement instance or to the detachment of the
|
|
||||||
* observer from this arrangement instance. It also gives a default empty
|
|
||||||
* implementation to all notification functions that are invoked by the
|
|
||||||
* arrangement to notify the observer on local or global changes it undergoes.
|
|
||||||
* The notification functions are all virtual functions, so they can be
|
|
||||||
* overridden by the concrete observer classes that inherit from `Arr_observer`.
|
|
||||||
*
|
|
||||||
* In order to implement a concrete arrangement observer-class, one simply needs
|
|
||||||
* to derive from `Arr_observer` and override the relevant notification
|
|
||||||
* functions. For example, if only face-split events are of interest, it is
|
|
||||||
* sufficient to override just `before_split_face()` (or just
|
|
||||||
* `after_split_face()`).
|
|
||||||
*/
|
*/
|
||||||
template< typename Arrangement >
|
|
||||||
class Arr_observer {
|
|
||||||
public:
|
|
||||||
|
|
||||||
/// \name Types
|
template <typename Arrangement_>
|
||||||
/// @{
|
using Arr_observer = typename Arrangement_::Observer;
|
||||||
|
|
||||||
/*! the type of the associated arrangement. */
|
} // namespace CGAL
|
||||||
typedef unspecified_type Arrangement_2;
|
|
||||||
|
|
||||||
/*! the point type. */
|
|
||||||
typedef typename Arrangement_2::Point_2 Point_2;
|
|
||||||
|
|
||||||
/*! the \f$ x\f$-monotone curve type. */
|
|
||||||
typedef typename Arrangement_2::X_monotone_curve_2 X_monotone_curve_2;
|
|
||||||
|
|
||||||
/*! */
|
|
||||||
typedef typename Arrangement_2::Vertex_handle Vertex_handle;
|
|
||||||
|
|
||||||
/*! */
|
|
||||||
typedef typename Arrangement_2::Halfedge_handle Halfedge_handle;
|
|
||||||
|
|
||||||
/*! */
|
|
||||||
typedef typename Arrangement_2::Face_handle Face_handle;
|
|
||||||
|
|
||||||
/*! represents a connected component of the boundary (CCB), either an outer
|
|
||||||
* boundary or an inner boundary (the latter is also referred to as a hole).
|
|
||||||
*/
|
|
||||||
typedef typename Arrangement_2::Ccb_halfedge_circulator Ccb_halfedge_circulator;
|
|
||||||
|
|
||||||
/// @}
|
|
||||||
|
|
||||||
/// \name Creation
|
|
||||||
/// @{
|
|
||||||
|
|
||||||
/*! constructs an observer that is unattached to any arrangement instance. */
|
|
||||||
Arr_observer();
|
|
||||||
|
|
||||||
/*! constructs an observer and attaches it to the given arrangement `arr`. */
|
|
||||||
Arr_observer(Arrangement_2& arr);
|
|
||||||
|
|
||||||
/// @}
|
|
||||||
|
|
||||||
/// \name Modifiers
|
|
||||||
/// @{
|
|
||||||
|
|
||||||
/*! attaches the observer to the given arrangement `arr`. */
|
|
||||||
void attach(Arrangement_2& arr);
|
|
||||||
|
|
||||||
/*! detaches the observer from its arrangement. */
|
|
||||||
void detach();
|
|
||||||
|
|
||||||
/// @}
|
|
||||||
|
|
||||||
/// \name Notifications on Global Arrangement Operations
|
|
||||||
/// @{
|
|
||||||
|
|
||||||
/*! issued just before the attached arrangement is assigned with the contents of
|
|
||||||
* another arrangement `arr`.
|
|
||||||
*/
|
|
||||||
virtual void before_assign(const Arrangement_2& arr);
|
|
||||||
|
|
||||||
/*! issued immediately after the attached arrangement has been assigned with the
|
|
||||||
* contents of another arrangement.
|
|
||||||
*/
|
|
||||||
virtual void after_assign();
|
|
||||||
|
|
||||||
/*! issued just before the attached arrangement is cleared. */
|
|
||||||
virtual void before_clear();
|
|
||||||
|
|
||||||
/*! issued immediately after the attached arrangement has been cleared, so it
|
|
||||||
* now consists only of a the unbounded face `uf`.
|
|
||||||
*/
|
|
||||||
virtual void after_clear(Face_handle uf);
|
|
||||||
|
|
||||||
/*! issued just before a global function starts to modify the attached
|
|
||||||
* arrangement. It is guaranteed that no queries (especially no point-location
|
|
||||||
* queries) are issued until the termination of the global function is indicated
|
|
||||||
* by `after_global_change()`.
|
|
||||||
*/
|
|
||||||
virtual void before_global_change();
|
|
||||||
|
|
||||||
/*!
|
|
||||||
issued immediately after a global function has stopped modifying the
|
|
||||||
attached arrangement.
|
|
||||||
*/
|
|
||||||
virtual void after_global_change();
|
|
||||||
|
|
||||||
/// @}
|
|
||||||
|
|
||||||
/// \name Notifications on Attachment or Detachment
|
|
||||||
/// @{
|
|
||||||
|
|
||||||
/*! issued just before the observer is attached to the arrangement instance
|
|
||||||
* `arr`.
|
|
||||||
*/
|
|
||||||
virtual void before_attach(const Arrangement_2& arr);
|
|
||||||
|
|
||||||
/*! issued immediately after the observer has been attached to an arrangement
|
|
||||||
* instance.
|
|
||||||
*/
|
|
||||||
virtual void after_attach();
|
|
||||||
|
|
||||||
/*! issued just before the observer is detached from its arrangement instance.
|
|
||||||
*/
|
|
||||||
virtual void before_detach();
|
|
||||||
|
|
||||||
/*! issued immediately after the observer has been detached from its arrangement
|
|
||||||
* instance.
|
|
||||||
*/
|
|
||||||
virtual void after_detach();
|
|
||||||
|
|
||||||
/// @}
|
|
||||||
|
|
||||||
/// \name Notifications on Local Changes in the Arrangement
|
|
||||||
/// @{
|
|
||||||
|
|
||||||
/*! issued just before a new vertex that corresponds to the point `p` is
|
|
||||||
* created.
|
|
||||||
*/
|
|
||||||
virtual void before_create_vertex(const Point_2& p);
|
|
||||||
|
|
||||||
/*! issued immediately after a new vertex `v` has been created. Note that the
|
|
||||||
* vertex still has no incident edges and is not connected to any other vertex.
|
|
||||||
*/
|
|
||||||
virtual void after_create_vertex(Vertex_handle v);
|
|
||||||
|
|
||||||
/*! issued just before a new vertex at infinity is created, `cv` is the curve
|
|
||||||
* incident to the surface boundary, `ind` is the relevant curve-end, `ps_x` is
|
|
||||||
* the boundary condition of the vertex in \f$ x\f$ and `ps_y` is the boundary
|
|
||||||
* condition of the vertex in \f$ y\f$.
|
|
||||||
*/
|
|
||||||
virtual void before_create_boundary_vertex(const X_monotone_curve_2& cv,
|
|
||||||
Arr_curve_end ind,
|
|
||||||
Arr_parameter_space ps_x,
|
|
||||||
Arr_parameter_space ps_y);
|
|
||||||
|
|
||||||
/*! issued immediately after a new vertex `v` has been created. Note that the
|
|
||||||
* vertex still has no incident edges and is not connected to any other vertex.
|
|
||||||
*/
|
|
||||||
virtual void after_create_boundary_vertex(Vertex_handle v);
|
|
||||||
|
|
||||||
/*! issued just before a new edge that corresponds to the \f$ x\f$-monotone
|
|
||||||
* curve `c` and connects the vertices `v1` and `v2` is created.
|
|
||||||
*/
|
|
||||||
virtual void before_create_edge(const X_monotone_curve_2& c,
|
|
||||||
Vertex_handle v1, Vertex_handle v2);
|
|
||||||
|
|
||||||
/*! issued immediately after a new edge `e` has been created. The halfedge that
|
|
||||||
* is sent to this function is always directed from `v1` to `v2` (see above).
|
|
||||||
*/
|
|
||||||
virtual void after_create_edge(Halfedge_handle e);
|
|
||||||
|
|
||||||
/*! issued just before a vertex `v` is modified to be associated with the point
|
|
||||||
* `p`.
|
|
||||||
*/
|
|
||||||
virtual void before_modify_vertex(Vertex_handle v, const Point_2& p);
|
|
||||||
|
|
||||||
/*! issued immediately after an existing vertex `v` has been modified. */
|
|
||||||
virtual void after_modify_vertex(Vertex_handle v);
|
|
||||||
|
|
||||||
/*! issued just before an edge `e` is modified to be associated with the \f$
|
|
||||||
* x\f$-monotone curve `c`.
|
|
||||||
*/
|
|
||||||
virtual void before_modify_edge(Halfedge_handle e, const X_monotone_curve_2& c);
|
|
||||||
|
|
||||||
/*! issued immediately after an existing edge `e` has been modified. */
|
|
||||||
virtual void after_modify_edge(Halfedge_handle e);
|
|
||||||
|
|
||||||
/*! issued just before an edge `e` is split into two edges that should be
|
|
||||||
* associated with the \f$ x\f$-monotone curves `c1` and `c2`. The vertex `v`
|
|
||||||
* corresponds to the split point, and will be used to separate the two
|
|
||||||
* resulting edges.
|
|
||||||
*/
|
|
||||||
virtual void before_split_edge(Halfedge_handle e, Vertex_handle v,
|
|
||||||
const X_monotone_curve_2& c1,
|
|
||||||
const X_monotone_curve_2& c2);
|
|
||||||
|
|
||||||
/*! issued immediately after an existing edge has been split into the two given
|
|
||||||
* edges `e1` and `e2`.
|
|
||||||
*/
|
|
||||||
virtual void after_split_edge(Halfedge_handle e1, Halfedge_handle e2);
|
|
||||||
|
|
||||||
/*! issued just before a fictitious edge `e` is split into two. The vertex at
|
|
||||||
* infinity `v` corresponds to the split point, and will be used to separate the
|
|
||||||
* two resulting edges.
|
|
||||||
*/
|
|
||||||
virtual void before_split_fictitious_edge(Halfedge_handle e, Vertex_handle v);
|
|
||||||
|
|
||||||
/*! issued immediately after an existing fictitious edge has been split into the
|
|
||||||
* two given fictitious edges `e1` and `e2`.
|
|
||||||
*/
|
|
||||||
virtual void after_split_fictitious_edge(Halfedge_handle e1, Halfedge_handle e2);
|
|
||||||
|
|
||||||
/*! issued just before a face `f` is split into two, as a result of the
|
|
||||||
* insertion of the edge `e` into the arrangement.
|
|
||||||
*/
|
|
||||||
virtual void before_split_face(Face_handle f, Halfedge_handle e);
|
|
||||||
|
|
||||||
/*! issued immediately after the existing face `f1` has been split, such that a
|
|
||||||
* portion of it now forms a new face `f2`. The flag `is_hole` designates
|
|
||||||
* whether `f2` forms a hole (an inner CCB) inside `f1`.
|
|
||||||
*/
|
|
||||||
virtual void after_split_face(Face_handle f1, Face_handle f2, bool is_hole);
|
|
||||||
|
|
||||||
/*! issued just before outer ccb `h` inside a face `f` is split into two, as a
|
|
||||||
* result of the removal of the edge `e` from the arrangement.
|
|
||||||
*/
|
|
||||||
virtual void before_split_outer_ccb(Face_handle f, Ccb_halfedge_circulator h,
|
|
||||||
Halfedge_handle e);
|
|
||||||
|
|
||||||
/*! issued immediately after an outer ccb of the face `f` has been split,
|
|
||||||
* resulting in the two holes `h1` and `h2`.
|
|
||||||
*/
|
|
||||||
virtual void after_split_outer_ccb(Face_handle f,
|
|
||||||
Ccb_halfedge_circulator h1,
|
|
||||||
Ccb_halfedge_circulator h2);
|
|
||||||
|
|
||||||
/*! issued just before an inner ccb `h` inside a face `f` is split into two, as
|
|
||||||
* a result of the removal of the edge `e` from the arrangement.
|
|
||||||
*/
|
|
||||||
virtual void before_split_inner_ccb(Face_handle f, Ccb_halfedge_circulator h,
|
|
||||||
Halfedge_handle e);
|
|
||||||
|
|
||||||
/*! issued immediately after an inner ccb of the face `f` has been split,
|
|
||||||
* resulting in the two inner CCBs (holes) `h1` and `h2`.
|
|
||||||
*/
|
|
||||||
virtual void after_split_inner_ccb(Face_handle f,
|
|
||||||
Ccb_halfedge_circulator h1,
|
|
||||||
Ccb_halfedge_circulator h2);
|
|
||||||
|
|
||||||
/*! issued just before the edge `e` is inserted as a new outer ccb inside the
|
|
||||||
* face `f`.
|
|
||||||
*/
|
|
||||||
virtual void before_add_outer_ccb(Face_handle f, Halfedge_handle e);
|
|
||||||
|
|
||||||
/*! issued immediately after a new outer ccb `h` has been created. The outer ccb
|
|
||||||
* always consists of a single pair of twin halfedges.
|
|
||||||
*/
|
|
||||||
virtual void after_add_outer_ccb(Ccb_halfedge_circulator h);
|
|
||||||
|
|
||||||
/*! issued just before the edge `e` is inserted as a new inner ccb inside the
|
|
||||||
* face `f`.
|
|
||||||
*/
|
|
||||||
virtual void before_add_inner_ccb(Face_handle f, Halfedge_handle e);
|
|
||||||
|
|
||||||
/*! issued immediately after a new inner ccb `h` has been created. The inner ccb
|
|
||||||
* always consists of a single pair of twin halfedges.
|
|
||||||
*/
|
|
||||||
virtual void after_add_inner_ccb(Ccb_halfedge_circulator h);
|
|
||||||
|
|
||||||
/*! issued just before the vertex `v` is inserted as an isolated vertex inside
|
|
||||||
* the face `f`.
|
|
||||||
*/
|
|
||||||
virtual void before_add_isolated_vertex(Face_handle f, Vertex_handle v);
|
|
||||||
|
|
||||||
/*! issued immediately after the vertex `v` has been set as an isolated vertex.
|
|
||||||
*/
|
|
||||||
virtual void after_add_isolated_vertex(Vertex_handle v);
|
|
||||||
|
|
||||||
/*! issued just before the two edges `e1` and `e2` are merged to form a single
|
|
||||||
* edge that will be associated with the \f$ x\f$-monotone curve `c`.
|
|
||||||
*/
|
|
||||||
virtual void before_merge_edge(Halfedge_handle e1, Halfedge_handle e2,
|
|
||||||
const X_monotone_curve_2& c);
|
|
||||||
|
|
||||||
/*! issued immediately after two edges have been merged to form the edge `e`. */
|
|
||||||
virtual void after_merge_edge(Halfedge_handle e);
|
|
||||||
|
|
||||||
/*! issued just before the two fictitious edges `e1` and `e2` are merged to form
|
|
||||||
* a single fictitious edge.
|
|
||||||
*/
|
|
||||||
virtual void before_merge_fictitious_edge(Halfedge_handle e1,
|
|
||||||
Halfedge_handle e2);
|
|
||||||
|
|
||||||
/*! issued immediately after two fictitious edges have been merged to form the
|
|
||||||
* fictitious edge `e`.
|
|
||||||
*/
|
|
||||||
virtual void after_merge_fictitious_edge(Halfedge_handle e);
|
|
||||||
|
|
||||||
/*! issued just before the two edges `f1` and `f2` are merged to form a single
|
|
||||||
* face, following the removal of the edge `e` from the arrangement.
|
|
||||||
*/
|
|
||||||
virtual void before_merge_face(Face_handle f1, Face_handle f2,
|
|
||||||
Halfedge_handle e);
|
|
||||||
|
|
||||||
/*! issued immediately after two faces have been merged to form the face `f`. */
|
|
||||||
virtual void after_merge_face(Face_handle f);
|
|
||||||
|
|
||||||
/*! issued just before two outer ccbs `h1` and `h2` inside the face `f` are
|
|
||||||
* merged to form a single connected component, following the insertion of the
|
|
||||||
* edge `e` into the arrangement.
|
|
||||||
*/
|
|
||||||
virtual void before_merge_outer_ccb(Face_handle f,
|
|
||||||
Ccb_halfedge_circulator h1,
|
|
||||||
Ccb_halfedge_circulator h2,
|
|
||||||
Halfedge_handle e);
|
|
||||||
|
|
||||||
/*! issued immediately after two outer ccbs have been merged to form a single
|
|
||||||
* outer ccb `h` inside the face `f`.
|
|
||||||
*/
|
|
||||||
virtual void after_merge_outer_ccb(Face_handle f, Ccb_halfedge_circulator h);
|
|
||||||
|
|
||||||
/*! issued just before two inner ccbs `h1` and `h2` inside the face `f` are
|
|
||||||
* merged to form a single connected component, following the insertion of the
|
|
||||||
* edge `e` into the arrangement.
|
|
||||||
*/
|
|
||||||
virtual void before_merge_inner_ccb(Face_handle f,
|
|
||||||
Ccb_halfedge_circulator h1,
|
|
||||||
Ccb_halfedge_circulator h2,
|
|
||||||
Halfedge_handle e);
|
|
||||||
|
|
||||||
/*! issued immediately after two inner ccbs have been merged to form a single
|
|
||||||
* inner ccb `h` inside the face `f`.
|
|
||||||
*/
|
|
||||||
virtual void after_merge_inner_ccb(Face_handle f, Ccb_halfedge_circulator h);
|
|
||||||
|
|
||||||
/*! issued just before the outer ccb `h` is moved from one face to another.
|
|
||||||
* This can happen if the face `to_f` containing the outer ccb has just been
|
|
||||||
* split from `from_f`.
|
|
||||||
*/
|
|
||||||
virtual void before_move_outer_ccb(Face_handle from_f, Face_handle to_f,
|
|
||||||
Ccb_halfedge_circulator h);
|
|
||||||
|
|
||||||
/*! issued immediately after the outer ccb `h` has been moved to a new face. */
|
|
||||||
virtual void after_move_outer_ccb(Ccb_halfedge_circulator h);
|
|
||||||
|
|
||||||
/*! issued just before the inner ccb `h` is moved from one face to another.
|
|
||||||
* This can happen if the face `to_f` containing the inner ccb has just been
|
|
||||||
* split from `from_f`.
|
|
||||||
*/
|
|
||||||
virtual void before_move_inner_ccb(Face_handle from_f, Face_handle to_f,
|
|
||||||
Ccb_halfedge_circulator h);
|
|
||||||
|
|
||||||
/*! issued immediately after the inner ccb `h` has been moved to a new face. */
|
|
||||||
virtual void after_move_inner_ccb(Ccb_halfedge_circulator h);
|
|
||||||
|
|
||||||
/*! issued just before the isolated vertex `v` is moved from one face to
|
|
||||||
* another. This can happen if the face `to_f` containing the isolated vertex
|
|
||||||
* has just been split from `from_f`.
|
|
||||||
*/
|
|
||||||
virtual void before_move_isolated_vertex(Face_handle from_f,
|
|
||||||
Face_handle to_f, Vertex_handle v);
|
|
||||||
|
|
||||||
/*! issued immediately after the isolated vertex `v` has been moved to a new
|
|
||||||
* face.
|
|
||||||
*/
|
|
||||||
virtual void after_move_isolated_vertex(Vertex_handle v);
|
|
||||||
|
|
||||||
/*! issued just before the vertex `v` is removed from the arrangement. */
|
|
||||||
virtual void before_remove_vertex(Vertex_handle v);
|
|
||||||
|
|
||||||
/*! issued immediately after a vertex has been removed (and deleted) from the
|
|
||||||
* arrangement.
|
|
||||||
*/
|
|
||||||
virtual void after_remove_vertex();
|
|
||||||
|
|
||||||
/*! issued just before the edge `e` is removed from the arrangement. */
|
|
||||||
virtual void before_remove_edge(Halfedge_handle e);
|
|
||||||
|
|
||||||
/*! issued immediately after an edge has been removed (and deleted) from the
|
|
||||||
* arrangement.
|
|
||||||
*/
|
|
||||||
virtual void after_remove_edge();
|
|
||||||
|
|
||||||
/*! issued just before the outer ccb `f` is removed from inside the face `f`. */
|
|
||||||
virtual void before_remove_outer_ccb(Face_handle f, Ccb_halfedge_circulator h);
|
|
||||||
|
|
||||||
/*! issued immediately after a outer ccb has been removed (and deleted) from
|
|
||||||
* inside the face `f`.
|
|
||||||
*/
|
|
||||||
virtual void after_remove_outer_ccb(Face_handle f);
|
|
||||||
|
|
||||||
/*! issued just before the inner ccb `f` is removed from inside the face `f`.
|
|
||||||
*/
|
|
||||||
virtual void before_remove_inner_ccb(Face_handle f,
|
|
||||||
Ccb_halfedge_circulator h);
|
|
||||||
|
|
||||||
/*! issued immediately after a inner ccb has been removed (and deleted) from
|
|
||||||
* inside the face `f`.
|
|
||||||
*/
|
|
||||||
virtual void after_remove_inner_ccb(Face_handle f);
|
|
||||||
|
|
||||||
/// @}
|
|
||||||
|
|
||||||
}; /* end Arr_observer */
|
|
||||||
} /* end namespace CGAL */
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
/*!
|
/*! \ingroup PkgArrangementOnSurface2PointLocation
|
||||||
* \ingroup PkgArrangementOnSurface2PointLocation
|
|
||||||
*
|
*
|
||||||
* \anchor arr_reftri_pl
|
* \anchor arr_reftri_pl
|
||||||
*
|
*
|
||||||
|
|
@ -23,7 +22,6 @@ namespace CGAL {
|
||||||
*/
|
*/
|
||||||
|
|
||||||
template <typename Arrangement_>
|
template <typename Arrangement_>
|
||||||
class Arr_triangulation_point_location : public Arr_observer<Arrangement_>
|
class Arr_triangulation_point_location : public Arrangement_::Observer {}
|
||||||
{}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,82 +1,69 @@
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
/*!
|
/*! \ingroup PkgArrangementOnSurface2Ref
|
||||||
\ingroup PkgArrangementOnSurface2Ref
|
*
|
||||||
|
* `Arr_vertex_index_map` maintains a mapping of vertex handles of an attached
|
||||||
|
* arrangement object to indices (of type `unsigned int`). This class template
|
||||||
|
* is a model of the concept `ReadablePropertyMap`. A mapping between vertex
|
||||||
|
* handles and indices enables convenient usage of property-map classes supplied
|
||||||
|
* by `boost`. For example, the property-map class templates
|
||||||
|
* `boost::vector_property_map`, which is based on `std::vector`, and
|
||||||
|
* `boost::iterator_property_map`, which can be used to implement a property map
|
||||||
|
* based on a native \CC array, require the user to supply a mapping such as
|
||||||
|
* `Arr_vertex_index_map`.
|
||||||
|
*
|
||||||
|
* As new vertices might be inserted into the attached arrangement, and
|
||||||
|
* existing vertices might be removed, the notification mechanism is used
|
||||||
|
* to dynamically maintain the mapping of vertex handles to indices.
|
||||||
|
*
|
||||||
|
* \cgalModels{DefaultConstructible,CopyConstructible,Assignable,ReadablePropertyMap}
|
||||||
|
*
|
||||||
|
* \sa `Arr_face_index_map<Arrangement>`
|
||||||
|
*/
|
||||||
|
|
||||||
`Arr_vertex_index_map` maintains a mapping of vertex handles of an
|
template< typename Arrangement_>
|
||||||
attached arrangement object to indices (of type `unsigned int`).
|
class Arr_vertex_index_map: public Arrangement_::Observer {
|
||||||
This class template is a model of the concept
|
public:
|
||||||
`ReadablePropertyMap`. A mapping between vertex handles and indices
|
|
||||||
enables convenient usage of property-map classes supplied by `boost`.
|
|
||||||
For example, the property-map class templates
|
|
||||||
`boost::vector_property_map`, which is based on `std::vector`,
|
|
||||||
and `boost::iterator_property_map`, which can be used to implement
|
|
||||||
a property map based on a native \CC array, require the
|
|
||||||
user to supply a mapping such as `Arr_vertex_index_map`.
|
|
||||||
|
|
||||||
As new vertices might be inserted into the attached arrangement, and
|
/// \name Types
|
||||||
existing vertices might be removed, the notification mechanism is used
|
/// @{
|
||||||
to dynamically maintain the mapping of vertex handles to indices.
|
|
||||||
|
|
||||||
|
/*! the type of the attached arrangement.
|
||||||
|
*/
|
||||||
|
typedef Arrangement_ Arrangement_2;
|
||||||
|
typedef typename Arrangement_2::Base_aos Base_aos;
|
||||||
|
|
||||||
\cgalModels{DefaultConstructible,CopyConstructible,Assignable,ReadablePropertyMap}
|
typedef boost::readable_property_map_tag category;
|
||||||
|
|
||||||
\sa `Arr_observer<Arrangement>`
|
typedef unsigned int value_type;
|
||||||
\sa `Arr_face_index_map<Arrangement>`
|
|
||||||
*/
|
|
||||||
|
|
||||||
template< typename Arrangement >
|
typedef unsigned int reference;
|
||||||
class Arr_vertex_index_map: public Arr_observer<Arrangement> {
|
|
||||||
public:
|
|
||||||
|
|
||||||
/// \name Types
|
typedef Vertex_handle key_type;
|
||||||
/// @{
|
|
||||||
|
|
||||||
/*!
|
/*! The vertex handle type.
|
||||||
the type of the attached arrangement.
|
*/
|
||||||
*/
|
typedef typename Base_aos::Vertex_handle Vertex_handle;
|
||||||
typedef Arrangement Arrangement_2;
|
|
||||||
|
|
||||||
typedef boost::readable_property_map_tag category;
|
/*! The type of mapping of vertices to indices.
|
||||||
|
*/
|
||||||
|
typedef Unique_hash_map<Vertex_handle, value_type> Index_map;
|
||||||
|
|
||||||
typedef unsigned int value_type;
|
/// @}
|
||||||
|
|
||||||
typedef unsigned int reference;
|
/// \name Creation
|
||||||
|
/// @{
|
||||||
|
|
||||||
typedef Vertex_handle key_type;
|
/*! constructs a map that is unattached to any arrangement instance.
|
||||||
|
*/
|
||||||
|
Arr_vertex_index_map();
|
||||||
|
|
||||||
/*!
|
/*! constructs a map and attaches it to the given arrangement `arr`.
|
||||||
The vertex handle type.
|
*/
|
||||||
*/
|
Arr_vertex_index_map(Base_aos& arr);
|
||||||
typedef typename Arrangement_2::Vertex_handle Vertex_handle;
|
|
||||||
|
|
||||||
/*!
|
/// @}
|
||||||
The type of mapping of vertices to indices.
|
|
||||||
*/
|
|
||||||
typedef Unique_hash_map<Vertex_handle, value_type> Index_map;
|
|
||||||
|
|
||||||
/// @}
|
}; /* end Arr_accessor */
|
||||||
|
|
||||||
/// \name Creation
|
|
||||||
/// @{
|
|
||||||
|
|
||||||
/*!
|
|
||||||
constructs a map that is unattached to any arrangement instance.
|
|
||||||
*/
|
|
||||||
Arr_vertex_index_map();
|
|
||||||
|
|
||||||
/*!
|
|
||||||
constructs a map and attaches it to the given arrangement `arr`.
|
|
||||||
*/
|
|
||||||
Arr_vertex_index_map(Arrangement_2& arr);
|
|
||||||
|
|
||||||
/// @}
|
|
||||||
|
|
||||||
}; /* end Arr_accessor */
|
|
||||||
} /* end namespace CGAL */
|
} /* end namespace CGAL */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -199,7 +199,8 @@ implemented as peripheral classes or as free (global) functions.
|
||||||
- `CGAL::Arrangement_2<Traits,Dcel>`
|
- `CGAL::Arrangement_2<Traits,Dcel>`
|
||||||
- `CGAL::Arrangement_with_history_2<Traits,Dcel>`
|
- `CGAL::Arrangement_with_history_2<Traits,Dcel>`
|
||||||
- `CGAL::Arr_accessor<Arrangement>`
|
- `CGAL::Arr_accessor<Arrangement>`
|
||||||
- `CGAL::Arr_observer<Arrangement>`
|
- `CGAL::Aos_observer<ArrangementOnSurface_2>`
|
||||||
|
- `CGAL::Arr_observer<Arrangement_2>`
|
||||||
- `CGAL::Arrangement_2::Vertex`
|
- `CGAL::Arrangement_2::Vertex`
|
||||||
- `CGAL::Arrangement_2::Halfedge`
|
- `CGAL::Arrangement_2::Halfedge`
|
||||||
- `CGAL::Arrangement_2::Face`
|
- `CGAL::Arrangement_2::Face`
|
||||||
|
|
|
||||||
|
|
@ -18,9 +18,10 @@ private:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Face_index_observer(Ex_arrangement& arr) :
|
Face_index_observer(Ex_arrangement& arr) :
|
||||||
CGAL::Arr_observer<Ex_arrangement>(arr), n_faces(0)
|
CGAL::Arr_observer<Ex_arrangement>(arr),
|
||||||
|
n_faces(0)
|
||||||
{
|
{
|
||||||
CGAL_precondition (arr.is_empty());
|
CGAL_precondition(arr.is_empty());
|
||||||
arr.unbounded_face()->set_data (0);
|
arr.unbounded_face()->set_data (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -55,22 +55,6 @@ int main() {
|
||||||
// Landmarks_pl landmarks_pl(gm);
|
// Landmarks_pl landmarks_pl(gm);
|
||||||
Walk_pl walk_pl(gm);
|
Walk_pl walk_pl(gm);
|
||||||
// Trap_pl trap_pl(gm);
|
// Trap_pl trap_pl(gm);
|
||||||
/* Need to add the code below to both Arr_spherical_gaussian_map_3 and
|
|
||||||
* Arr_polyhedral_sgm, and then work on the trap point location code...
|
|
||||||
|
|
||||||
private:
|
|
||||||
friend class Arr_observer<Self>;
|
|
||||||
friend class Arr_accessor<Self>;
|
|
||||||
|
|
||||||
protected:
|
|
||||||
typedef Arr_observer<Self> Observer;
|
|
||||||
|
|
||||||
void _register_observer(Observer *p_obs)
|
|
||||||
{ Base::_register_observer((typename Base::Observer*)p_obs); }
|
|
||||||
|
|
||||||
bool _unregister_observer(Observer *p_obs)
|
|
||||||
{ return (Base::_unregister_observer ((typename Base::Observer*)p_obs)); }
|
|
||||||
*/
|
|
||||||
|
|
||||||
Gm_traits traits;
|
Gm_traits traits;
|
||||||
Gm_initializer gm_initializer(gm);
|
Gm_initializer gm_initializer(gm);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,571 @@
|
||||||
|
// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel).
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// This file is part of CGAL (www.cgal.org).
|
||||||
|
//
|
||||||
|
// $URL$
|
||||||
|
// $Id$
|
||||||
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// Author(s): Ron Wein <wein@post.tau.ac.il>
|
||||||
|
// Efi Fogel <efifogel@gmail.com>
|
||||||
|
|
||||||
|
#ifndef CGAL_AOS_OBSERVER_H
|
||||||
|
#define CGAL_AOS_OBSERVER_H
|
||||||
|
|
||||||
|
#include <CGAL/license/Arrangement_on_surface_2.h>
|
||||||
|
|
||||||
|
#include <CGAL/disable_warnings.h>
|
||||||
|
|
||||||
|
#include <CGAL/Arr_enums.h>
|
||||||
|
|
||||||
|
/*! \file
|
||||||
|
* Definition of the `Aos_observer<Arrangement>` base class.
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace CGAL {
|
||||||
|
|
||||||
|
/*! \class
|
||||||
|
* A base class for arrangement observers.
|
||||||
|
* The Arrangement parameter corresponds to an arrangement instantiation.
|
||||||
|
*/
|
||||||
|
template <typename Arrangement_>
|
||||||
|
class Aos_observer {
|
||||||
|
public:
|
||||||
|
typedef Arrangement_ Arrangement_2;
|
||||||
|
typedef Aos_observer<Arrangement_2> Self;
|
||||||
|
|
||||||
|
typedef typename Arrangement_2::Point_2 Point_2;
|
||||||
|
typedef typename Arrangement_2::X_monotone_curve_2 X_monotone_curve_2;
|
||||||
|
|
||||||
|
typedef typename Arrangement_2::Vertex_handle Vertex_handle;
|
||||||
|
typedef typename Arrangement_2::Halfedge_handle Halfedge_handle;
|
||||||
|
typedef typename Arrangement_2::Face_handle Face_handle;
|
||||||
|
typedef typename Arrangement_2::Ccb_halfedge_circulator
|
||||||
|
Ccb_halfedge_circulator;
|
||||||
|
|
||||||
|
private:
|
||||||
|
Arrangement_2* p_arr; // The associated arrangement.
|
||||||
|
|
||||||
|
/*! Copy constructor - not supported. */
|
||||||
|
Aos_observer(const Self&);
|
||||||
|
|
||||||
|
/*! Assignment operator - not supported. */
|
||||||
|
Self& operator=(const Self&);
|
||||||
|
|
||||||
|
public:
|
||||||
|
/// \name Construction and destruction functions.
|
||||||
|
//@{
|
||||||
|
|
||||||
|
/*! Default constructor. */
|
||||||
|
Aos_observer() : p_arr(nullptr) {}
|
||||||
|
|
||||||
|
/*! Constructor with an associated arrangement. */
|
||||||
|
Aos_observer(Arrangement_2& arr) : p_arr(&arr)
|
||||||
|
{
|
||||||
|
// Register the observer object in the arrangement.
|
||||||
|
p_arr->_register_observer(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*! Destructor. */
|
||||||
|
virtual ~Aos_observer()
|
||||||
|
{
|
||||||
|
// Unregister the observer object from the arrangement.
|
||||||
|
if (p_arr != nullptr)
|
||||||
|
p_arr->_unregister_observer(this);
|
||||||
|
}
|
||||||
|
//@}
|
||||||
|
|
||||||
|
/// \name Modifying the associated arrangement.
|
||||||
|
//@{
|
||||||
|
|
||||||
|
/*! Get the associated arrangement (const version). */
|
||||||
|
const Arrangement_2* arrangement() const { return (p_arr); }
|
||||||
|
|
||||||
|
/*! Get the associated arrangement (non-const version). */
|
||||||
|
Arrangement_2* arrangement() { return (p_arr); }
|
||||||
|
|
||||||
|
/*! Attach the observer to an arrangement.
|
||||||
|
* \pre The observer is not already attached to an arrangement.
|
||||||
|
*/
|
||||||
|
void attach(Arrangement_2& arr)
|
||||||
|
{
|
||||||
|
// Do nothing if the associated arrangement is not changed.
|
||||||
|
if (p_arr == &arr) return;
|
||||||
|
|
||||||
|
// The observer is not already attached to an arrangement.
|
||||||
|
CGAL_precondition (p_arr == nullptr);
|
||||||
|
|
||||||
|
if (p_arr != nullptr) return;
|
||||||
|
|
||||||
|
// Notify the concrete observer (the sub-class) about the attachment.
|
||||||
|
before_attach(arr);
|
||||||
|
|
||||||
|
// Register the observer object in the new arrangement.
|
||||||
|
p_arr = &arr;
|
||||||
|
p_arr->_register_observer(this);
|
||||||
|
|
||||||
|
// Notify the concrete observer that the attachment took place.
|
||||||
|
after_attach();
|
||||||
|
}
|
||||||
|
|
||||||
|
/*! Detach the observer from the arrangement. */
|
||||||
|
void detach()
|
||||||
|
{
|
||||||
|
if (p_arr == nullptr) return;
|
||||||
|
|
||||||
|
// Notify the concrete observer (the sub-class) about the detachment.
|
||||||
|
before_detach ();
|
||||||
|
|
||||||
|
// Unregister the observer object from the current arrangement, and mark
|
||||||
|
// that the observer is not attached to an arrangement.
|
||||||
|
p_arr->_unregister_observer(this);
|
||||||
|
p_arr = nullptr;
|
||||||
|
|
||||||
|
// Notify the concrete observer that the detachment took place.
|
||||||
|
after_detach();
|
||||||
|
}
|
||||||
|
//@}
|
||||||
|
|
||||||
|
/// \name Notification functions on global arrangement operations.
|
||||||
|
//@{
|
||||||
|
|
||||||
|
/*! Notification before the arrangement is assigned with another
|
||||||
|
* arrangement.
|
||||||
|
* \param arr The arrangement to be copied.
|
||||||
|
*/
|
||||||
|
virtual void before_assign(const Arrangement_2& /* arr */) {}
|
||||||
|
|
||||||
|
/*! Notification after the arrangement has been assigned with another
|
||||||
|
* arrangement.
|
||||||
|
*/
|
||||||
|
virtual void after_assign() {}
|
||||||
|
|
||||||
|
/*! Notification before the arrangement is cleared. */
|
||||||
|
virtual void before_clear() {}
|
||||||
|
|
||||||
|
/*! Notification after the arrangement is cleared. */
|
||||||
|
virtual void after_clear() {}
|
||||||
|
|
||||||
|
/*! Notification before a global operation modifies the arrangement. */
|
||||||
|
virtual void before_global_change() {}
|
||||||
|
|
||||||
|
/*! Notification after a global operation is completed. */
|
||||||
|
virtual void after_global_change() {}
|
||||||
|
//@}
|
||||||
|
|
||||||
|
/// \name Notification functions on observer attachment or detachment.
|
||||||
|
//@{
|
||||||
|
|
||||||
|
/*! Notification before the observer is attached to an arrangement.
|
||||||
|
* \param arr The arrangement that is about to attach the observer.
|
||||||
|
*/
|
||||||
|
virtual void before_attach(const Arrangement_2& /* arr */) {}
|
||||||
|
|
||||||
|
/*! Notification after the observer has been attached to an arrangement. */
|
||||||
|
virtual void after_attach() {}
|
||||||
|
|
||||||
|
/*! Notification before the observer is detached from the arrangement. */
|
||||||
|
virtual void before_detach() {}
|
||||||
|
|
||||||
|
/*! Notification after the observer has been detached from the arrangement. */
|
||||||
|
virtual void after_detach() {}
|
||||||
|
//@}
|
||||||
|
|
||||||
|
/// \name Notification functions on local changes in the arrangement.
|
||||||
|
//@{
|
||||||
|
|
||||||
|
/*! Notification before the creation of a new vertex.
|
||||||
|
* \param p The point to be associated with the vertex.
|
||||||
|
* This point cannot lie on the surface boundaries.
|
||||||
|
*/
|
||||||
|
virtual void before_create_vertex(const Point_2& /* p */) {}
|
||||||
|
|
||||||
|
/*! Notification after the creation of a new vertex.
|
||||||
|
* \param v A handle to the created vertex.
|
||||||
|
*/
|
||||||
|
virtual void after_create_vertex(Vertex_handle /* v */)
|
||||||
|
{}
|
||||||
|
|
||||||
|
/*! Notification before the creation of a new boundary vertex.
|
||||||
|
* \param p The point on the surface boundary.
|
||||||
|
* \param ps_x The boundary condition of the vertex in x.
|
||||||
|
* \param ps_y The boundary condition of the vertex in y.
|
||||||
|
*/
|
||||||
|
virtual void before_create_boundary_vertex(const Point_2& /* p */,
|
||||||
|
Arr_parameter_space /* ps_x */,
|
||||||
|
Arr_parameter_space /* ps_y */)
|
||||||
|
{}
|
||||||
|
|
||||||
|
/*! Notification before the creation of a new boundary vertex.
|
||||||
|
* \param cv The curve incident to the surface boundary.
|
||||||
|
* \param ind The relevant curve-end.
|
||||||
|
* \param ps_x The boundary condition of the vertex in x.
|
||||||
|
* \param ps_y The boundary condition of the vertex in y.
|
||||||
|
*/
|
||||||
|
virtual void before_create_boundary_vertex(const X_monotone_curve_2& /* cv */,
|
||||||
|
Arr_curve_end /* ind */,
|
||||||
|
Arr_parameter_space /* ps_x */,
|
||||||
|
Arr_parameter_space /* ps_y */)
|
||||||
|
{}
|
||||||
|
|
||||||
|
/*! Notification after the creation of a new vertex at infinity.
|
||||||
|
* \param v A handle to the created vertex.
|
||||||
|
*/
|
||||||
|
virtual void after_create_boundary_vertex(Vertex_handle /* v */) {}
|
||||||
|
|
||||||
|
/*! Notification before the creation of a new edge.
|
||||||
|
* \param c The \f$x\f$-monotone curve to be associated with the edge.
|
||||||
|
* \param v1 A handle to the first end-vertex of the edge.
|
||||||
|
* \param v2 A handle to the second end-vertex of the edge.
|
||||||
|
*/
|
||||||
|
virtual void before_create_edge(const X_monotone_curve_2& /* c */,
|
||||||
|
Vertex_handle /* v1 */,
|
||||||
|
Vertex_handle /* v2 */)
|
||||||
|
{}
|
||||||
|
|
||||||
|
/*! Notification after the creation of a new edge.
|
||||||
|
* \param e A handle to one of the twin halfedges that were created.
|
||||||
|
*/
|
||||||
|
virtual void after_create_edge(Halfedge_handle /* e */) {}
|
||||||
|
|
||||||
|
/*! Notification before the modification of an existing vertex.
|
||||||
|
* \param v A handle to the vertex to be updated.
|
||||||
|
* \param p The point to be associated with the vertex.
|
||||||
|
*/
|
||||||
|
virtual void before_modify_vertex(Vertex_handle /* v */,
|
||||||
|
const Point_2& /* p */)
|
||||||
|
{}
|
||||||
|
|
||||||
|
/*! Notification after a vertex was modified.
|
||||||
|
* \param v A handle to the updated vertex.
|
||||||
|
*/
|
||||||
|
virtual void after_modify_vertex(Vertex_handle /* v */) {}
|
||||||
|
|
||||||
|
/*! Notification before the modification of an existing edge.
|
||||||
|
* \param e A handle to one of the twin halfedges to be updated.
|
||||||
|
* \param c The \f$x\f$-monotone curve to be associated with the edge.
|
||||||
|
*/
|
||||||
|
virtual void before_modify_edge(Halfedge_handle /* e */,
|
||||||
|
const X_monotone_curve_2& /* c */)
|
||||||
|
{}
|
||||||
|
|
||||||
|
/*! Notification after an edge was modified.
|
||||||
|
* \param e A handle to one of the twin halfedges that were updated.
|
||||||
|
*/
|
||||||
|
virtual void after_modify_edge(Halfedge_handle /* e */) {}
|
||||||
|
|
||||||
|
/*! Notification before the splitting of an edge into two.
|
||||||
|
* \param e A handle to one of the existing halfedges.
|
||||||
|
* \param v A vertex representing the split point.
|
||||||
|
* \param c1 The \f$x\f$-monotone curve to be associated with the first edge.
|
||||||
|
* \param c2 The \f$x\f$-monotone curve to be associated with the second edge.
|
||||||
|
*/
|
||||||
|
virtual void before_split_edge(Halfedge_handle /* e */,
|
||||||
|
Vertex_handle /* v */,
|
||||||
|
const X_monotone_curve_2& /* c1 */,
|
||||||
|
const X_monotone_curve_2& /* c2 */)
|
||||||
|
{}
|
||||||
|
|
||||||
|
/*! Notification after an edge was split.
|
||||||
|
* \param e1 A handle to one of the twin halfedges forming the first edge.
|
||||||
|
* \param e2 A handle to one of the twin halfedges forming the second edge.
|
||||||
|
*/
|
||||||
|
virtual void after_split_edge(Halfedge_handle /* e1 */,
|
||||||
|
Halfedge_handle /* e2 */)
|
||||||
|
{}
|
||||||
|
|
||||||
|
/*! Notification before the splitting of a fictitious edge into two.
|
||||||
|
* \param e A handle to one of the existing halfedges.
|
||||||
|
* \param v A vertex representing the unbounded split point.
|
||||||
|
*/
|
||||||
|
virtual void before_split_fictitious_edge(Halfedge_handle /* e */,
|
||||||
|
Vertex_handle /* v */)
|
||||||
|
{}
|
||||||
|
|
||||||
|
/*! Notification after a fictitious edge was split.
|
||||||
|
* \param e1 A handle to one of the twin halfedges forming the first edge.
|
||||||
|
* \param e2 A handle to one of the twin halfedges forming the second edge.
|
||||||
|
*/
|
||||||
|
virtual void after_split_fictitious_edge(Halfedge_handle /* e1 */,
|
||||||
|
Halfedge_handle /* e2 */)
|
||||||
|
{}
|
||||||
|
|
||||||
|
/*! Notification before the splitting of a face into two.
|
||||||
|
* \param f A handle to the existing face.
|
||||||
|
* \param e The new edge whose insertion causes the face to split.
|
||||||
|
*/
|
||||||
|
virtual void before_split_face(Face_handle /* f */,
|
||||||
|
Halfedge_handle /* e */)
|
||||||
|
{}
|
||||||
|
|
||||||
|
/*! Notification after a face was split.
|
||||||
|
* \param f A handle to the face we have just split.
|
||||||
|
* \param new_f A handle to the new face that has been created.
|
||||||
|
* \param is_hole Whether the new face forms a hole inside f.
|
||||||
|
*/
|
||||||
|
virtual void after_split_face(Face_handle /* f */,
|
||||||
|
Face_handle /* new_f */,
|
||||||
|
bool /* is_hole */)
|
||||||
|
{}
|
||||||
|
|
||||||
|
/*! Notification before the splitting of an outer CCB into two.
|
||||||
|
* \param f A handle to the face that owns the outer CCB.
|
||||||
|
* \param h A circulator representing the component boundary.
|
||||||
|
* \param e The new edge whose removal causes the outer CCB to split.
|
||||||
|
*/
|
||||||
|
virtual void before_split_outer_ccb(Face_handle /* f */,
|
||||||
|
Ccb_halfedge_circulator /* h */,
|
||||||
|
Halfedge_handle /* e */)
|
||||||
|
{}
|
||||||
|
|
||||||
|
/*! Notification after an outer CCB was split.
|
||||||
|
* \param f A handle to the face that owns the outer CCBs.
|
||||||
|
* \param h1 A circulator representing the boundary of the first component.
|
||||||
|
* \param h2 A circulator representing the boundary of the second component.
|
||||||
|
*/
|
||||||
|
virtual void after_split_outer_ccb(Face_handle /* f */,
|
||||||
|
Ccb_halfedge_circulator /* h1 */,
|
||||||
|
Ccb_halfedge_circulator /* h2 */)
|
||||||
|
{}
|
||||||
|
|
||||||
|
/*! Notification before the splitting of an inner CCB into two.
|
||||||
|
* \param f A handle to the face containing the inner CCB.
|
||||||
|
* \param h A circulator representing the component boundary.
|
||||||
|
* \param e The new edge whose removal causes the inner CCB to split.
|
||||||
|
*/
|
||||||
|
virtual void before_split_inner_ccb(Face_handle /* f */,
|
||||||
|
Ccb_halfedge_circulator /* h */,
|
||||||
|
Halfedge_handle /* e */)
|
||||||
|
{}
|
||||||
|
|
||||||
|
/*! Notification after an inner CCB was split.
|
||||||
|
* \param f A handle to the face containing the inner CCBs.
|
||||||
|
* \param h1 A circulator representing the boundary of the first component.
|
||||||
|
* \param h2 A circulator representing the boundary of the second component.
|
||||||
|
*/
|
||||||
|
virtual void after_split_inner_ccb(Face_handle /* f */,
|
||||||
|
Ccb_halfedge_circulator /* h1 */,
|
||||||
|
Ccb_halfedge_circulator /* h2 */)
|
||||||
|
{}
|
||||||
|
|
||||||
|
/*! Notification before the creation of a new outer CCB of a face.
|
||||||
|
* \param f A handle to the face that owns the outer CCB.
|
||||||
|
* \param e A halfedge along the new outer CCB.
|
||||||
|
*/
|
||||||
|
virtual void before_add_outer_ccb(Face_handle /* f */,
|
||||||
|
Halfedge_handle /* e */)
|
||||||
|
{}
|
||||||
|
|
||||||
|
/*! Notification after an outer CCB was added to a face.
|
||||||
|
* \param h A circulator representing the boundary of the new outer CCB.
|
||||||
|
*/
|
||||||
|
virtual void after_add_outer_ccb(Ccb_halfedge_circulator /* h */) {}
|
||||||
|
|
||||||
|
/*! Notification before the creation of a new inner CCB inside a face.
|
||||||
|
* \param f A handle to the face containing the inner CCB.
|
||||||
|
* \param e The new halfedge that forms the new inner CCB.
|
||||||
|
*/
|
||||||
|
virtual void before_add_inner_ccb(Face_handle /* f */,
|
||||||
|
Halfedge_handle /* e */)
|
||||||
|
{}
|
||||||
|
|
||||||
|
/*! Notification after an inner CCB was created inside a face.
|
||||||
|
* \param h A circulator representing the boundary of the new inner CCB.
|
||||||
|
*/
|
||||||
|
virtual void after_add_inner_ccb(Ccb_halfedge_circulator /* h */) {}
|
||||||
|
|
||||||
|
/*! Notification before the creation of a new isolated vertex inside a face.
|
||||||
|
* \param f A handle to the face containing the isolated vertex.
|
||||||
|
* \param v The isolated vertex.
|
||||||
|
*/
|
||||||
|
virtual void before_add_isolated_vertex(Face_handle /* f */,
|
||||||
|
Vertex_handle /* v */)
|
||||||
|
{}
|
||||||
|
|
||||||
|
/*! Notification after an isolated vertex was created inside a face.
|
||||||
|
* \param v The isolated vertex.
|
||||||
|
*/
|
||||||
|
virtual void after_add_isolated_vertex(Vertex_handle /* v */) {}
|
||||||
|
|
||||||
|
/*! Notification before the merging of two edges.
|
||||||
|
* \param e1 A handle to one of the halfedges forming the first edge.
|
||||||
|
* \param e2 A handle to one of the halfedges forming the second edge.
|
||||||
|
* \param c The \f$x\f$-monotone curve to be associated with the merged edge.
|
||||||
|
*/
|
||||||
|
virtual void before_merge_edge(Halfedge_handle /* e1 */,
|
||||||
|
Halfedge_handle /* e2 */,
|
||||||
|
const X_monotone_curve_2& /* c */)
|
||||||
|
{}
|
||||||
|
|
||||||
|
/*! Notification after an edge was merged.
|
||||||
|
* \param e A handle to one of the twin halfedges forming the merged edge.
|
||||||
|
*/
|
||||||
|
virtual void after_merge_edge(Halfedge_handle /* e */) {}
|
||||||
|
|
||||||
|
/*! Notification before the merging of two fictitious edges.
|
||||||
|
* \param e1 A handle to one of the halfedges forming the first edge.
|
||||||
|
* \param e2 A handle to one of the halfedges forming the second edge.
|
||||||
|
*/
|
||||||
|
virtual void before_merge_fictitious_edge(Halfedge_handle /* e1 */,
|
||||||
|
Halfedge_handle /* e2 */)
|
||||||
|
{}
|
||||||
|
|
||||||
|
/*! Notification after a fictitious edge was merged.
|
||||||
|
* \param e A handle to one of the twin halfedges forming the merged edge.
|
||||||
|
*/
|
||||||
|
virtual void after_merge_fictitious_edge(Halfedge_handle /* e */) {}
|
||||||
|
|
||||||
|
/*! Notification before the merging of two faces.
|
||||||
|
* \param f1 A handle to the first face.
|
||||||
|
* \param f2 A handle to the second face.
|
||||||
|
* \param e The edge whose removal causes the faces to merge.
|
||||||
|
*/
|
||||||
|
virtual void before_merge_face(Face_handle /* f1 */,
|
||||||
|
Face_handle /* f2 */,
|
||||||
|
Halfedge_handle /* e */)
|
||||||
|
{}
|
||||||
|
|
||||||
|
/*! Notification after a face was merged.
|
||||||
|
* \param f A handle to the merged face.
|
||||||
|
*/
|
||||||
|
virtual void after_merge_face(Face_handle /* f */) {}
|
||||||
|
|
||||||
|
/*! Notification before the merging of two outer CCBs.
|
||||||
|
* \param f A handle to the face that owns the outer CCBs.
|
||||||
|
* \param h1 A circulator representing the boundary of the first component.
|
||||||
|
* \param h2 A circulator representing the boundary of the second component.
|
||||||
|
* \param e The edge whose insertion or removal causes the CCBs to merge.
|
||||||
|
*/
|
||||||
|
virtual void before_merge_outer_ccb(Face_handle /* f */,
|
||||||
|
Ccb_halfedge_circulator /* h1 */,
|
||||||
|
Ccb_halfedge_circulator /* h2 */,
|
||||||
|
Halfedge_handle /* e */)
|
||||||
|
{}
|
||||||
|
|
||||||
|
/*! Notification after an outer CCB was merged.
|
||||||
|
* \param f A handle to the face that owns the outer CCBs.
|
||||||
|
* \param h A circulator representing the boundary of the merged component.
|
||||||
|
*/
|
||||||
|
virtual void after_merge_outer_ccb(Face_handle /* f */,
|
||||||
|
Ccb_halfedge_circulator /* h */)
|
||||||
|
{}
|
||||||
|
|
||||||
|
/*! Notification before the merging of two inner CCBs (holes).
|
||||||
|
* \param f A handle to the face that contains the inner CCBs.
|
||||||
|
* \param h1 A circulator representing the boundary of the first component.
|
||||||
|
* \param h2 A circulator representing the boundary of the second component.
|
||||||
|
* \param e The edge whose insertion causes the inner CCBs to merge.
|
||||||
|
*/
|
||||||
|
virtual void before_merge_inner_ccb(Face_handle /* f */,
|
||||||
|
Ccb_halfedge_circulator /* h1 */,
|
||||||
|
Ccb_halfedge_circulator /* h2 */,
|
||||||
|
Halfedge_handle /* e */)
|
||||||
|
{}
|
||||||
|
|
||||||
|
/*! Notification after an inner CCB was merged.
|
||||||
|
* \param f A handle to the face that contains the inner CCBs.
|
||||||
|
* \param h A circulator representing the boundary of the merged component.
|
||||||
|
*/
|
||||||
|
virtual void after_merge_inner_ccb(Face_handle /* f */,
|
||||||
|
Ccb_halfedge_circulator /* h */)
|
||||||
|
{}
|
||||||
|
|
||||||
|
/*! Notification before an outer CCB is moved from one face to another.
|
||||||
|
* \param from_f A handle to the face that currently owns the outer CCB.
|
||||||
|
* \param to_f A handle to the face that should own the outer CCB.
|
||||||
|
* \param h A circulator representing the boundary of the component.
|
||||||
|
*/
|
||||||
|
virtual void before_move_outer_ccb(Face_handle /* from_f */,
|
||||||
|
Face_handle /* to_f */,
|
||||||
|
Ccb_halfedge_circulator /* h */)
|
||||||
|
{}
|
||||||
|
|
||||||
|
/*! Notification after an outer CCB is moved from one face to another.
|
||||||
|
* \param h A circulator representing the boundary of the component.
|
||||||
|
*/
|
||||||
|
virtual void after_move_outer_ccb(Ccb_halfedge_circulator /* h */) {}
|
||||||
|
|
||||||
|
|
||||||
|
/*! Notification before an inner CCB is moved from one face to another.
|
||||||
|
* \param from_f A handle to the face currently containing the inner CCB.
|
||||||
|
* \param to_f A handle to the face that should contain the inner CCB.
|
||||||
|
* \param h A circulator representing the boundary of the component.
|
||||||
|
*/
|
||||||
|
virtual void before_move_inner_ccb(Face_handle /* from_f */,
|
||||||
|
Face_handle /* to_f */,
|
||||||
|
Ccb_halfedge_circulator /* h */)
|
||||||
|
{}
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* Notification after an inner CCB is moved from one face to another.
|
||||||
|
* \param h A circulator representing the boundary of the component.
|
||||||
|
*/
|
||||||
|
virtual void after_move_inner_ccb(Ccb_halfedge_circulator /* h */) {}
|
||||||
|
|
||||||
|
/*! Notification before an isolated vertex is moved from one face to another.
|
||||||
|
* \param from_f A handle to the face currently containing the vertex.
|
||||||
|
* \param to_f A handle to the face that should contain the vertex.
|
||||||
|
* \param v The isolated vertex.
|
||||||
|
*/
|
||||||
|
virtual void before_move_isolated_vertex(Face_handle /* from_f */,
|
||||||
|
Face_handle /* to_f */,
|
||||||
|
Vertex_handle /* v */)
|
||||||
|
{}
|
||||||
|
|
||||||
|
/*! Notification after an isolated vertex is moved from one face to another.
|
||||||
|
* \param v The isolated vertex.
|
||||||
|
*/
|
||||||
|
virtual void after_move_isolated_vertex(Vertex_handle /* v */) {}
|
||||||
|
|
||||||
|
/*! Notificaion before the removal of a vertex.
|
||||||
|
* \param v A handle to the vertex to be deleted.
|
||||||
|
*/
|
||||||
|
virtual void before_remove_vertex(Vertex_handle /* v */) {}
|
||||||
|
|
||||||
|
/*! Notificaion after the removal of a vertex. */
|
||||||
|
virtual void after_remove_vertex() {}
|
||||||
|
|
||||||
|
/*! Notification before the removal of an edge.
|
||||||
|
* \param e A handle to one of the twin halfedges to be deleted.
|
||||||
|
*/
|
||||||
|
virtual void before_remove_edge(Halfedge_handle /* e */) {}
|
||||||
|
|
||||||
|
/*! Notificaion after the removal of an edge. */
|
||||||
|
virtual void after_remove_edge() {}
|
||||||
|
|
||||||
|
/*! Notification before the removal of an outer CCB.
|
||||||
|
* \param f The face that owns the outer CCB.
|
||||||
|
* \param h A circulator representing the boundary of the component.
|
||||||
|
*/
|
||||||
|
virtual void before_remove_outer_ccb(Face_handle /* f */,
|
||||||
|
Ccb_halfedge_circulator /* h */)
|
||||||
|
{}
|
||||||
|
|
||||||
|
/*! Notificaion after the removal of an outer CCB.
|
||||||
|
* \param f The face that used to own the outer CCB.
|
||||||
|
*/
|
||||||
|
virtual void after_remove_outer_ccb(Face_handle /* f */) {}
|
||||||
|
|
||||||
|
/*! Notification before the removal of an inner CCB.
|
||||||
|
* \param f The face containing the inner CCB.
|
||||||
|
* \param h A circulator representing the boundary of the component.
|
||||||
|
*/
|
||||||
|
virtual void before_remove_inner_ccb(Face_handle /* f */,
|
||||||
|
Ccb_halfedge_circulator /* h */)
|
||||||
|
{}
|
||||||
|
|
||||||
|
/*! Notificaion after the removal of an inner CCB.
|
||||||
|
* \param f The face that used to contain the inner CCB.
|
||||||
|
*/
|
||||||
|
virtual void after_remove_inner_ccb(Face_handle /* f */) {}
|
||||||
|
|
||||||
|
//@}
|
||||||
|
};
|
||||||
|
|
||||||
|
} //namespace CGAL
|
||||||
|
|
||||||
|
#include <CGAL/enable_warnings.h>
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
@ -5,15 +5,18 @@
|
||||||
//
|
//
|
||||||
// $URL$
|
// $URL$
|
||||||
// $Id$
|
// $Id$
|
||||||
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Author(s): Michael Kerber <mkerber@mpi-inf.mpg.de>
|
// Author(s): Michael Kerber <mkerber@mpi-inf.mpg.de>
|
||||||
//
|
//
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
#ifndef CGAL_ARR_ALGEBRAIC_SEGMENT_TRAITS
|
#ifndef CGAL_ARR_ALGEBRAIC_SEGMENT_TRAITS_H
|
||||||
#define CGAL_ARR_ALGEBRAIC_SEGMENT_TRAITS
|
#define CGAL_ARR_ALGEBRAIC_SEGMENT_TRAITS_H
|
||||||
|
|
||||||
|
#include <CGAL/license/Arrangement_on_surface_2.h>
|
||||||
|
|
||||||
|
|
||||||
#include <CGAL/disable_warnings.h>
|
#include <CGAL/disable_warnings.h>
|
||||||
|
|
||||||
|
|
@ -655,4 +658,4 @@ public:
|
||||||
|
|
||||||
#include <CGAL/enable_warnings.h>
|
#include <CGAL/enable_warnings.h>
|
||||||
|
|
||||||
#endif // CGAL_ARR_ALGEBRAIC_SEGMENT_TRAITS
|
#endif // CGAL_ARR_ALGEBRAIC_SEGMENT_TRAITS_H
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@
|
||||||
* Definition of the Arr_face_index_map<Arrangement> class.
|
* Definition of the Arr_face_index_map<Arrangement> class.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <CGAL/Arr_observer.h>
|
|
||||||
#include <CGAL/Unique_hash_map.h>
|
#include <CGAL/Unique_hash_map.h>
|
||||||
#include <CGAL/property_map.h>
|
#include <CGAL/property_map.h>
|
||||||
|
|
||||||
|
|
@ -34,140 +33,110 @@ namespace CGAL {
|
||||||
* arrangement faces to the indices 0, ..., (n -1), where n is the number
|
* arrangement faces to the indices 0, ..., (n -1), where n is the number
|
||||||
* of faces in the arrangement.
|
* of faces in the arrangement.
|
||||||
*/
|
*/
|
||||||
template <class Arrangement_>
|
template <typename Arrangement_>
|
||||||
class Arr_face_index_map : public Arr_observer<Arrangement_>
|
class Arr_face_index_map : public Arrangement_::Observer {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
|
using Arrangement_2 = Arrangement_;
|
||||||
|
using Base_aos = typename Arrangement_2::Base_aos;
|
||||||
|
|
||||||
typedef Arrangement_ Arrangement_2;
|
using Halfedge_handle = typename Base_aos::Halfedge_handle;
|
||||||
typedef typename Arrangement_2::Face_handle Face_handle;
|
using Face_handle = typename Base_aos::Face_handle;
|
||||||
|
|
||||||
// Boost property type definitions:
|
// Boost property type definitions:
|
||||||
typedef boost::readable_property_map_tag category;
|
using category = boost::readable_property_map_tag;
|
||||||
typedef unsigned int value_type;
|
using value_type = unsigned int;
|
||||||
typedef value_type reference;
|
using reference = value_type;
|
||||||
typedef Face_handle key_type;
|
using key_type = Face_handle;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
using Self = Arr_face_index_map<Arrangement_2>;
|
||||||
|
using Base = typename Arrangement_2::Observer;
|
||||||
|
|
||||||
typedef Arr_face_index_map<Arrangement_2> Self;
|
using Index_map = Unique_hash_map<Face_handle, unsigned int>;
|
||||||
typedef Arr_observer<Arrangement_2> Base;
|
|
||||||
|
|
||||||
typedef Unique_hash_map<Face_handle, unsigned int> Index_map;
|
|
||||||
|
|
||||||
// Data members:
|
// Data members:
|
||||||
unsigned int n_faces; // The current number of faces.
|
unsigned int n_faces; // The current number of faces.
|
||||||
Index_map index_map; // Mapping faces to indices.
|
Index_map index_map; // Mapping faces to indices.
|
||||||
std::vector<Face_handle> rev_map; // Mapping indices to faces.
|
std::vector<Face_handle> rev_map; // Mapping indices to faces.
|
||||||
|
|
||||||
enum {MIN_REV_MAP_SIZE = 32};
|
enum {MIN_REV_MAP_SIZE = 32};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/*! Default constructor. */
|
/*! Default constructor. */
|
||||||
Arr_face_index_map () :
|
Arr_face_index_map() :
|
||||||
Base (),
|
Base(),
|
||||||
n_faces (0),
|
n_faces(0),
|
||||||
rev_map (MIN_REV_MAP_SIZE)
|
rev_map(MIN_REV_MAP_SIZE)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*! Constructor with an associated arrangement. */
|
/*! Constructor with an associated arrangement. */
|
||||||
Arr_face_index_map (const Arrangement_2& arr) :
|
Arr_face_index_map(const Base_aos& arr) :
|
||||||
Base (const_cast<Arrangement_2&> (arr))
|
Base(const_cast<Base_aos&>(arr))
|
||||||
{
|
{ _init(); }
|
||||||
_init();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*! Copy constructor. */
|
/*! Copy constructor. */
|
||||||
Arr_face_index_map (const Self& other) :
|
Arr_face_index_map(const Self& other) :
|
||||||
Base (const_cast<Arrangement_2&> (*(other.arrangement())))
|
Base(const_cast<Base_aos&>(*(other.arrangement())))
|
||||||
{
|
{ _init(); }
|
||||||
_init();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*! Assignment operator. */
|
/*! Assignment operator. */
|
||||||
Self& operator= (const Self& other)
|
Self& operator= (const Self& other) {
|
||||||
{
|
if (this == &other) return (*this);
|
||||||
if (this == &other)
|
|
||||||
return (*this);
|
|
||||||
|
|
||||||
this->detach();
|
this->detach();
|
||||||
this->attach (const_cast<Arrangement_2&> (*(other.arrangement())));
|
this->attach(const_cast<Base_aos&>(*(other.arrangement())));
|
||||||
|
|
||||||
return (*this);
|
return (*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! Get the index of a given face.
|
||||||
* Get the index of a given face.
|
|
||||||
* \param f A handle to the face.
|
* \param f A handle to the face.
|
||||||
* \pre f is a valid face in the arrangement.
|
* \pre f is a valid face in the arrangement.
|
||||||
*/
|
*/
|
||||||
unsigned int operator[] (Face_handle f) const
|
unsigned int operator[](Face_handle f) const { return (index_map[f]); }
|
||||||
{
|
|
||||||
return (index_map[f]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*! Get the face given its index.
|
||||||
* Get the face given its index.
|
|
||||||
* \param i The index of the face.
|
* \param i The index of the face.
|
||||||
* \pre i is less than the number of faces in the arrangement.
|
* \pre i is less than the number of faces in the arrangement.
|
||||||
*/
|
*/
|
||||||
Face_handle face (const int i) const
|
Face_handle face(const int i) const {
|
||||||
{
|
|
||||||
CGAL_precondition((unsigned int) i < n_faces);
|
CGAL_precondition((unsigned int) i < n_faces);
|
||||||
|
|
||||||
return (rev_map[i]);
|
return (rev_map[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \name Notification functions, to keep the mapping up-to-date.
|
/// \name Notification functions, to keep the mapping up-to-date.
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
/*!
|
/*! Update the mapping after the arrangement has been assigned with another
|
||||||
* Update the mapping after the arrangement has been assigned with another
|
|
||||||
* arrangement.
|
* arrangement.
|
||||||
*/
|
*/
|
||||||
virtual void after_assign ()
|
virtual void after_assign() override { _init(); }
|
||||||
{
|
|
||||||
_init();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*! Update the mapping after the arrangement is cleared.
|
||||||
* Update the mapping after the arrangement is cleared.
|
|
||||||
*/
|
*/
|
||||||
virtual void after_clear ()
|
virtual void after_clear() override { _init(); }
|
||||||
{
|
|
||||||
_init();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*! Update the mapping after attaching to a new arrangement.
|
||||||
* Update the mapping after attaching to a new arrangement.
|
|
||||||
*/
|
*/
|
||||||
virtual void after_attach ()
|
virtual void after_attach() override { _init(); }
|
||||||
{
|
|
||||||
_init();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*! Update the mapping after detaching the arrangement.
|
||||||
* Update the mapping after detaching the arrangement.
|
|
||||||
*/
|
*/
|
||||||
virtual void after_detach ()
|
virtual void after_detach() override {
|
||||||
{
|
|
||||||
n_faces = 0;
|
n_faces = 0;
|
||||||
index_map.clear();
|
index_map.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! Update the mapping after the creation of a new face is split from another
|
||||||
* Update the mapping after the creation of a new face is split from another
|
|
||||||
* face.
|
* face.
|
||||||
* \param f A handle to the existing face.
|
* \param f A handle to the existing face.
|
||||||
* \param new_f A handle to the newly created face.
|
* \param new_f A handle to the newly created face.
|
||||||
*/
|
*/
|
||||||
virtual void after_split_face (Face_handle /* f */,
|
virtual void after_split_face(Face_handle /* f */,
|
||||||
Face_handle new_f,
|
Face_handle new_f,
|
||||||
bool /* is_hole */)
|
bool /* is_hole */) override {
|
||||||
{
|
|
||||||
// Update the number of vertices.
|
// Update the number of vertices.
|
||||||
n_faces++;
|
++n_faces;
|
||||||
|
|
||||||
// If necessary, allocate memory for the reverse mapping.
|
// If necessary, allocate memory for the reverse mapping.
|
||||||
if (rev_map.size() < n_faces)
|
if (rev_map.size() < n_faces)
|
||||||
|
|
@ -176,97 +145,77 @@ public:
|
||||||
// Update the mapping of the newly created face.
|
// Update the mapping of the newly created face.
|
||||||
index_map[new_f] = n_faces - 1;
|
index_map[new_f] = n_faces - 1;
|
||||||
rev_map[n_faces - 1] = new_f;
|
rev_map[n_faces - 1] = new_f;
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! Update the mapping before the merge of two faces.
|
||||||
* Update the mapping before the merge of two faces.
|
|
||||||
* \param f1 A handle to the face that is going to remain.
|
* \param f1 A handle to the face that is going to remain.
|
||||||
* \param f2 A handle to the face that is about to be removed.
|
* \param f2 A handle to the face that is about to be removed.
|
||||||
*/
|
*/
|
||||||
virtual void before_merge_face (Face_handle /* f1 */,
|
virtual void before_merge_face(Face_handle /* f1 */,
|
||||||
Face_handle f2,
|
Face_handle f2,
|
||||||
typename
|
Halfedge_handle /* e */) override {
|
||||||
Arrangement_2::Halfedge_handle /* e */)
|
|
||||||
{
|
|
||||||
// Update the number of faces.
|
// Update the number of faces.
|
||||||
n_faces--;
|
--n_faces;
|
||||||
|
|
||||||
// Reduce memory consumption in case the number of faces has
|
// Reduce memory consumption in case the number of faces has
|
||||||
// drastically decreased.
|
// drastically decreased.
|
||||||
if (2*n_faces+1 < rev_map.size() &&
|
if (2*n_faces+1 < rev_map.size() &&
|
||||||
rev_map.size() / 2 >= MIN_REV_MAP_SIZE)
|
rev_map.size() / 2 >= MIN_REV_MAP_SIZE)
|
||||||
{
|
{
|
||||||
rev_map.resize (rev_map.size() / 2);
|
rev_map.resize(rev_map.size() / 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the current face index, and assign this index to the face
|
// Get the current face index, and assign this index to the face
|
||||||
// currently indexed (n - 1).
|
// currently indexed (n - 1).
|
||||||
unsigned int index = index_map[f2];
|
unsigned int index = index_map[f2];
|
||||||
|
|
||||||
if (index == n_faces)
|
if (index == n_faces) return;
|
||||||
return;
|
|
||||||
|
|
||||||
Face_handle last_f = rev_map[n_faces];
|
Face_handle last_f = rev_map[n_faces];
|
||||||
index_map[last_f] = index;
|
index_map[last_f] = index;
|
||||||
rev_map[index] = last_f;
|
rev_map[index] = last_f;
|
||||||
|
|
||||||
// Clear the reverse mapping for the last face.
|
// Clear the reverse mapping for the last face.
|
||||||
rev_map[n_faces] = Face_handle();
|
rev_map[n_faces] = Face_handle();
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
/*! Initialize the map for the given arrangement. */
|
/*! Initialize the map for the given arrangement. */
|
||||||
void _init ()
|
void _init() {
|
||||||
{
|
|
||||||
// Get the number of faces and allocate the reverse map accordingly.
|
// Get the number of faces and allocate the reverse map accordingly.
|
||||||
n_faces = static_cast<unsigned int>(this->arrangement()->number_of_faces());
|
n_faces = static_cast<unsigned int>(this->arrangement()->number_of_faces());
|
||||||
|
|
||||||
if (n_faces < MIN_REV_MAP_SIZE)
|
if (n_faces < MIN_REV_MAP_SIZE) rev_map.resize (MIN_REV_MAP_SIZE);
|
||||||
rev_map.resize (MIN_REV_MAP_SIZE);
|
else rev_map.resize (n_faces);
|
||||||
else
|
|
||||||
rev_map.resize (n_faces);
|
|
||||||
|
|
||||||
// Clear the current mapping.
|
// Clear the current mapping.
|
||||||
index_map.clear();
|
index_map.clear();
|
||||||
|
|
||||||
// Create the initial mapping.
|
// Create the initial mapping.
|
||||||
typename Arrangement_2::Face_iterator fit;
|
Face_handle fh;
|
||||||
Face_handle fh;
|
unsigned int index = 0;
|
||||||
unsigned int index = 0;
|
|
||||||
|
|
||||||
for (fit = this->arrangement()->faces_begin();
|
for (auto fit = this->arrangement()->faces_begin();
|
||||||
fit != this->arrangement()->faces_end(); ++fit, ++index)
|
fit != this->arrangement()->faces_end(); ++fit, ++index) {
|
||||||
{
|
|
||||||
// Map the current face to the current index.
|
// Map the current face to the current index.
|
||||||
fh = fit;
|
fh = fit;
|
||||||
index_map[fh] = index;
|
index_map[fh] = index;
|
||||||
rev_map[index] = fh;
|
rev_map[index] = fh;
|
||||||
}
|
}
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*!
|
/*! Get the index property-map function. Provided so that boost is able to
|
||||||
* Get the index property-map function. Provided so that boost is able to
|
|
||||||
* access the Arr_face_index_map above.
|
* access the Arr_face_index_map above.
|
||||||
* \param index_map The index map.
|
* \param index_map The index map.
|
||||||
* \param f A face handle.
|
* \param f A face handle.
|
||||||
* \return The face index.
|
* \return The face index.
|
||||||
*/
|
*/
|
||||||
template<class Arrangement>
|
template <typename Arrangement>
|
||||||
unsigned int get (const CGAL::Arr_face_index_map<Arrangement>& index_map,
|
unsigned int get(const CGAL::Arr_face_index_map<Arrangement>& index_map,
|
||||||
typename Arrangement::Face_handle f)
|
typename Arrangement::Face_handle f)
|
||||||
{
|
{ return (index_map[f]); }
|
||||||
return (index_map[f]);
|
|
||||||
}
|
|
||||||
|
|
||||||
} //namespace CGAL
|
} //namespace CGAL
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
// Copyright (c) 2006,2007,2009,2010,2011 Tel-Aviv University (Israel).
|
// Copyright (c) 2023 Tel-Aviv University (Israel).
|
||||||
// All rights reserved.
|
// All rights reserved.
|
||||||
//
|
//
|
||||||
// This file is part of CGAL (www.cgal.org).
|
// This file is part of CGAL (www.cgal.org).
|
||||||
|
|
@ -8,565 +8,26 @@
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Author(s) : Ron Wein <wein@post.tau.ac.il>
|
// Author(s): Efi Fogel <efifogel@gmail.com>
|
||||||
// Efi Fogel <efif@post.tau.ac.il>
|
|
||||||
|
|
||||||
#ifndef CGAL_ARR_OBSERVER_H
|
#ifndef CGAL_ARR_OBSERVER_H
|
||||||
#define CGAL_ARR_OBSERVER_H
|
#define CGAL_ARR_OBSERVER_H
|
||||||
|
|
||||||
|
/*! \file
|
||||||
|
* Definition of the `Arr_observer<Arrangement>` base class mainly for backward
|
||||||
|
* compatibility.
|
||||||
|
*/
|
||||||
|
|
||||||
#include <CGAL/license/Arrangement_on_surface_2.h>
|
#include <CGAL/license/Arrangement_on_surface_2.h>
|
||||||
|
|
||||||
#include <CGAL/disable_warnings.h>
|
#include <CGAL/disable_warnings.h>
|
||||||
|
|
||||||
#include <CGAL/Arr_enums.h>
|
|
||||||
|
|
||||||
/*! \file
|
|
||||||
* Definition of the Arr_observer<Arrangement> base class.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
/*! \class
|
|
||||||
* A base class for arrangement observers.
|
|
||||||
* The Arrangement parameter corresponds to an arrangement instantiation.
|
|
||||||
*/
|
|
||||||
template <typename Arrangement_>
|
template <typename Arrangement_>
|
||||||
class Arr_observer
|
using Arr_observer = typename Arrangement_::Observer;
|
||||||
{
|
|
||||||
public:
|
|
||||||
typedef Arrangement_ Arrangement_2;
|
|
||||||
typedef Arr_observer<Arrangement_2> Self;
|
|
||||||
|
|
||||||
typedef typename Arrangement_2::Point_2 Point_2;
|
} // namespace CGAL
|
||||||
typedef typename Arrangement_2::X_monotone_curve_2 X_monotone_curve_2;
|
|
||||||
|
|
||||||
typedef typename Arrangement_2::Vertex_handle Vertex_handle;
|
|
||||||
typedef typename Arrangement_2::Halfedge_handle Halfedge_handle;
|
|
||||||
typedef typename Arrangement_2::Face_handle Face_handle;
|
|
||||||
typedef typename Arrangement_2::Ccb_halfedge_circulator
|
|
||||||
Ccb_halfedge_circulator;
|
|
||||||
|
|
||||||
private:
|
|
||||||
Arrangement_2* p_arr; // The associated arrangement.
|
|
||||||
|
|
||||||
/*! Copy constructor - not supported. */
|
|
||||||
Arr_observer(const Self&);
|
|
||||||
|
|
||||||
/*! Assignment operator - not supported. */
|
|
||||||
Self& operator=(const Self&);
|
|
||||||
|
|
||||||
public:
|
|
||||||
/// \name Construction and destruction functions.
|
|
||||||
//@{
|
|
||||||
|
|
||||||
/*! Default constructor. */
|
|
||||||
Arr_observer() : p_arr(nullptr) {}
|
|
||||||
|
|
||||||
/*! Constructor with an associated arrangement. */
|
|
||||||
Arr_observer(Arrangement_2& arr) : p_arr(&arr)
|
|
||||||
{
|
|
||||||
// Register the observer object in the arrangement.
|
|
||||||
p_arr->_register_observer(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*! Destructor. */
|
|
||||||
virtual ~Arr_observer()
|
|
||||||
{
|
|
||||||
// Unregister the observer object from the arrangement.
|
|
||||||
if (p_arr != nullptr)
|
|
||||||
p_arr->_unregister_observer(this);
|
|
||||||
}
|
|
||||||
//@}
|
|
||||||
|
|
||||||
/// \name Modifying the associated arrangement.
|
|
||||||
//@{
|
|
||||||
|
|
||||||
/*! Get the associated arrangement (non-const version). */
|
|
||||||
const Arrangement_2* arrangement() const { return (p_arr); }
|
|
||||||
|
|
||||||
/*! Get the associated arrangement (non-const version). */
|
|
||||||
Arrangement_2* arrangement() { return (p_arr); }
|
|
||||||
|
|
||||||
/*! Attach the observer to an arrangement.
|
|
||||||
* \pre The observer is not already attached to an arrangement.
|
|
||||||
*/
|
|
||||||
void attach(Arrangement_2& arr)
|
|
||||||
{
|
|
||||||
// Do nothing if the associated arrangement is not changed.
|
|
||||||
if (p_arr == &arr) return;
|
|
||||||
|
|
||||||
// The observer is not already attached to an arrangement.
|
|
||||||
CGAL_precondition (p_arr == nullptr);
|
|
||||||
|
|
||||||
if (p_arr != nullptr) return;
|
|
||||||
|
|
||||||
// Notify the concrete observer (the sub-class) about the attachment.
|
|
||||||
before_attach(arr);
|
|
||||||
|
|
||||||
// Register the observer object in the new arrangement.
|
|
||||||
p_arr = &arr;
|
|
||||||
p_arr->_register_observer(this);
|
|
||||||
|
|
||||||
// Notify the concrete observer that the attachment took place.
|
|
||||||
after_attach();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*! Detach the observer from the arrangement. */
|
|
||||||
void detach()
|
|
||||||
{
|
|
||||||
if (p_arr == nullptr) return;
|
|
||||||
|
|
||||||
// Notify the concrete observer (the sub-class) about the detachment.
|
|
||||||
before_detach ();
|
|
||||||
|
|
||||||
// Unregister the observer object from the current arrangement, and mark
|
|
||||||
// that the observer is not attached to an arrangement.
|
|
||||||
p_arr->_unregister_observer(this);
|
|
||||||
p_arr = nullptr;
|
|
||||||
|
|
||||||
// Notify the concrete observer that the detachment took place.
|
|
||||||
after_detach();
|
|
||||||
}
|
|
||||||
//@}
|
|
||||||
|
|
||||||
/// \name Notification functions on global arrangement operations.
|
|
||||||
//@{
|
|
||||||
|
|
||||||
/*! Notification before the arrangement is assigned with another
|
|
||||||
* arrangement.
|
|
||||||
* \param arr The arrangement to be copied.
|
|
||||||
*/
|
|
||||||
virtual void before_assign(const Arrangement_2& /* arr */) {}
|
|
||||||
|
|
||||||
/*! Notification after the arrangement has been assigned with another
|
|
||||||
* arrangement.
|
|
||||||
*/
|
|
||||||
virtual void after_assign() {}
|
|
||||||
|
|
||||||
/*! Notification before the arrangement is cleared. */
|
|
||||||
virtual void before_clear() {}
|
|
||||||
|
|
||||||
/*! Notification after the arrangement is cleared. */
|
|
||||||
virtual void after_clear() {}
|
|
||||||
|
|
||||||
/*! Notification before a global operation modifies the arrangement. */
|
|
||||||
virtual void before_global_change() {}
|
|
||||||
|
|
||||||
/*! Notification after a global operation is completed. */
|
|
||||||
virtual void after_global_change() {}
|
|
||||||
//@}
|
|
||||||
|
|
||||||
/// \name Notification functions on observer attachment or detachment.
|
|
||||||
//@{
|
|
||||||
|
|
||||||
/*! Notification before the observer is attached to an arrangement.
|
|
||||||
* \param arr The arrangement we are about to attach the observer to.
|
|
||||||
*/
|
|
||||||
virtual void before_attach(const Arrangement_2& /* arr */) {}
|
|
||||||
|
|
||||||
/*! Notification after the observer has been attached to an arrangement. */
|
|
||||||
virtual void after_attach() {}
|
|
||||||
|
|
||||||
/*! Notification before the observer is detached from the arrangement. */
|
|
||||||
virtual void before_detach() {}
|
|
||||||
|
|
||||||
/*! Notification after the observer has been detached to the arrangement. */
|
|
||||||
virtual void after_detach() {}
|
|
||||||
//@}
|
|
||||||
|
|
||||||
/// \name Notification functions on local changes in the arrangement.
|
|
||||||
//@{
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Notification before the creation of a new vertex.
|
|
||||||
* \param p The point to be associated with the vertex.
|
|
||||||
* This point cannot lies on the surface boundaries.
|
|
||||||
*/
|
|
||||||
virtual void before_create_vertex(const Point_2& /* p */) {}
|
|
||||||
|
|
||||||
/*! Notification after the creation of a new vertex.
|
|
||||||
* \param v A handle to the created vertex.
|
|
||||||
*/
|
|
||||||
virtual void after_create_vertex(Vertex_handle /* v */)
|
|
||||||
{}
|
|
||||||
|
|
||||||
/*! Notification before the creation of a new boundary vertex.
|
|
||||||
* \param p The on the surface boundary.
|
|
||||||
* \param ps_x The boundary condition of the vertex in x.
|
|
||||||
* \param ps_y The boundary condition of the vertex in y.
|
|
||||||
*/
|
|
||||||
virtual void before_create_boundary_vertex(const Point_2& /* p */,
|
|
||||||
Arr_parameter_space /* ps_x */,
|
|
||||||
Arr_parameter_space /* ps_y */)
|
|
||||||
{}
|
|
||||||
|
|
||||||
/*! Notification before the creation of a new boundary vertex.
|
|
||||||
* \param cv The curve incident to the surface boundary.
|
|
||||||
* \param ind The relevant curve-end.
|
|
||||||
* \param ps_x The boundary condition of the vertex in x.
|
|
||||||
* \param ps_y The boundary condition of the vertex in y.
|
|
||||||
*/
|
|
||||||
virtual void before_create_boundary_vertex(const X_monotone_curve_2& /* cv */,
|
|
||||||
Arr_curve_end /* ind */,
|
|
||||||
Arr_parameter_space /* ps_x */,
|
|
||||||
Arr_parameter_space /* ps_y */)
|
|
||||||
{}
|
|
||||||
|
|
||||||
/*! Notification after the creation of a new vertex at infinity.
|
|
||||||
* \param v A handle to the created vertex.
|
|
||||||
*/
|
|
||||||
virtual void after_create_boundary_vertex(Vertex_handle /* v */) {}
|
|
||||||
|
|
||||||
/*! Notification before the creation of a new edge.
|
|
||||||
* \param c The x-monotone curve to be associated with the edge.
|
|
||||||
* \param v1 A handle to the first end-vertex of the edge.
|
|
||||||
* \param v2 A handle to the second end-vertex of the edge.
|
|
||||||
*/
|
|
||||||
virtual void before_create_edge(const X_monotone_curve_2& /* c */,
|
|
||||||
Vertex_handle /* v1 */,
|
|
||||||
Vertex_handle /* v2 */)
|
|
||||||
{}
|
|
||||||
|
|
||||||
/*! Notification after the creation of a new edge.
|
|
||||||
* \param e A handle to one of the twin halfedges that were created.
|
|
||||||
*/
|
|
||||||
virtual void after_create_edge(Halfedge_handle /* e */) {}
|
|
||||||
|
|
||||||
/*! Notification before the modification of an existing vertex.
|
|
||||||
* \param v A handle to the vertex to be updated.
|
|
||||||
* \param p The point to be associated with the vertex.
|
|
||||||
*/
|
|
||||||
virtual void before_modify_vertex(Vertex_handle /* v */,
|
|
||||||
const Point_2& /* p */)
|
|
||||||
{}
|
|
||||||
|
|
||||||
/*! Notification after a vertex was modified.
|
|
||||||
* \param v A handle to the updated vertex.
|
|
||||||
*/
|
|
||||||
virtual void after_modify_vertex(Vertex_handle /* v */) {}
|
|
||||||
|
|
||||||
/*! Notification before the modification of an existing edge.
|
|
||||||
* \param e A handle to one of the twin halfedges to be updated.
|
|
||||||
* \param c The x-monotone curve to be associated with the edge.
|
|
||||||
*/
|
|
||||||
virtual void before_modify_edge(Halfedge_handle /* e */,
|
|
||||||
const X_monotone_curve_2& /* c */)
|
|
||||||
{}
|
|
||||||
|
|
||||||
/*! Notification after an edge was modified.
|
|
||||||
* \param e A handle to one of the twin halfedges that were updated.
|
|
||||||
*/
|
|
||||||
virtual void after_modify_edge(Halfedge_handle /* e */) {}
|
|
||||||
|
|
||||||
/*! Notification before the splitting of an edge into two.
|
|
||||||
* \param e A handle to one of the existing halfedges.
|
|
||||||
* \param v A vertex representing the split point.
|
|
||||||
* \param c1 The x-monotone curve to be associated with the first edge.
|
|
||||||
* \param c2 The x-monotone curve to be associated with the second edge.
|
|
||||||
*/
|
|
||||||
virtual void before_split_edge(Halfedge_handle /* e */,
|
|
||||||
Vertex_handle /* v */,
|
|
||||||
const X_monotone_curve_2& /* c1 */,
|
|
||||||
const X_monotone_curve_2& /* c2 */)
|
|
||||||
{}
|
|
||||||
|
|
||||||
/*! Notification after an edge was split.
|
|
||||||
* \param e1 A handle to one of the twin halfedges forming the first edge.
|
|
||||||
* \param e2 A handle to one of the twin halfedges forming the second edge.
|
|
||||||
*/
|
|
||||||
virtual void after_split_edge(Halfedge_handle /* e1 */,
|
|
||||||
Halfedge_handle /* e2 */)
|
|
||||||
{}
|
|
||||||
|
|
||||||
/*! Notification before the splitting of a fictitious edge into two.
|
|
||||||
* \param e A handle to one of the existing halfedges.
|
|
||||||
* \param v A vertex representing the unbounded split point.
|
|
||||||
*/
|
|
||||||
virtual void before_split_fictitious_edge(Halfedge_handle /* e */,
|
|
||||||
Vertex_handle /* v */)
|
|
||||||
{}
|
|
||||||
|
|
||||||
/*! Notification after a fictitious edge was split.
|
|
||||||
* \param e1 A handle to one of the twin halfedges forming the first edge.
|
|
||||||
* \param e2 A handle to one of the twin halfedges forming the second edge.
|
|
||||||
*/
|
|
||||||
virtual void after_split_fictitious_edge(Halfedge_handle /* e1 */,
|
|
||||||
Halfedge_handle /* e2 */)
|
|
||||||
{}
|
|
||||||
|
|
||||||
/*! Notification before the splitting of a face into two.
|
|
||||||
* \param f A handle to the existing face.
|
|
||||||
* \param e The new edge whose insertion causes the face to split.
|
|
||||||
*/
|
|
||||||
virtual void before_split_face(Face_handle /* f */,
|
|
||||||
Halfedge_handle /* e */)
|
|
||||||
{}
|
|
||||||
|
|
||||||
/*! Notification after a face was split.
|
|
||||||
* \param f A handle to the face we have just split.
|
|
||||||
* \param new_f A handle to the new face that has been created.
|
|
||||||
* \param is_hole Whether the new face forms a hole inside f.
|
|
||||||
*/
|
|
||||||
virtual void after_split_face(Face_handle /* f */,
|
|
||||||
Face_handle /* new_f */,
|
|
||||||
bool /* is_hole */)
|
|
||||||
{}
|
|
||||||
|
|
||||||
/*! Notification before the splitting of an outer CCB into two.
|
|
||||||
* \param f A handle to the face that owns the outer CCB.
|
|
||||||
* \param h A circulator representing the component boundary.
|
|
||||||
* \param e The new edge whose removal causes the outer CCB to split.
|
|
||||||
*/
|
|
||||||
virtual void before_split_outer_ccb(Face_handle /* f */,
|
|
||||||
Ccb_halfedge_circulator /* h */,
|
|
||||||
Halfedge_handle /* e */)
|
|
||||||
{}
|
|
||||||
|
|
||||||
/*! Notification after an outer CCB was split.
|
|
||||||
* \param f A handle to the face that owns the outer CCBs.
|
|
||||||
* \param h1 A circulator representing the boundary of the first component.
|
|
||||||
* \param h2 A circulator representing the boundary of the second component.
|
|
||||||
*/
|
|
||||||
virtual void after_split_outer_ccb(Face_handle /* f */,
|
|
||||||
Ccb_halfedge_circulator /* h1 */,
|
|
||||||
Ccb_halfedge_circulator /* h2 */)
|
|
||||||
{}
|
|
||||||
|
|
||||||
/*! Notification before the splitting of an inner CCB into two.
|
|
||||||
* \param f A handle to the face containing the inner CCB.
|
|
||||||
* \param h A circulator representing the component boundary.
|
|
||||||
* \param e The new edge whose removal causes the inner CCB to split.
|
|
||||||
*/
|
|
||||||
virtual void before_split_inner_ccb(Face_handle /* f */,
|
|
||||||
Ccb_halfedge_circulator /* h */,
|
|
||||||
Halfedge_handle /* e */)
|
|
||||||
{}
|
|
||||||
|
|
||||||
/*! Notification after an inner CCB was split.
|
|
||||||
* \param f A handle to the face containing the inner CCBs.
|
|
||||||
* \param h1 A circulator representing the boundary of the first component.
|
|
||||||
* \param h2 A circulator representing the boundary of the second component.
|
|
||||||
*/
|
|
||||||
virtual void after_split_inner_ccb(Face_handle /* f */,
|
|
||||||
Ccb_halfedge_circulator /* h1 */,
|
|
||||||
Ccb_halfedge_circulator /* h2 */)
|
|
||||||
{}
|
|
||||||
|
|
||||||
/*! Notification before the creation of a new outer CCB of a face.
|
|
||||||
* \param f A handle to the face that owns the outer CCB.
|
|
||||||
* \param e A halfedge along the new outer CCB.
|
|
||||||
*/
|
|
||||||
virtual void before_add_outer_ccb(Face_handle /* f */,
|
|
||||||
Halfedge_handle /* e */)
|
|
||||||
{}
|
|
||||||
|
|
||||||
/*! Notification after an outer CCB was added to a face.
|
|
||||||
* \param h A circulator representing the boundary of the new outer CCB.
|
|
||||||
*/
|
|
||||||
virtual void after_add_outer_ccb(Ccb_halfedge_circulator /* h */) {}
|
|
||||||
|
|
||||||
/*! Notification before the creation of a new inner CCB inside a face.
|
|
||||||
* \param f A handle to the face containing the inner CCB.
|
|
||||||
* \param e The new halfedge that forms the new inner CCB.
|
|
||||||
*/
|
|
||||||
virtual void before_add_inner_ccb(Face_handle /* f */,
|
|
||||||
Halfedge_handle /* e */)
|
|
||||||
{}
|
|
||||||
|
|
||||||
/*! Notification after an inner CCB was created inside a face.
|
|
||||||
* \param h A circulator representing the boundary of the new inner CCB.
|
|
||||||
*/
|
|
||||||
virtual void after_add_inner_ccb(Ccb_halfedge_circulator /* h */) {}
|
|
||||||
|
|
||||||
/*! Notification before the creation of a new isolated vertex inside a face.
|
|
||||||
* \param f A handle to the face containing the isolated vertex.
|
|
||||||
* \param v The isolated vertex.
|
|
||||||
*/
|
|
||||||
virtual void before_add_isolated_vertex(Face_handle /* f */,
|
|
||||||
Vertex_handle /* v */)
|
|
||||||
{}
|
|
||||||
|
|
||||||
/*! Notification after an isolated vertex was created inside a face.
|
|
||||||
* \param v The isolated vertex.
|
|
||||||
*/
|
|
||||||
virtual void after_add_isolated_vertex(Vertex_handle /* v */) {}
|
|
||||||
|
|
||||||
/*! Notification before the merging of two edges.
|
|
||||||
* \param e1 A handle to one of the halfedges forming the first edge.
|
|
||||||
* \param e2 A handle to one of the halfedges forming the second edge.
|
|
||||||
* \param c The x-monotone curve to be associated with the merged edge.
|
|
||||||
*/
|
|
||||||
virtual void before_merge_edge(Halfedge_handle /* e1 */,
|
|
||||||
Halfedge_handle /* e2 */,
|
|
||||||
const X_monotone_curve_2& /* c */)
|
|
||||||
{}
|
|
||||||
|
|
||||||
/*! Notification after an edge was merged.
|
|
||||||
* \param e A handle to one of the twin halfedges forming the merged edge.
|
|
||||||
*/
|
|
||||||
virtual void after_merge_edge(Halfedge_handle /* e */) {}
|
|
||||||
|
|
||||||
/*! Notification before the merging of two fictitious edges.
|
|
||||||
* \param e1 A handle to one of the halfedges forming the first edge.
|
|
||||||
* \param e2 A handle to one of the halfedges forming the second edge.
|
|
||||||
*/
|
|
||||||
virtual void before_merge_fictitious_edge(Halfedge_handle /* e1 */,
|
|
||||||
Halfedge_handle /* e2 */)
|
|
||||||
{}
|
|
||||||
|
|
||||||
/*! Notification after a fictitious edge was merged.
|
|
||||||
* \param e A handle to one of the twin halfedges forming the merged edge.
|
|
||||||
*/
|
|
||||||
virtual void after_merge_fictitious_edge(Halfedge_handle /* e */) {}
|
|
||||||
|
|
||||||
/*! Notification before the merging of two faces.
|
|
||||||
* \param f1 A handle to the first face.
|
|
||||||
* \param f2 A handle to the second face.
|
|
||||||
* \param e The edge whose removal causes the faces to merge.
|
|
||||||
*/
|
|
||||||
virtual void before_merge_face(Face_handle /* f1 */,
|
|
||||||
Face_handle /* f2 */,
|
|
||||||
Halfedge_handle /* e */)
|
|
||||||
{}
|
|
||||||
|
|
||||||
/*! Notification after a face was merged.
|
|
||||||
* \param f A handle to the merged face.
|
|
||||||
*/
|
|
||||||
virtual void after_merge_face(Face_handle /* f */) {}
|
|
||||||
|
|
||||||
/*! Notification before the merging of two outer CCBs.
|
|
||||||
* \param f A handle to the face that owns the outer CCBs.
|
|
||||||
* \param h1 A circulator representing the boundary of the first component.
|
|
||||||
* \param h2 A circulator representing the boundary of the second component.
|
|
||||||
* \param e The edge whose insertion or removal causes the CCBs to merge.
|
|
||||||
*/
|
|
||||||
virtual void before_merge_outer_ccb(Face_handle /* f */,
|
|
||||||
Ccb_halfedge_circulator /* h1 */,
|
|
||||||
Ccb_halfedge_circulator /* h2 */,
|
|
||||||
Halfedge_handle /* e */)
|
|
||||||
{}
|
|
||||||
|
|
||||||
/*! Notification after an outer CCB was merged.
|
|
||||||
* \param f A handle to the face that owns the outer CCBs.
|
|
||||||
* \param h A circulator representing the boundary of the merged component.
|
|
||||||
*/
|
|
||||||
virtual void after_merge_outer_ccb(Face_handle /* f */,
|
|
||||||
Ccb_halfedge_circulator /* h */)
|
|
||||||
{}
|
|
||||||
|
|
||||||
/*! Notification before the merging of two inner CCBs (holes).
|
|
||||||
* \param f A handle to the face that contains the inner CCBs.
|
|
||||||
* \param h1 A circulator representing the boundary of the first component.
|
|
||||||
* \param h2 A circulator representing the boundary of the second component.
|
|
||||||
* \param e The edge whose insertion causes the inner CCBs to merge.
|
|
||||||
*/
|
|
||||||
virtual void before_merge_inner_ccb(Face_handle /* f */,
|
|
||||||
Ccb_halfedge_circulator /* h1 */,
|
|
||||||
Ccb_halfedge_circulator /* h2 */,
|
|
||||||
Halfedge_handle /* e */)
|
|
||||||
{}
|
|
||||||
|
|
||||||
/*! Notification after an inner CCB was merged.
|
|
||||||
* \param f A handle to the face that contains the inner CCBs.
|
|
||||||
* \param h A circulator representing the boundary of the merged component.
|
|
||||||
*/
|
|
||||||
virtual void after_merge_inner_ccb(Face_handle /* f */,
|
|
||||||
Ccb_halfedge_circulator /* h */)
|
|
||||||
{}
|
|
||||||
|
|
||||||
/*! Notification before an outer CCB is moved from one face to another.
|
|
||||||
* \param from_f A handle to the face that currently owns the outer CCB.
|
|
||||||
* \param to_f A handle to the face that should own the outer CCB.
|
|
||||||
* \param h A circulator representing the boundary of the component.
|
|
||||||
*/
|
|
||||||
virtual void before_move_outer_ccb(Face_handle /* from_f */,
|
|
||||||
Face_handle /* to_f */,
|
|
||||||
Ccb_halfedge_circulator /* h */)
|
|
||||||
{}
|
|
||||||
|
|
||||||
/*! Notification after an outer CCB is moved from one face to another.
|
|
||||||
* \param h A circulator representing the boundary of the component.
|
|
||||||
*/
|
|
||||||
virtual void after_move_outer_ccb(Ccb_halfedge_circulator /* h */) {}
|
|
||||||
|
|
||||||
|
|
||||||
/*! Notification before an inner CCB is moved from one face to another.
|
|
||||||
* \param from_f A handle to the face currently containing the inner CCB.
|
|
||||||
* \param to_f A handle to the face that should contain the inner CCB.
|
|
||||||
* \param h A circulator representing the boundary of the component.
|
|
||||||
*/
|
|
||||||
virtual void before_move_inner_ccb(Face_handle /* from_f */,
|
|
||||||
Face_handle /* to_f */,
|
|
||||||
Ccb_halfedge_circulator /* h */)
|
|
||||||
{}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Notification after an inner CCB is moved from one face to another.
|
|
||||||
* \param h A circulator representing the boundary of the component.
|
|
||||||
*/
|
|
||||||
virtual void after_move_inner_ccb(Ccb_halfedge_circulator /* h */) {}
|
|
||||||
|
|
||||||
/*! Notification before an isolated vertex is moved from one face to another.
|
|
||||||
* \param from_f A handle to the face currently containing the vertex.
|
|
||||||
* \param to_f A handle to the face that should contain the vertex.
|
|
||||||
* \param v The isolated vertex.
|
|
||||||
*/
|
|
||||||
virtual void before_move_isolated_vertex(Face_handle /* from_f */,
|
|
||||||
Face_handle /* to_f */,
|
|
||||||
Vertex_handle /* v */)
|
|
||||||
{}
|
|
||||||
|
|
||||||
/*! Notification after an isolated vertex is moved from one face to another.
|
|
||||||
* \param v The isolated vertex.
|
|
||||||
*/
|
|
||||||
virtual void after_move_isolated_vertex(Vertex_handle /* v */) {}
|
|
||||||
|
|
||||||
/*! Notificaion before the removal of a vertex.
|
|
||||||
* \param v A handle to the vertex to be deleted.
|
|
||||||
*/
|
|
||||||
virtual void before_remove_vertex(Vertex_handle /* v */) {}
|
|
||||||
|
|
||||||
/*! Notificaion after the removal of a vertex. */
|
|
||||||
virtual void after_remove_vertex() {}
|
|
||||||
|
|
||||||
/*! Notification before the removal of an edge.
|
|
||||||
* \param e A handle to one of the twin halfedges to be deleted.
|
|
||||||
*/
|
|
||||||
virtual void before_remove_edge(Halfedge_handle /* e */) {}
|
|
||||||
|
|
||||||
/*! Notificaion after the removal of an edge. */
|
|
||||||
virtual void after_remove_edge() {}
|
|
||||||
|
|
||||||
/*! Notification before the removal of an outer CCB.
|
|
||||||
* \param f The face that owns the outer CCB.
|
|
||||||
* \param h A circulator representing the boundary of the component.
|
|
||||||
*/
|
|
||||||
virtual void before_remove_outer_ccb(Face_handle /* f */,
|
|
||||||
Ccb_halfedge_circulator /* h */)
|
|
||||||
{}
|
|
||||||
|
|
||||||
/*! Notificaion after the removal of an outer CCB.
|
|
||||||
* \param f The face that used to own the outer CCB.
|
|
||||||
*/
|
|
||||||
virtual void after_remove_outer_ccb(Face_handle /* f */) {}
|
|
||||||
|
|
||||||
/*! Notification before the removal of an inner CCB.
|
|
||||||
* \param f The face containing the inner CCB.
|
|
||||||
* \param h A circulator representing the boundary of the component.
|
|
||||||
*/
|
|
||||||
virtual void before_remove_inner_ccb(Face_handle /* f */,
|
|
||||||
Ccb_halfedge_circulator /* h */)
|
|
||||||
{}
|
|
||||||
|
|
||||||
/*! Notificaion after the removal of an inner CCB.
|
|
||||||
* \param f The face that used to contain the inner CCB.
|
|
||||||
*/
|
|
||||||
virtual void after_remove_inner_ccb(Face_handle /* f */) {}
|
|
||||||
|
|
||||||
//@}
|
|
||||||
};
|
|
||||||
|
|
||||||
} //namespace CGAL
|
|
||||||
|
|
||||||
#include <CGAL/enable_warnings.h>
|
#include <CGAL/enable_warnings.h>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@
|
||||||
* Definition of the Arr_landmarks_generator_base<Arrangement> template.
|
* Definition of the Arr_landmarks_generator_base<Arrangement> template.
|
||||||
*/
|
*/
|
||||||
#include <CGAL/Arr_point_location_result.h>
|
#include <CGAL/Arr_point_location_result.h>
|
||||||
#include <CGAL/Arr_observer.h>
|
|
||||||
#include <CGAL/Arrangement_2/Arr_traits_adaptor_2.h>
|
#include <CGAL/Arrangement_2/Arr_traits_adaptor_2.h>
|
||||||
#include <CGAL/Arr_point_location/Arr_lm_nearest_neighbor.h>
|
#include <CGAL/Arr_point_location/Arr_lm_nearest_neighbor.h>
|
||||||
#include <CGAL/Arr_batched_point_location.h>
|
#include <CGAL/Arr_batched_point_location.h>
|
||||||
|
|
@ -43,44 +42,44 @@ namespace CGAL {
|
||||||
*/
|
*/
|
||||||
template <typename Arrangement_,
|
template <typename Arrangement_,
|
||||||
typename Nearest_neighbor_ =
|
typename Nearest_neighbor_ =
|
||||||
Arr_landmarks_nearest_neighbor <Arrangement_> >
|
Arr_landmarks_nearest_neighbor<Arrangement_> >
|
||||||
class Arr_landmarks_generator_base : public Arr_observer <Arrangement_> {
|
class Arr_landmarks_generator_base : public Arrangement_::Observer {
|
||||||
public:
|
public:
|
||||||
typedef Arrangement_ Arrangement_2;
|
using Arrangement_2 = Arrangement_;
|
||||||
typedef Nearest_neighbor_ Nearest_neighbor;
|
using Base_aos = typename Arrangement_2::Base_aos;
|
||||||
|
|
||||||
typedef typename Arrangement_2::Geometry_traits_2 Geometry_traits_2;
|
using Nearest_neighbor = Nearest_neighbor_;
|
||||||
typedef typename Arrangement_2::Vertex_const_handle Vertex_const_handle;
|
|
||||||
typedef typename Arrangement_2::Halfedge_const_handle Halfedge_const_handle;
|
|
||||||
typedef typename Arrangement_2::Face_const_handle Face_const_handle;
|
|
||||||
typedef typename Arrangement_2::Vertex_handle Vertex_handle;
|
|
||||||
typedef typename Arrangement_2::Halfedge_handle Halfedge_handle;
|
|
||||||
typedef typename Arrangement_2::Face_handle Face_handle;
|
|
||||||
typedef typename Arrangement_2::Vertex_const_iterator Vertex_const_iterator;
|
|
||||||
typedef typename Arrangement_2::Ccb_halfedge_circulator
|
|
||||||
Ccb_halfedge_circulator;
|
|
||||||
|
|
||||||
typedef typename Arrangement_2::Point_2 Point_2;
|
using Geometry_traits_2 = typename Base_aos::Geometry_traits_2;
|
||||||
typedef typename Arrangement_2::X_monotone_curve_2 X_monotone_curve_2;
|
using Vertex_const_handle = typename Base_aos::Vertex_const_handle;
|
||||||
|
using Halfedge_const_handle = typename Base_aos::Halfedge_const_handle;
|
||||||
|
using Face_const_handle = typename Base_aos::Face_const_handle;
|
||||||
|
using Vertex_handle = typename Base_aos::Vertex_handle;
|
||||||
|
using Halfedge_handle = typename Base_aos::Halfedge_handle;
|
||||||
|
using Face_handle = typename Base_aos::Face_handle;
|
||||||
|
using Vertex_const_iterator = typename Base_aos::Vertex_const_iterator;
|
||||||
|
using Ccb_halfedge_circulator = typename Base_aos::Ccb_halfedge_circulator;
|
||||||
|
|
||||||
typedef typename Nearest_neighbor::NN_Point_2 NN_Point_2;
|
using Point_2 = typename Base_aos::Point_2;
|
||||||
typedef std::list<NN_Point_2> NN_Points_set;
|
using X_monotone_curve_2 = typename Base_aos::X_monotone_curve_2;
|
||||||
|
|
||||||
typedef std::vector<Point_2> Points_set;
|
using NN_Point_2 = typename Nearest_neighbor::NN_Point_2;
|
||||||
|
using NN_Points_set = std::list<NN_Point_2>;
|
||||||
|
|
||||||
typedef Arr_point_location_result<Arrangement_2> PL_result;
|
using Points_set = std::vector<Point_2>;
|
||||||
typedef typename PL_result::Type PL_result_type;
|
|
||||||
|
|
||||||
typedef std::pair<Point_2, PL_result_type> PL_pair;
|
using PL_result = Arr_point_location_result<Base_aos>;
|
||||||
typedef std::vector<PL_pair> Pairs_set;
|
using PL_result_type = typename PL_result::Type;
|
||||||
typedef typename std::vector<PL_pair>::iterator Pairs_iterator;
|
|
||||||
|
using PL_pair = std::pair<Point_2, PL_result_type>;
|
||||||
|
using Pairs_set = std::vector<PL_pair>;
|
||||||
|
using Pairs_iterator = typename std::vector<PL_pair>::iterator;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef Arr_landmarks_generator_base<Arrangement_2, Nearest_neighbor>
|
using Self = Arr_landmarks_generator_base<Arrangement_2, Nearest_neighbor>;
|
||||||
Self;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
typedef Arr_traits_basic_adaptor_2<Geometry_traits_2> Traits_adaptor_2;
|
using Traits_adaptor_2 = Arr_traits_basic_adaptor_2<Geometry_traits_2>;
|
||||||
|
|
||||||
// Data members:
|
// Data members:
|
||||||
const Traits_adaptor_2* m_traits; // The associated traits object.
|
const Traits_adaptor_2* m_traits; // The associated traits object.
|
||||||
|
|
@ -109,8 +108,8 @@ public:
|
||||||
/*! Constructor from an arrangement.
|
/*! Constructor from an arrangement.
|
||||||
* \param arr (in) The arrangement.
|
* \param arr (in) The arrangement.
|
||||||
*/
|
*/
|
||||||
Arr_landmarks_generator_base(const Arrangement_2& arr) :
|
Arr_landmarks_generator_base(const Base_aos& arr) :
|
||||||
Arr_observer<Arrangement_2> (const_cast<Arrangement_2 &>(arr)),
|
Base_aos::Observer(const_cast<Base_aos&>(arr)),
|
||||||
m_traits(static_cast<const Traits_adaptor_2*>(arr.geometry_traits())),
|
m_traits(static_cast<const Traits_adaptor_2*>(arr.geometry_traits())),
|
||||||
m_ignore_notifications(false),
|
m_ignore_notifications(false),
|
||||||
m_ignore_remove_edge(false),
|
m_ignore_remove_edge(false),
|
||||||
|
|
@ -124,8 +123,7 @@ public:
|
||||||
/*! Create the landmarks set (choosing the landmarks) ,
|
/*! Create the landmarks set (choosing the landmarks) ,
|
||||||
* and saving them in the nearest-neighbor search structure.
|
* and saving them in the nearest-neighbor search structure.
|
||||||
*/
|
*/
|
||||||
virtual void build_landmark_set()
|
virtual void build_landmark_set() {
|
||||||
{
|
|
||||||
// Create the landmark points.
|
// Create the landmark points.
|
||||||
NN_Points_set nn_points;
|
NN_Points_set nn_points;
|
||||||
_create_nn_points_set(nn_points);
|
_create_nn_points_set(nn_points);
|
||||||
|
|
@ -140,8 +138,7 @@ public:
|
||||||
|
|
||||||
/*! clear the set of landmarks.
|
/*! clear the set of landmarks.
|
||||||
*/
|
*/
|
||||||
virtual void clear_landmark_set()
|
virtual void clear_landmark_set() {
|
||||||
{
|
|
||||||
nn.clear();
|
nn.clear();
|
||||||
num_small_not_updated_changes = 0;
|
num_small_not_updated_changes = 0;
|
||||||
updated = false;
|
updated = false;
|
||||||
|
|
@ -153,8 +150,7 @@ public:
|
||||||
* arrangement (a vertex, halfedge, or face handle).
|
* arrangement (a vertex, halfedge, or face handle).
|
||||||
* \return The nearest landmark point.
|
* \return The nearest landmark point.
|
||||||
*/
|
*/
|
||||||
virtual Point_2 closest_landmark(const Point_2& p, PL_result_type& obj)
|
virtual Point_2 closest_landmark(const Point_2& p, PL_result_type& obj) {
|
||||||
{
|
|
||||||
CGAL_assertion(updated);
|
CGAL_assertion(updated);
|
||||||
return (nn.find_nearest_neighbor(p, obj));
|
return (nn.find_nearest_neighbor(p, obj));
|
||||||
}
|
}
|
||||||
|
|
@ -162,13 +158,13 @@ public:
|
||||||
/// \name Overloaded observer functions on global changes.
|
/// \name Overloaded observer functions on global changes.
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
/*!
|
/*! Notification before the arrangement is assigned with the content of
|
||||||
* Notification before the arrangement is assigned with another
|
* another arrangement.
|
||||||
* arrangement.
|
* \param arr The other arrangement. Notice that the arrangement type is the
|
||||||
* \param arr The arrangement to be copied.
|
* type used to instantiate the observer, which is conveniently
|
||||||
|
* defined as `Arrangement_2::Base_aos`.
|
||||||
*/
|
*/
|
||||||
virtual void before_assign(const Arrangement_2& arr)
|
virtual void before_assign(const Base_aos& arr) override {
|
||||||
{
|
|
||||||
this->clear_landmark_set();
|
this->clear_landmark_set();
|
||||||
m_traits = static_cast<const Traits_adaptor_2*>(arr.geometry_traits());
|
m_traits = static_cast<const Traits_adaptor_2*>(arr.geometry_traits());
|
||||||
m_ignore_notifications = true;
|
m_ignore_notifications = true;
|
||||||
|
|
@ -177,8 +173,7 @@ public:
|
||||||
/*! Notification after the arrangement has been assigned with another
|
/*! Notification after the arrangement has been assigned with another
|
||||||
* arrangement.
|
* arrangement.
|
||||||
*/
|
*/
|
||||||
virtual void after_assign()
|
virtual void after_assign() override {
|
||||||
{
|
|
||||||
this->build_landmark_set();
|
this->build_landmark_set();
|
||||||
m_ignore_notifications = false;
|
m_ignore_notifications = false;
|
||||||
}
|
}
|
||||||
|
|
@ -186,8 +181,7 @@ public:
|
||||||
/*! Notification before the observer is attached to an arrangement.
|
/*! Notification before the observer is attached to an arrangement.
|
||||||
* \param arr The arrangement we are about to attach the observer to.
|
* \param arr The arrangement we are about to attach the observer to.
|
||||||
*/
|
*/
|
||||||
virtual void before_attach(const Arrangement_2& arr)
|
virtual void before_attach(const Base_aos& arr) override {
|
||||||
{
|
|
||||||
this->clear_landmark_set();
|
this->clear_landmark_set();
|
||||||
m_traits = static_cast<const Traits_adaptor_2*>(arr.geometry_traits());
|
m_traits = static_cast<const Traits_adaptor_2*>(arr.geometry_traits());
|
||||||
m_ignore_notifications = true;
|
m_ignore_notifications = true;
|
||||||
|
|
@ -195,38 +189,33 @@ public:
|
||||||
|
|
||||||
/*! Notification after the observer has been attached to an arrangement.
|
/*! Notification after the observer has been attached to an arrangement.
|
||||||
*/
|
*/
|
||||||
virtual void after_attach()
|
virtual void after_attach() override {
|
||||||
{
|
|
||||||
this->build_landmark_set();
|
this->build_landmark_set();
|
||||||
m_ignore_notifications = false;
|
m_ignore_notifications = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Notification before the observer is detached from the arrangement.
|
/*! Notification before the observer is detached from the arrangement.
|
||||||
*/
|
*/
|
||||||
virtual void before_detach()
|
virtual void before_detach() override { this->clear_landmark_set(); }
|
||||||
{ this->clear_landmark_set(); }
|
|
||||||
|
|
||||||
/*! Notification after the arrangement is cleared.
|
/*! Notification after the arrangement is cleared.
|
||||||
* \param u A handle to the unbounded face.
|
* \param u A handle to the unbounded face.
|
||||||
*/
|
*/
|
||||||
virtual void after_clear()
|
virtual void after_clear() override {
|
||||||
{
|
|
||||||
this->clear_landmark_set();
|
this->clear_landmark_set();
|
||||||
this->build_landmark_set();
|
this->build_landmark_set();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Notification before a global operation modifies the arrangement.
|
/*! Notification before a global operation modifies the arrangement.
|
||||||
*/
|
*/
|
||||||
virtual void before_global_change()
|
virtual void before_global_change() override {
|
||||||
{
|
|
||||||
this->clear_landmark_set();
|
this->clear_landmark_set();
|
||||||
m_ignore_notifications = true;
|
m_ignore_notifications = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Notification after a global operation is completed.
|
/*! Notification after a global operation is completed.
|
||||||
*/
|
*/
|
||||||
virtual void after_global_change()
|
virtual void after_global_change() override {
|
||||||
{
|
|
||||||
this->build_landmark_set();
|
this->build_landmark_set();
|
||||||
m_ignore_notifications = false;
|
m_ignore_notifications = false;
|
||||||
}
|
}
|
||||||
|
|
@ -238,12 +227,11 @@ public:
|
||||||
/*! Notification before the removal of an edge.
|
/*! Notification before the removal of an edge.
|
||||||
* \param e (in) A handle to one of the twin halfedges to be removed.
|
* \param e (in) A handle to one of the twin halfedges to be removed.
|
||||||
*/
|
*/
|
||||||
virtual void before_remove_edge(Halfedge_handle /* e */)
|
virtual void before_remove_edge(Halfedge_handle /* e */) override
|
||||||
{ m_ignore_remove_edge = true; }
|
{ m_ignore_remove_edge = true; }
|
||||||
|
|
||||||
/*! Notification after the creation of a new vertex. */
|
/*! Notification after the creation of a new vertex. */
|
||||||
virtual void after_create_vertex(Vertex_handle)
|
virtual void after_create_vertex(Vertex_handle) override {
|
||||||
{
|
|
||||||
if (! m_ignore_notifications) {
|
if (! m_ignore_notifications) {
|
||||||
clear_landmark_set();
|
clear_landmark_set();
|
||||||
build_landmark_set();
|
build_landmark_set();
|
||||||
|
|
@ -251,8 +239,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Notification after the creation of a new edge. */
|
/*! Notification after the creation of a new edge. */
|
||||||
virtual void after_create_edge(Halfedge_handle)
|
virtual void after_create_edge(Halfedge_handle) override {
|
||||||
{
|
|
||||||
if (! m_ignore_notifications) {
|
if (! m_ignore_notifications) {
|
||||||
clear_landmark_set();
|
clear_landmark_set();
|
||||||
build_landmark_set();
|
build_landmark_set();
|
||||||
|
|
@ -260,8 +247,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Notification after an edge was split. */
|
/*! Notification after an edge was split. */
|
||||||
virtual void after_split_edge(Halfedge_handle, Halfedge_handle)
|
virtual void after_split_edge(Halfedge_handle, Halfedge_handle) override {
|
||||||
{
|
|
||||||
if (! m_ignore_notifications) {
|
if (! m_ignore_notifications) {
|
||||||
clear_landmark_set();
|
clear_landmark_set();
|
||||||
build_landmark_set();
|
build_landmark_set();
|
||||||
|
|
@ -269,8 +255,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Notification after a face was split. */
|
/*! Notification after a face was split. */
|
||||||
virtual void after_split_face(Face_handle, Face_handle, bool)
|
virtual void after_split_face(Face_handle, Face_handle, bool) override {
|
||||||
{
|
|
||||||
if (! m_ignore_notifications) {
|
if (! m_ignore_notifications) {
|
||||||
clear_landmark_set();
|
clear_landmark_set();
|
||||||
build_landmark_set();
|
build_landmark_set();
|
||||||
|
|
@ -280,8 +265,7 @@ public:
|
||||||
/*! Notification after an outer CCB was split.*/
|
/*! Notification after an outer CCB was split.*/
|
||||||
virtual void after_split_outer_ccb(Face_handle,
|
virtual void after_split_outer_ccb(Face_handle,
|
||||||
Ccb_halfedge_circulator,
|
Ccb_halfedge_circulator,
|
||||||
Ccb_halfedge_circulator)
|
Ccb_halfedge_circulator) override {
|
||||||
{
|
|
||||||
if (! m_ignore_notifications) {
|
if (! m_ignore_notifications) {
|
||||||
clear_landmark_set();
|
clear_landmark_set();
|
||||||
build_landmark_set();
|
build_landmark_set();
|
||||||
|
|
@ -291,8 +275,7 @@ public:
|
||||||
/*! Notification after an inner CCB was split. */
|
/*! Notification after an inner CCB was split. */
|
||||||
virtual void after_split_inner_ccb(Face_handle,
|
virtual void after_split_inner_ccb(Face_handle,
|
||||||
Ccb_halfedge_circulator,
|
Ccb_halfedge_circulator,
|
||||||
Ccb_halfedge_circulator)
|
Ccb_halfedge_circulator) override {
|
||||||
{
|
|
||||||
if (! m_ignore_notifications) {
|
if (! m_ignore_notifications) {
|
||||||
clear_landmark_set();
|
clear_landmark_set();
|
||||||
build_landmark_set();
|
build_landmark_set();
|
||||||
|
|
@ -300,8 +283,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Notification after an outer CCB was added to a face. */
|
/*! Notification after an outer CCB was added to a face. */
|
||||||
virtual void after_add_outer_ccb(Ccb_halfedge_circulator)
|
virtual void after_add_outer_ccb(Ccb_halfedge_circulator) override {
|
||||||
{
|
|
||||||
if (! m_ignore_notifications) {
|
if (! m_ignore_notifications) {
|
||||||
clear_landmark_set();
|
clear_landmark_set();
|
||||||
build_landmark_set();
|
build_landmark_set();
|
||||||
|
|
@ -309,8 +291,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Notification after an inner CCB was created inside a face. */
|
/*! Notification after an inner CCB was created inside a face. */
|
||||||
virtual void after_add_inner_ccb(Ccb_halfedge_circulator)
|
virtual void after_add_inner_ccb(Ccb_halfedge_circulator) override {
|
||||||
{
|
|
||||||
if (! m_ignore_notifications) {
|
if (! m_ignore_notifications) {
|
||||||
clear_landmark_set();
|
clear_landmark_set();
|
||||||
build_landmark_set();
|
build_landmark_set();
|
||||||
|
|
@ -318,8 +299,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Notification after an isolated vertex was created inside a face. */
|
/*! Notification after an isolated vertex was created inside a face. */
|
||||||
virtual void after_add_isolated_vertex(Vertex_handle)
|
virtual void after_add_isolated_vertex(Vertex_handle) override {
|
||||||
{
|
|
||||||
if (! m_ignore_notifications) {
|
if (! m_ignore_notifications) {
|
||||||
clear_landmark_set();
|
clear_landmark_set();
|
||||||
build_landmark_set();
|
build_landmark_set();
|
||||||
|
|
@ -327,8 +307,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Notification after an edge was merged. */
|
/*! Notification after an edge was merged. */
|
||||||
virtual void after_merge_edge(Halfedge_handle)
|
virtual void after_merge_edge(Halfedge_handle) override {
|
||||||
{
|
|
||||||
if (! m_ignore_notifications) {
|
if (! m_ignore_notifications) {
|
||||||
clear_landmark_set();
|
clear_landmark_set();
|
||||||
build_landmark_set();
|
build_landmark_set();
|
||||||
|
|
@ -336,8 +315,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Notification after a face was merged. */
|
/*! Notification after a face was merged. */
|
||||||
virtual void after_merge_face(Face_handle)
|
virtual void after_merge_face(Face_handle) override {
|
||||||
{
|
|
||||||
if (! m_ignore_notifications && ! m_ignore_remove_edge) {
|
if (! m_ignore_notifications && ! m_ignore_remove_edge) {
|
||||||
clear_landmark_set();
|
clear_landmark_set();
|
||||||
build_landmark_set();
|
build_landmark_set();
|
||||||
|
|
@ -346,7 +324,7 @@ public:
|
||||||
|
|
||||||
/*! Notification after an outer CCB was merged. */
|
/*! Notification after an outer CCB was merged. */
|
||||||
virtual void after_merge_outer_ccb(Face_handle, Ccb_halfedge_circulator)
|
virtual void after_merge_outer_ccb(Face_handle, Ccb_halfedge_circulator)
|
||||||
{
|
override {
|
||||||
if (! m_ignore_notifications) {
|
if (! m_ignore_notifications) {
|
||||||
clear_landmark_set();
|
clear_landmark_set();
|
||||||
build_landmark_set();
|
build_landmark_set();
|
||||||
|
|
@ -355,7 +333,7 @@ public:
|
||||||
|
|
||||||
/*! Notification after an inner CCB was merged. */
|
/*! Notification after an inner CCB was merged. */
|
||||||
virtual void after_merge_inner_ccb(Face_handle, Ccb_halfedge_circulator)
|
virtual void after_merge_inner_ccb(Face_handle, Ccb_halfedge_circulator)
|
||||||
{
|
override {
|
||||||
if (! m_ignore_notifications) {
|
if (! m_ignore_notifications) {
|
||||||
clear_landmark_set();
|
clear_landmark_set();
|
||||||
build_landmark_set();
|
build_landmark_set();
|
||||||
|
|
@ -363,8 +341,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Notification after an outer CCB is moved from one face to another. */
|
/*! Notification after an outer CCB is moved from one face to another. */
|
||||||
virtual void after_move_outer_ccb(Ccb_halfedge_circulator )
|
virtual void after_move_outer_ccb(Ccb_halfedge_circulator) override {
|
||||||
{
|
|
||||||
if (! m_ignore_notifications) {
|
if (! m_ignore_notifications) {
|
||||||
clear_landmark_set();
|
clear_landmark_set();
|
||||||
build_landmark_set();
|
build_landmark_set();
|
||||||
|
|
@ -372,8 +349,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Notification after an inner CCB is moved from one face to another. */
|
/*! Notification after an inner CCB is moved from one face to another. */
|
||||||
virtual void after_move_inner_ccb(Ccb_halfedge_circulator )
|
virtual void after_move_inner_ccb(Ccb_halfedge_circulator) override {
|
||||||
{
|
|
||||||
if (! m_ignore_notifications) {
|
if (! m_ignore_notifications) {
|
||||||
clear_landmark_set();
|
clear_landmark_set();
|
||||||
build_landmark_set();
|
build_landmark_set();
|
||||||
|
|
@ -381,8 +357,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Notification after an isolated vertex is moved. */
|
/*! Notification after an isolated vertex is moved. */
|
||||||
virtual void after_move_isolated_vertex(Vertex_handle )
|
virtual void after_move_isolated_vertex(Vertex_handle) override {
|
||||||
{
|
|
||||||
if (! m_ignore_notifications) {
|
if (! m_ignore_notifications) {
|
||||||
clear_landmark_set();
|
clear_landmark_set();
|
||||||
build_landmark_set();
|
build_landmark_set();
|
||||||
|
|
@ -390,8 +365,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Notificaion after the removal of a vertex. */
|
/*! Notificaion after the removal of a vertex. */
|
||||||
virtual void after_remove_vertex()
|
virtual void after_remove_vertex() override {
|
||||||
{
|
|
||||||
if (! m_ignore_notifications && ! m_ignore_remove_edge) {
|
if (! m_ignore_notifications && ! m_ignore_remove_edge) {
|
||||||
clear_landmark_set();
|
clear_landmark_set();
|
||||||
build_landmark_set();
|
build_landmark_set();
|
||||||
|
|
@ -399,8 +373,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Notification after the removal of an edge. */
|
/*! Notification after the removal of an edge. */
|
||||||
virtual void after_remove_edge()
|
virtual void after_remove_edge() override {
|
||||||
{
|
|
||||||
if (! m_ignore_notifications) {
|
if (! m_ignore_notifications) {
|
||||||
clear_landmark_set();
|
clear_landmark_set();
|
||||||
build_landmark_set();
|
build_landmark_set();
|
||||||
|
|
@ -409,8 +382,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Notificaion after the removal of an outer CCB. */
|
/*! Notificaion after the removal of an outer CCB. */
|
||||||
virtual void after_remove_outer_ccb(Face_handle)
|
virtual void after_remove_outer_ccb(Face_handle) override {
|
||||||
{
|
|
||||||
if (! m_ignore_notifications && ! m_ignore_remove_edge) {
|
if (! m_ignore_notifications && ! m_ignore_remove_edge) {
|
||||||
clear_landmark_set();
|
clear_landmark_set();
|
||||||
build_landmark_set();
|
build_landmark_set();
|
||||||
|
|
@ -418,8 +390,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Notificaion after the removal of an inner CCB. */
|
/*! Notificaion after the removal of an inner CCB. */
|
||||||
virtual void after_remove_inner_ccb(Face_handle)
|
virtual void after_remove_inner_ccb(Face_handle) override {
|
||||||
{
|
|
||||||
if (! m_ignore_notifications && ! m_ignore_remove_edge) {
|
if (! m_ignore_notifications && ! m_ignore_remove_edge) {
|
||||||
clear_landmark_set();
|
clear_landmark_set();
|
||||||
build_landmark_set();
|
build_landmark_set();
|
||||||
|
|
@ -434,8 +405,7 @@ protected:
|
||||||
*/
|
*/
|
||||||
virtual void _create_points_set(Points_set&) = 0;
|
virtual void _create_points_set(Points_set&) = 0;
|
||||||
|
|
||||||
virtual void _create_nn_points_set(NN_Points_set& nn_points)
|
virtual void _create_nn_points_set(NN_Points_set& nn_points) {
|
||||||
{
|
|
||||||
Points_set points;
|
Points_set points;
|
||||||
Pairs_set pairs;
|
Pairs_set pairs;
|
||||||
|
|
||||||
|
|
@ -453,8 +423,7 @@ protected:
|
||||||
|
|
||||||
// Insert all landmarks (paired with their current location in the
|
// Insert all landmarks (paired with their current location in the
|
||||||
// arrangement) into the nearest-neighbor search structure.
|
// arrangement) into the nearest-neighbor search structure.
|
||||||
Pairs_iterator itr;
|
for (auto itr = pairs.begin(); itr != pairs.end(); ++itr) {
|
||||||
for (itr = pairs.begin(); itr != pairs.end(); ++itr) {
|
|
||||||
NN_Point_2 np(itr->first, itr->second);
|
NN_Point_2 np(itr->first, itr->second);
|
||||||
nn_points.push_back(np);
|
nn_points.push_back(np);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -98,14 +98,13 @@ public:
|
||||||
virtual void build_landmark_set()
|
virtual void build_landmark_set()
|
||||||
{
|
{
|
||||||
// Go over the arrangement, and insert all its vertices as landmarks.
|
// Go over the arrangement, and insert all its vertices as landmarks.
|
||||||
NN_Point_list nnp_list;
|
NN_Point_list nnp_list;
|
||||||
const Arrangement_2* arr = this->arrangement();
|
const auto* arr = this->arrangement();
|
||||||
Vertex_const_iterator vit;
|
|
||||||
num_landmarks = 0;
|
num_landmarks = 0;
|
||||||
for (vit = arr->vertices_begin(); vit != arr->vertices_end(); ++vit) {
|
for (auto vit = arr->vertices_begin(); vit != arr->vertices_end(); ++vit) {
|
||||||
Vertex_const_handle vh = vit;
|
Vertex_const_handle vh = vit;
|
||||||
nnp_list.push_back(NN_Point_2(vh->point(), this->pl_make_result(vh)));
|
nnp_list.push_back(NN_Point_2(vh->point(), this->pl_make_result(vh)));
|
||||||
num_landmarks++;
|
++num_landmarks;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update the search structure.
|
// Update the search structure.
|
||||||
|
|
|
||||||
|
|
@ -177,6 +177,7 @@ public:
|
||||||
|
|
||||||
//typedef of arrangement on surface
|
//typedef of arrangement on surface
|
||||||
typedef typename Traits::Arrangement_on_surface_2 Arrangement_on_surface_2;
|
typedef typename Traits::Arrangement_on_surface_2 Arrangement_on_surface_2;
|
||||||
|
using Base_aos = typename Arrangement_on_surface_2::Base_aos;
|
||||||
|
|
||||||
//type of traits adaptor
|
//type of traits adaptor
|
||||||
typedef typename Traits::Arrangement_on_surface_2::Traits_adaptor_2
|
typedef typename Traits::Arrangement_on_surface_2::Traits_adaptor_2
|
||||||
|
|
@ -1804,7 +1805,7 @@ public:
|
||||||
return m_number_of_curves;
|
return m_number_of_curves;
|
||||||
}
|
}
|
||||||
|
|
||||||
void init_arrangement_and_traits(const Arrangement_on_surface_2* arr,
|
void init_arrangement_and_traits(const Base_aos* arr,
|
||||||
bool allocate_traits = true)
|
bool allocate_traits = true)
|
||||||
{
|
{
|
||||||
m_arr = arr;
|
m_arr = arr;
|
||||||
|
|
@ -2125,7 +2126,7 @@ protected:
|
||||||
unsigned long m_number_of_curves;
|
unsigned long m_number_of_curves;
|
||||||
const Traits* traits;
|
const Traits* traits;
|
||||||
//Before_split_data m_before_split;
|
//Before_split_data m_before_split;
|
||||||
const Arrangement_on_surface_2* m_arr;
|
const Base_aos* m_arr;
|
||||||
const Traits_adaptor_2* m_trts_adaptor;
|
const Traits_adaptor_2* m_trts_adaptor;
|
||||||
|
|
||||||
Halfedge_const_handle m_empty_he_handle;
|
Halfedge_const_handle m_empty_he_handle;
|
||||||
|
|
|
||||||
|
|
@ -8,8 +8,8 @@
|
||||||
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Author(s) : Idit Haran <haranidi@post.tau.ac.il>
|
// Author(s): Idit Haran <haranidi@post.tau.ac.il>
|
||||||
// (based on old version by Oren Nechushtan and Iddo Hanniel)
|
// (based on old version by Oren Nechushtan and Iddo Hanniel)
|
||||||
|
|
||||||
#ifndef CGAL_ARR_TRAPEZOID_RIC_POINT_LOCATION_H
|
#ifndef CGAL_ARR_TRAPEZOID_RIC_POINT_LOCATION_H
|
||||||
#define CGAL_ARR_TRAPEZOID_RIC_POINT_LOCATION_H
|
#define CGAL_ARR_TRAPEZOID_RIC_POINT_LOCATION_H
|
||||||
|
|
@ -26,7 +26,6 @@
|
||||||
#include <CGAL/Arrangement_2/Arr_traits_adaptor_2.h>
|
#include <CGAL/Arrangement_2/Arr_traits_adaptor_2.h>
|
||||||
#include <CGAL/Arr_point_location/Trapezoidal_decomposition_2.h>
|
#include <CGAL/Arr_point_location/Trapezoidal_decomposition_2.h>
|
||||||
#include <CGAL/Arr_point_location/Td_traits.h>
|
#include <CGAL/Arr_point_location/Td_traits.h>
|
||||||
#include <CGAL/Arr_observer.h>
|
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
|
|
@ -36,96 +35,95 @@ namespace CGAL {
|
||||||
* The Arrangement parameter corresponds to an arrangement instantiation.
|
* The Arrangement parameter corresponds to an arrangement instantiation.
|
||||||
*/
|
*/
|
||||||
template <typename Arrangement_>
|
template <typename Arrangement_>
|
||||||
class Arr_trapezoid_ric_point_location : public Arr_observer <Arrangement_> {
|
class Arr_trapezoid_ric_point_location : public Arrangement_::Observer {
|
||||||
public:
|
public:
|
||||||
//type of arrangement on surface
|
//type of arrangement on surface
|
||||||
typedef Arrangement_ Arrangement_on_surface_2;
|
using Arrangement_on_surface_2 = Arrangement_;
|
||||||
|
using Base_aos = typename Arrangement_on_surface_2::Base_aos;
|
||||||
|
|
||||||
//type of geometry traits
|
//type of geometry traits
|
||||||
typedef typename Arrangement_on_surface_2::Geometry_traits_2
|
using Geometry_traits_2 = typename Base_aos::Geometry_traits_2;
|
||||||
Geometry_traits_2;
|
|
||||||
//type of traits adaptor
|
//type of traits adaptor
|
||||||
typedef typename Arrangement_on_surface_2::Traits_adaptor_2
|
using Traits_adaptor_2 = typename Base_aos::Traits_adaptor_2;
|
||||||
Traits_adaptor_2;
|
|
||||||
//type of vertex handle
|
//type of vertex handle
|
||||||
typedef typename Arrangement_on_surface_2::Vertex_handle
|
using Vertex_handle = typename Base_aos::Vertex_handle;
|
||||||
Vertex_handle;
|
|
||||||
//type of vertex const handle
|
//type of vertex const handle
|
||||||
typedef typename Arrangement_on_surface_2::Vertex_const_handle
|
using Vertex_const_handle = typename Base_aos::Vertex_const_handle;
|
||||||
Vertex_const_handle;
|
|
||||||
//type of halfedge handle
|
//type of halfedge handle
|
||||||
typedef typename Arrangement_on_surface_2::Halfedge_handle
|
using Halfedge_handle = typename Base_aos::Halfedge_handle;
|
||||||
Halfedge_handle;
|
|
||||||
//type of halfedge const handle
|
//type of halfedge const handle
|
||||||
typedef typename Arrangement_on_surface_2::Halfedge_const_handle
|
using Halfedge_const_handle = typename Base_aos::Halfedge_const_handle;
|
||||||
Halfedge_const_handle;
|
|
||||||
//type of face const handle
|
//type of face const handle
|
||||||
typedef typename Arrangement_on_surface_2::Face_const_handle
|
using Face_const_handle = typename Base_aos::Face_const_handle;
|
||||||
Face_const_handle;
|
|
||||||
//type of edge const iterator
|
//type of edge const iterator
|
||||||
typedef typename Arrangement_on_surface_2::Edge_const_iterator
|
using Edge_const_iterator = typename Base_aos::Edge_const_iterator;
|
||||||
Edge_const_iterator;
|
|
||||||
//type of isolated vertex const iterator
|
//type of isolated vertex const iterator
|
||||||
typedef typename Arrangement_on_surface_2::Isolated_vertex_const_iterator
|
using Isolated_vertex_const_iterator =
|
||||||
Isolated_vertex_const_iterator;
|
typename Base_aos::Isolated_vertex_const_iterator;
|
||||||
|
|
||||||
//type of point
|
//type of point
|
||||||
typedef typename Geometry_traits_2::Point_2 Point_2;
|
using Point_2 = typename Geometry_traits_2::Point_2;
|
||||||
|
|
||||||
//type of x-monotone curve
|
//type of x-monotone curve
|
||||||
typedef typename Geometry_traits_2::X_monotone_curve_2
|
using X_monotone_curve_2 = typename Geometry_traits_2::X_monotone_curve_2;
|
||||||
X_monotone_curve_2;
|
|
||||||
|
|
||||||
//type of trapezoidal decomposition traits class
|
//type of trapezoidal decomposition traits class
|
||||||
typedef CGAL::Td_traits<Traits_adaptor_2, Arrangement_on_surface_2>
|
using Td_traits = CGAL::Td_traits<Traits_adaptor_2, Base_aos>;
|
||||||
Td_traits;
|
|
||||||
//type of trapezoidal decomposition class
|
//type of trapezoidal decomposition class
|
||||||
typedef Trapezoidal_decomposition_2<Td_traits>
|
using Trapezoidal_decomposition = Trapezoidal_decomposition_2<Td_traits>;
|
||||||
Trapezoidal_decomposition;
|
|
||||||
|
|
||||||
//!types of Td_map_item-s
|
//!types of Td_map_item-s
|
||||||
typedef typename Trapezoidal_decomposition::Td_map_item
|
using Td_map_item = typename Trapezoidal_decomposition::Td_map_item;
|
||||||
Td_map_item;
|
using Td_active_vertex = typename Trapezoidal_decomposition::Td_active_vertex;
|
||||||
typedef typename Trapezoidal_decomposition::Td_active_vertex
|
using Td_active_fictitious_vertex =
|
||||||
Td_active_vertex;
|
typename Trapezoidal_decomposition::Td_active_fictitious_vertex;
|
||||||
typedef typename Trapezoidal_decomposition::Td_active_fictitious_vertex
|
using Td_active_edge = typename Trapezoidal_decomposition::Td_active_edge;
|
||||||
Td_active_fictitious_vertex;
|
using Td_active_trapezoid =
|
||||||
typedef typename Trapezoidal_decomposition::Td_active_edge
|
typename Trapezoidal_decomposition::Td_active_trapezoid;
|
||||||
Td_active_edge;
|
|
||||||
typedef typename Trapezoidal_decomposition::Td_active_trapezoid
|
|
||||||
Td_active_trapezoid;
|
|
||||||
//!type of side tags
|
//!type of side tags
|
||||||
typedef typename Traits_adaptor_2::Left_side_category Left_side_category;
|
using Left_side_category = typename Traits_adaptor_2::Left_side_category;
|
||||||
typedef typename Traits_adaptor_2::Bottom_side_category Bottom_side_category;
|
using Bottom_side_category = typename Traits_adaptor_2::Bottom_side_category;
|
||||||
typedef typename Traits_adaptor_2::Top_side_category Top_side_category;
|
using Top_side_category = typename Traits_adaptor_2::Top_side_category;
|
||||||
typedef typename Traits_adaptor_2::Right_side_category Right_side_category;
|
using Right_side_category = typename Traits_adaptor_2::Right_side_category;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
typedef Arr_point_location_result<Arrangement_on_surface_2> Result;
|
using Result = Arr_point_location_result<Base_aos>;
|
||||||
typedef typename Result::Type Result_type;
|
using Result_type = typename Result::Type;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
// Support cpp11::result_of
|
// Support cpp11::result_of
|
||||||
typedef Result_type result_type;
|
using result_type = Result_type;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
//type of trapezoidal decomposition class
|
//type of trapezoidal decomposition class
|
||||||
typedef Trapezoidal_decomposition TD;
|
using TD = Trapezoidal_decomposition;
|
||||||
|
|
||||||
typedef typename Arr_all_sides_oblivious_category<Left_side_category,
|
using All_sides_oblivious_category=
|
||||||
Bottom_side_category,
|
typename Arr_all_sides_oblivious_category<Left_side_category,
|
||||||
Top_side_category,
|
Bottom_side_category,
|
||||||
Right_side_category>::result
|
Top_side_category,
|
||||||
All_sides_oblivious_category;
|
Right_side_category>::result;
|
||||||
|
|
||||||
// Data members:
|
// Data members:
|
||||||
const Traits_adaptor_2* m_traits; // Its associated traits object.
|
const Traits_adaptor_2* m_traits; // Its associated traits object.
|
||||||
TD td; // instance of trapezoidal decomposition
|
TD td; // instance of trapezoidal decomposition
|
||||||
bool m_with_guarantees;
|
bool m_with_guarantees;
|
||||||
//for the notification functions
|
//for the notification functions
|
||||||
X_monotone_curve_2 m_cv_before_split;
|
X_monotone_curve_2 m_cv_before_split;
|
||||||
Halfedge_handle m_he_after_merge;
|
Halfedge_handle m_he_after_merge;
|
||||||
//X_monotone_curve_2 m_cv_before_merge1;
|
//X_monotone_curve_2 m_cv_before_merge1;
|
||||||
//X_monotone_curve_2 m_cv_before_merge2;
|
//X_monotone_curve_2 m_cv_before_merge2;
|
||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
Result_type make_result(T t) const { return Result::make_result(t); }
|
Result_type make_result(T t) const { return Result::make_result(t); }
|
||||||
|
|
@ -133,26 +131,25 @@ protected:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*! Default constructor. */
|
/*! Default constructor. */
|
||||||
Arr_trapezoid_ric_point_location(bool with_guarantees = true,
|
Arr_trapezoid_ric_point_location
|
||||||
double depth_thrs = CGAL_TD_DEFAULT_DEPTH_THRESHOLD,
|
(bool with_guarantees = true,
|
||||||
double size_thrs = CGAL_TD_DEFAULT_SIZE_THRESHOLD) :
|
double depth_thrs = CGAL_TD_DEFAULT_DEPTH_THRESHOLD,
|
||||||
m_traits(nullptr), m_with_guarantees(with_guarantees)
|
double size_thrs = CGAL_TD_DEFAULT_SIZE_THRESHOLD) :
|
||||||
{
|
m_traits(nullptr), m_with_guarantees(with_guarantees) {
|
||||||
td.set_with_guarantees(with_guarantees);
|
td.set_with_guarantees(with_guarantees);
|
||||||
td.depth_threshold(depth_thrs);
|
td.depth_threshold(depth_thrs);
|
||||||
td.size_threshold(size_thrs);
|
td.size_threshold(size_thrs);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Constructor given an arrangement. */
|
/*! Constructor given an arrangement. */
|
||||||
Arr_trapezoid_ric_point_location (const Arrangement_on_surface_2& arr,
|
Arr_trapezoid_ric_point_location
|
||||||
bool with_guarantees = true,
|
(const Base_aos& arr,
|
||||||
double depth_thrs = CGAL_TD_DEFAULT_DEPTH_THRESHOLD,
|
bool with_guarantees = true,
|
||||||
double size_thrs = CGAL_TD_DEFAULT_SIZE_THRESHOLD) :
|
double depth_thrs = CGAL_TD_DEFAULT_DEPTH_THRESHOLD,
|
||||||
Arr_observer<Arrangement_on_surface_2>
|
double size_thrs = CGAL_TD_DEFAULT_SIZE_THRESHOLD) :
|
||||||
(const_cast<Arrangement_on_surface_2 &>(arr)),
|
Base_aos::Observer(const_cast<Base_aos&>(arr)),
|
||||||
m_with_guarantees(with_guarantees)
|
m_with_guarantees(with_guarantees) {
|
||||||
{
|
m_traits = static_cast<const Traits_adaptor_2*>(arr.geometry_traits());
|
||||||
m_traits = static_cast<const Traits_adaptor_2*> (arr.geometry_traits());
|
|
||||||
td.set_with_guarantees(with_guarantees);
|
td.set_with_guarantees(with_guarantees);
|
||||||
td.init_arrangement_and_traits(&arr);
|
td.init_arrangement_and_traits(&arr);
|
||||||
td.depth_threshold(depth_thrs);
|
td.depth_threshold(depth_thrs);
|
||||||
|
|
@ -161,17 +158,15 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Destructor. */
|
/*! Destructor. */
|
||||||
~Arr_trapezoid_ric_point_location () { }
|
~Arr_trapezoid_ric_point_location() { }
|
||||||
|
|
||||||
/*! defines whether the underlying search structure guarantees logarithmic
|
/*! defines whether the underlying search structure guarantees logarithmic
|
||||||
* query time and linear size */
|
* query time and linear size */
|
||||||
void with_guarantees (bool with_guarantees)
|
void with_guarantees(bool with_guarantees) {
|
||||||
{
|
|
||||||
//if with_guarantees was changed from false to true - reconstruct
|
//if with_guarantees was changed from false to true - reconstruct
|
||||||
// the search structure with guarantees
|
// the search structure with guarantees
|
||||||
td.set_with_guarantees(with_guarantees);
|
td.set_with_guarantees(with_guarantees);
|
||||||
if (with_guarantees && !m_with_guarantees)
|
if (with_guarantees && !m_with_guarantees) {
|
||||||
{
|
|
||||||
td.clear();
|
td.clear();
|
||||||
_construct_td();
|
_construct_td();
|
||||||
}
|
}
|
||||||
|
|
@ -182,30 +177,20 @@ public:
|
||||||
* (the longest path in the DAG)
|
* (the longest path in the DAG)
|
||||||
*/
|
*/
|
||||||
unsigned long depth() //longest_dag_path()
|
unsigned long depth() //longest_dag_path()
|
||||||
{
|
{ return td.largest_leaf_depth() + 1; }
|
||||||
return td.largest_leaf_depth() + 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*! returns the longest query path in the underlying search structure */
|
/*! returns the longest query path in the underlying search structure */
|
||||||
unsigned long longest_query_path_length()
|
unsigned long longest_query_path_length()
|
||||||
{
|
{ return td.longest_query_path_length(); }
|
||||||
return td.longest_query_path_length();
|
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef CGAL_TD_DEBUG
|
#ifdef CGAL_TD_DEBUG
|
||||||
//void locate_and_print (std::ostream& out, const Point_2& p) const
|
//void locate_and_print (std::ostream& out, const Point_2& p) const
|
||||||
//{
|
//{ td.locate_and_print(out, p); }
|
||||||
// td.locate_and_print(out, p);
|
|
||||||
//}
|
|
||||||
|
|
||||||
void print_dag(std::ostream& out) const
|
void print_dag(std::ostream& out) const { td.print_dag(out); }
|
||||||
{
|
|
||||||
td.print_dag(out);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*!
|
/*! Locate the arrangement feature containing the given point.
|
||||||
* Locate the arrangement feature containing the given point.
|
|
||||||
* \param p The query point.
|
* \param p The query point.
|
||||||
* \return An object representing the arrangement feature containing the
|
* \return An object representing the arrangement feature containing the
|
||||||
* query point. This object is either a Face_const_handle or a
|
* query point. This object is either a Face_const_handle or a
|
||||||
|
|
@ -213,8 +198,7 @@ public:
|
||||||
*/
|
*/
|
||||||
result_type locate(const Point_2& p) const;
|
result_type locate(const Point_2& p) const;
|
||||||
|
|
||||||
/*!
|
/*! Locate the arrangement feature which a upward vertical ray emanating from
|
||||||
* Locate the arrangement feature which a upward vertical ray emanating from
|
|
||||||
* the given point hits.
|
* the given point hits.
|
||||||
* \param p The query point.
|
* \param p The query point.
|
||||||
* \return An object representing the arrangement feature the ray hits.
|
* \return An object representing the arrangement feature the ray hits.
|
||||||
|
|
@ -224,8 +208,7 @@ public:
|
||||||
result_type ray_shoot_up(const Point_2& p) const
|
result_type ray_shoot_up(const Point_2& p) const
|
||||||
{ return (_vertical_ray_shoot(p, true)); }
|
{ return (_vertical_ray_shoot(p, true)); }
|
||||||
|
|
||||||
/*!
|
/*! Locate the arrangement feature which a downward vertical ray emanating
|
||||||
* Locate the arrangement feature which a downward vertical ray emanating
|
|
||||||
* from the given point hits.
|
* from the given point hits.
|
||||||
* \param p The query point.
|
* \param p The query point.
|
||||||
* \return An object representing the arrangement feature the ray hits.
|
* \return An object representing the arrangement feature the ray hits.
|
||||||
|
|
@ -239,72 +222,62 @@ public:
|
||||||
// base observer.
|
// base observer.
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
virtual void before_assign (const Arrangement_on_surface_2& arr)
|
/*! Notification before the arrangement is assigned with the content of
|
||||||
{
|
* another arrangement.
|
||||||
|
* \param arr The other arrangement. Notice that the arrangement type is the
|
||||||
|
* type used to instantiate the observer, which is conveniently
|
||||||
|
* defined as `Arrangement_2::Base_aos`.
|
||||||
|
*/
|
||||||
|
virtual void before_assign(const Base_aos& arr) override {
|
||||||
td.clear();
|
td.clear();
|
||||||
m_traits = static_cast<const Traits_adaptor_2*> (arr.geometry_traits());
|
m_traits = static_cast<const Traits_adaptor_2*> (arr.geometry_traits());
|
||||||
td.init_arrangement_and_traits(&arr, false);
|
td.init_arrangement_and_traits(&arr, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void after_assign ()
|
virtual void after_assign() override { _construct_td(); }
|
||||||
{
|
|
||||||
_construct_td();
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void before_clear ()
|
virtual void before_clear() override { td.clear(); }
|
||||||
{
|
|
||||||
td.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void after_clear ()
|
virtual void after_clear() override { _construct_td(); }
|
||||||
{
|
|
||||||
_construct_td();
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void before_attach (const Arrangement_on_surface_2& arr)
|
/*! Notification before the observer is attached to an arrangement.
|
||||||
{
|
* \param arr The arrangement that is about to attach the observer. Notice
|
||||||
|
* that the arrangement type is the type used to instantiate the
|
||||||
|
* observer, which is conveniently defined as
|
||||||
|
* `Arrangement_2::Base_aos`.
|
||||||
|
*/
|
||||||
|
virtual void before_attach(const Base_aos& arr) override {
|
||||||
td.clear();
|
td.clear();
|
||||||
m_traits = static_cast<const Traits_adaptor_2*> (arr.geometry_traits());
|
m_traits = static_cast<const Traits_adaptor_2*> (arr.geometry_traits());
|
||||||
td.init_arrangement_and_traits(&arr);
|
td.init_arrangement_and_traits(&arr);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void after_attach ()
|
virtual void after_attach() override { _construct_td(); }
|
||||||
{
|
|
||||||
_construct_td();
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void before_detach ()
|
virtual void before_detach() override { td.clear(); }
|
||||||
{
|
|
||||||
td.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void after_create_edge (Halfedge_handle e)
|
virtual void after_create_edge(Halfedge_handle e) override { td.insert(e); }
|
||||||
{
|
|
||||||
td.insert(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
//TODO IDIT OREN: what can be done in order to avoid the need
|
//TODO IDIT OREN: what can be done in order to avoid the need
|
||||||
//to save the original curve is to find the common endpoint of the
|
//to save the original curve is to find the common endpoint of the
|
||||||
//two new halfedges, locate it in the trapezoid in order to find the
|
//two new halfedges, locate it in the trapezoid in order to find the
|
||||||
//curve it lies on, which is the curve that was split, and then remove
|
//curve it lies on, which is the curve that was split, and then remove
|
||||||
//this curve.
|
//this curve.
|
||||||
virtual void before_split_edge (Halfedge_handle e,
|
virtual void before_split_edge(Halfedge_handle e,
|
||||||
Vertex_handle /* v */,
|
Vertex_handle /* v */,
|
||||||
const X_monotone_curve_2& /* cv1 */ ,
|
const X_monotone_curve_2& /* cv1 */,
|
||||||
const X_monotone_curve_2& /* cv2 */ )
|
const X_monotone_curve_2& /* cv2 */) override {
|
||||||
{
|
|
||||||
|
|
||||||
////MICHAL: commented due to inefficient depth update, remove and insert instead
|
////MICHAL: commented due to inefficient depth update, remove and insert
|
||||||
////save the curve for the "after" function.
|
////instead save the curve for the "after" function.
|
||||||
//m_cv_before_split = e->curve();
|
//m_cv_before_split = e->curve();
|
||||||
//td.before_split_edge(m_cv_before_split, cv1, cv2);
|
//td.before_split_edge(m_cv_before_split, cv1, cv2);
|
||||||
|
|
||||||
td.remove(e);
|
td.remove(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void after_split_edge (Halfedge_handle e1,
|
virtual void after_split_edge(Halfedge_handle e1, Halfedge_handle e2)
|
||||||
Halfedge_handle e2)
|
override {
|
||||||
{
|
|
||||||
//MICHAL: commented due to inefficient depth update, remove and insert instead
|
//MICHAL: commented due to inefficient depth update, remove and insert instead
|
||||||
//td.split_edge(m_cv_before_split,e1,e2);
|
//td.split_edge(m_cv_before_split,e1,e2);
|
||||||
|
|
||||||
|
|
@ -312,29 +285,20 @@ public:
|
||||||
td.insert(e2);
|
td.insert(e2);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void before_merge_edge (Halfedge_handle e1,
|
virtual void before_merge_edge(Halfedge_handle e1, Halfedge_handle e2,
|
||||||
Halfedge_handle e2,
|
const X_monotone_curve_2& cv) override {
|
||||||
const X_monotone_curve_2& cv)
|
|
||||||
{
|
|
||||||
//save the halfedge handle for the "after" function.
|
//save the halfedge handle for the "after" function.
|
||||||
m_he_after_merge = e1;
|
m_he_after_merge = e1;
|
||||||
td.merge_edge (e1, e2, cv);
|
td.merge_edge (e1, e2, cv);
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void after_merge_edge (Halfedge_handle e)
|
virtual void after_merge_edge(Halfedge_handle e) override
|
||||||
{
|
{ td.after_merge_edge(e, m_he_after_merge); }
|
||||||
td.after_merge_edge(e, m_he_after_merge);
|
|
||||||
}
|
|
||||||
|
|
||||||
virtual void before_remove_edge (Halfedge_handle e)
|
virtual void before_remove_edge(Halfedge_handle e) override { td.remove(e); }
|
||||||
{
|
|
||||||
//called before combinatoric deletion
|
|
||||||
td.remove(e);
|
|
||||||
}
|
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
//#ifdef CGAL_TD_DEBUG
|
//#ifdef CGAL_TD_DEBUG
|
||||||
// void debug()
|
// void debug()
|
||||||
// {
|
// {
|
||||||
|
|
@ -343,27 +307,22 @@ public:
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
/*! Construct the trapezoidal decomposition. */
|
/*! Construct the trapezoidal decomposition. */
|
||||||
void _construct_td ()
|
void _construct_td() {
|
||||||
{
|
|
||||||
td.clear();
|
td.clear();
|
||||||
|
|
||||||
std::vector<Halfedge_const_handle> he_container;
|
std::vector<Halfedge_const_handle> he_container;
|
||||||
Edge_const_iterator eit;
|
auto* arr = this->arrangement();
|
||||||
Halfedge_const_handle he_cst;
|
|
||||||
Arrangement_on_surface_2 *arr = this->arrangement();
|
|
||||||
//collect the arrangement halfedges
|
//collect the arrangement halfedges
|
||||||
for (eit = arr->edges_begin(); eit != arr->edges_end(); ++eit)
|
for (auto eit = arr->edges_begin(); eit != arr->edges_end(); ++eit) {
|
||||||
{
|
Halfedge_const_handle he_cst = eit;
|
||||||
he_cst = eit;
|
|
||||||
he_container.push_back(he_cst);
|
he_container.push_back(he_cst);
|
||||||
}
|
}
|
||||||
//container insertion
|
//container insertion
|
||||||
td.insert(he_container.begin(), he_container.end());
|
td.insert(he_container.begin(), he_container.end());
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! gets the unbounded face that contains the point when the trapezoid is
|
/*! Obtain the unbounded face that contains the point when the trapezoid is
|
||||||
* unbounded
|
* unbounded
|
||||||
* \param tr The unbounded trapezoid whose face we should get
|
* \param tr The unbounded trapezoid whose face we should get
|
||||||
* \param p The query point.
|
* \param p The query point.
|
||||||
|
|
@ -371,24 +330,23 @@ protected:
|
||||||
* \return A Face_const_handle representing the arrangement unbounded face in
|
* \return A Face_const_handle representing the arrangement unbounded face in
|
||||||
* which the point p lies
|
* which the point p lies
|
||||||
*/
|
*/
|
||||||
Face_const_handle _get_unbounded_face (const Td_map_item& tr,
|
Face_const_handle _get_unbounded_face(const Td_map_item& tr,
|
||||||
const Point_2& p,
|
const Point_2& p,
|
||||||
Arr_all_sides_oblivious_tag) const;
|
Arr_all_sides_oblivious_tag) const;
|
||||||
|
|
||||||
/*! gets the unbounded face that contains the point when the trapezoid is
|
/*! Obtain the unbounded face that contains the point when the trapezoid is
|
||||||
* unbounded
|
* unbounded
|
||||||
* \param tr The unbounded trapezoid whose face we should get
|
* \param tr The unbounded trapezoid whose face we should get
|
||||||
* \param p The query point.
|
* \param p The query point.
|
||||||
* \param Arr_not_all_sides_oblivious_tag
|
* \param Arr_not_all_sides_oblivious_tag
|
||||||
* \return A Face_const_handle representing the arrangement unbounded face in which
|
* \return A Face_const_handle representing the arrangement unbounded face in
|
||||||
* the point p lies
|
* which the point p lies
|
||||||
*/
|
*/
|
||||||
Face_const_handle _get_unbounded_face (const Td_map_item& tr,
|
Face_const_handle _get_unbounded_face(const Td_map_item& tr,
|
||||||
const Point_2& p,
|
const Point_2& p,
|
||||||
Arr_not_all_sides_oblivious_tag) const;
|
Arr_not_all_sides_oblivious_tag) const;
|
||||||
|
|
||||||
/*!
|
/*! Locate the arrangement feature which a vertical ray emanating from the
|
||||||
* Locate the arrangement feature which a vertical ray emanating from the
|
|
||||||
* given point hits, considering isolated vertices.
|
* given point hits, considering isolated vertices.
|
||||||
* \param p The query point.
|
* \param p The query point.
|
||||||
* \param shoot_up Indicates whether the ray is directed upward or downward.
|
* \param shoot_up Indicates whether the ray is directed upward or downward.
|
||||||
|
|
@ -403,11 +361,10 @@ protected:
|
||||||
* we check the isolated vertices inside the face to check whether there
|
* we check the isolated vertices inside the face to check whether there
|
||||||
* is an isolated vertex right above/below the query point.
|
* is an isolated vertex right above/below the query point.
|
||||||
*/
|
*/
|
||||||
result_type
|
result_type _check_isolated_for_vertical_ray_shoot
|
||||||
_check_isolated_for_vertical_ray_shoot
|
(Halfedge_const_handle halfedge_found,
|
||||||
(Halfedge_const_handle halfedge_found,
|
const Point_2& p, bool shoot_up,
|
||||||
const Point_2& p, bool shoot_up,
|
const Td_map_item& tr) const;
|
||||||
const Td_map_item& tr) const;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} //namespace CGAL
|
} //namespace CGAL
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@
|
||||||
* Definition of the Arr_triangulation_point_location<Arrangement> template.
|
* Definition of the Arr_triangulation_point_location<Arrangement> template.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <CGAL/Arr_observer.h>
|
|
||||||
#include <CGAL/Arrangement_2/Arr_traits_adaptor_2.h>
|
#include <CGAL/Arrangement_2/Arr_traits_adaptor_2.h>
|
||||||
#include <CGAL/Arr_point_location_result.h>
|
#include <CGAL/Arr_point_location_result.h>
|
||||||
|
|
||||||
|
|
@ -39,73 +38,70 @@ namespace CGAL {
|
||||||
* triangulation algorithm.
|
* triangulation algorithm.
|
||||||
*/
|
*/
|
||||||
template <typename Arrangement_>
|
template <typename Arrangement_>
|
||||||
class Arr_triangulation_point_location : public Arr_observer<Arrangement_>
|
class Arr_triangulation_point_location : public Arrangement_::Observer {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
typedef Arrangement_ Arrangement_2;
|
using Arrangement_2 = Arrangement_;
|
||||||
|
using Base_aos = typename Arrangement_2::Base_aos;
|
||||||
|
|
||||||
typedef typename Arrangement_2::Geometry_traits_2 Geometry_traits_2;
|
using Geometry_traits_2 = typename Base_aos::Geometry_traits_2;
|
||||||
typedef typename Geometry_traits_2::Kernel Kernel;
|
using Kernel = typename Geometry_traits_2::Kernel;
|
||||||
|
|
||||||
typedef typename Arrangement_2::Vertex_const_handle Vertex_const_handle;
|
using Vertex_const_handle = typename Base_aos::Vertex_const_handle;
|
||||||
typedef typename Arrangement_2::Halfedge_const_handle Halfedge_const_handle;
|
using Halfedge_const_handle = typename Base_aos::Halfedge_const_handle;
|
||||||
typedef typename Arrangement_2::Face_const_handle Face_const_handle;
|
using Face_const_handle = typename Base_aos::Face_const_handle;
|
||||||
typedef typename Arrangement_2::Vertex_handle Vertex_handle;
|
using Vertex_handle = typename Base_aos::Vertex_handle;
|
||||||
typedef typename Arrangement_2::Halfedge_handle Halfedge_handle;
|
using Halfedge_handle = typename Base_aos::Halfedge_handle;
|
||||||
typedef typename Arrangement_2::Face_handle Face_handle;
|
using Face_handle = typename Base_aos::Face_handle;
|
||||||
|
|
||||||
typedef typename Arrangement_2::Vertex_const_iterator Vertex_const_iterator;
|
using Vertex_const_iterator = typename Base_aos::Vertex_const_iterator;
|
||||||
typedef typename Arrangement_2::Edge_const_iterator Edge_const_iterator;
|
using Edge_const_iterator = typename Base_aos::Edge_const_iterator;
|
||||||
typedef typename Arrangement_2::Face_const_iterator Face_const_iterator;
|
using Face_const_iterator = typename Base_aos::Face_const_iterator;
|
||||||
typedef typename Arrangement_2::Halfedge_const_iterator
|
using Halfedge_const_iterator = typename Base_aos::Halfedge_const_iterator;
|
||||||
Halfedge_const_iterator;
|
using Halfedge_around_vertex_const_circulator =
|
||||||
typedef typename Arrangement_2::Halfedge_around_vertex_const_circulator
|
typename Base_aos::Halfedge_around_vertex_const_circulator;
|
||||||
Halfedge_around_vertex_const_circulator;
|
using Ccb_halfedge_const_circulator =
|
||||||
typedef typename Arrangement_2::Ccb_halfedge_const_circulator
|
typename Base_aos::Ccb_halfedge_const_circulator;
|
||||||
Ccb_halfedge_const_circulator;
|
using Ccb_halfedge_circulator = typename Base_aos::Ccb_halfedge_circulator;
|
||||||
typedef typename Arrangement_2::Ccb_halfedge_circulator
|
using Isolated_vertex_const_iterator =
|
||||||
Ccb_halfedge_circulator;
|
typename Base_aos::Isolated_vertex_const_iterator;
|
||||||
typedef typename Arrangement_2::Isolated_vertex_const_iterator
|
|
||||||
Isolated_vertex_const_iterator;
|
|
||||||
|
|
||||||
typedef typename Geometry_traits_2::Point_2 Point_2;
|
using Point_2 = typename Geometry_traits_2::Point_2;
|
||||||
typedef typename Geometry_traits_2::X_monotone_curve_2 X_monotone_curve_2;
|
using X_monotone_curve_2 = typename Geometry_traits_2::X_monotone_curve_2;
|
||||||
|
|
||||||
typedef std::list<Halfedge_const_handle> Edge_list;
|
using Edge_list = std::list<Halfedge_const_handle>;
|
||||||
typedef typename Edge_list::iterator Std_edge_iterator;
|
using Std_edge_iterator = typename Edge_list::iterator;
|
||||||
|
|
||||||
//----------------------------------------------------------
|
//----------------------------------------------------------
|
||||||
// Triangulation Types
|
// Triangulation Types
|
||||||
//----------------------------------------------------------
|
//----------------------------------------------------------
|
||||||
typedef Triangulation_vertex_base_with_info_2<Vertex_const_handle, Kernel>
|
using Vbb = Triangulation_vertex_base_with_info_2<Vertex_const_handle, Kernel>;
|
||||||
Vbb;
|
using Vb = Triangulation_hierarchy_vertex_base_2<Vbb>;
|
||||||
typedef Triangulation_hierarchy_vertex_base_2<Vbb> Vb;
|
|
||||||
//typedef Triangulation_face_base_with_info_2<CGAL::IO::Color,Kernel> Fbt;
|
//typedef Triangulation_face_base_with_info_2<CGAL::IO::Color,Kernel> Fbt;
|
||||||
typedef Constrained_triangulation_face_base_2<Kernel> Fb;
|
using Fb = Constrained_triangulation_face_base_2<Kernel>;
|
||||||
typedef Triangulation_data_structure_2<Vb,Fb> TDS;
|
using TDS = Triangulation_data_structure_2<Vb,Fb>;
|
||||||
typedef Exact_predicates_tag Itag;
|
using Itag = Exact_predicates_tag;
|
||||||
//typedef Constrained_Delaunay_triangulation_2<Kernel, TDS, Itag> CDT;
|
//typedef Constrained_Delaunay_triangulation_2<Kernel, TDS, Itag> CDT;
|
||||||
typedef Constrained_Delaunay_triangulation_2<Kernel, TDS, Itag> CDT_t;
|
using CDT_t = Constrained_Delaunay_triangulation_2<Kernel, TDS, Itag>;
|
||||||
typedef Triangulation_hierarchy_2<CDT_t> CDTH;
|
using CDTH = Triangulation_hierarchy_2<CDT_t>;
|
||||||
typedef Constrained_triangulation_plus_2<CDTH> CDT;
|
using CDT = Constrained_triangulation_plus_2<CDTH>;
|
||||||
|
|
||||||
typedef typename CDT::Point CDT_Point;
|
using CDT_Point = typename CDT::Point;
|
||||||
typedef typename CDT::Edge CDT_Edge;
|
using CDT_Edge = typename CDT::Edge;
|
||||||
typedef typename CDT::Face_handle CDT_Face_handle;
|
using CDT_Face_handle = typename CDT::Face_handle;
|
||||||
typedef typename CDT::Vertex_handle CDT_Vertex_handle;
|
using CDT_Vertex_handle = typename CDT::Vertex_handle;
|
||||||
typedef typename CDT::Finite_faces_iterator CDT_Finite_faces_iterator;
|
using CDT_Finite_faces_iterator = typename CDT::Finite_faces_iterator;
|
||||||
typedef typename CDT::Finite_vertices_iterator CDT_Finite_vertices_iterator;
|
using CDT_Finite_vertices_iterator = typename CDT::Finite_vertices_iterator;
|
||||||
typedef typename CDT::Finite_edges_iterator CDT_Finite_edges_iterator;
|
using CDT_Finite_edges_iterator = typename CDT::Finite_edges_iterator;
|
||||||
typedef typename CDT::Locate_type CDT_Locate_type;
|
using CDT_Locate_type = typename CDT::Locate_type;
|
||||||
|
|
||||||
typedef Arr_point_location_result<Arrangement_2> Result;
|
using Result = Arr_point_location_result<Base_aos>;
|
||||||
typedef typename Result::Type Result_type;
|
using Result_type = typename Result::Type;
|
||||||
|
|
||||||
// Support cpp11::result_of
|
// Support cpp11::result_of
|
||||||
typedef Result_type result_type;
|
using result_type = Result_type;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
typedef Arr_traits_basic_adaptor_2<Geometry_traits_2> Traits_adaptor_2;
|
using Traits_adaptor_2 = Arr_traits_basic_adaptor_2<Geometry_traits_2>;
|
||||||
|
|
||||||
// Data members:
|
// Data members:
|
||||||
const Traits_adaptor_2* m_traits; // Its associated traits object.
|
const Traits_adaptor_2* m_traits; // Its associated traits object.
|
||||||
|
|
@ -128,8 +124,8 @@ public:
|
||||||
/*! Constructor from an arrangement.
|
/*! Constructor from an arrangement.
|
||||||
* \param arr (in) The arrangement.
|
* \param arr (in) The arrangement.
|
||||||
*/
|
*/
|
||||||
Arr_triangulation_point_location(const Arrangement_2& arr) :
|
Arr_triangulation_point_location(const Base_aos& arr) :
|
||||||
Arr_observer<Arrangement_2>(const_cast<Arrangement_2&>(arr)),
|
Base_aos::Observer(const_cast<Base_aos&>(arr)),
|
||||||
m_traits(static_cast<const Traits_adaptor_2*>(arr.geometry_traits())),
|
m_traits(static_cast<const Traits_adaptor_2*>(arr.geometry_traits())),
|
||||||
m_ignore_notifications(false),
|
m_ignore_notifications(false),
|
||||||
m_ignore_remove_edge(false)
|
m_ignore_remove_edge(false)
|
||||||
|
|
@ -149,12 +145,12 @@ public:
|
||||||
/*! Attach an arrangement.
|
/*! Attach an arrangement.
|
||||||
* \param arr (in) The arrangement.
|
* \param arr (in) The arrangement.
|
||||||
*/
|
*/
|
||||||
virtual void before_attach(const Arrangement_2& arr)
|
virtual void before_attach(const Base_aos& arr) override
|
||||||
{ m_traits = static_cast<const Traits_adaptor_2*>(arr.geometry_traits()); }
|
{ m_traits = static_cast<const Traits_adaptor_2*>(arr.geometry_traits()); }
|
||||||
|
|
||||||
virtual void after_attach() { build_triangulation(); }
|
virtual void after_attach() override { build_triangulation(); }
|
||||||
|
|
||||||
virtual void before_detach() { clear_triangulation(); }
|
virtual void before_detach() override { clear_triangulation(); }
|
||||||
|
|
||||||
/// \name Overloaded observer functions on global changes.
|
/// \name Overloaded observer functions on global changes.
|
||||||
//@{
|
//@{
|
||||||
|
|
@ -162,32 +158,28 @@ public:
|
||||||
/*! Notification after the arrangement has been assigned with another
|
/*! Notification after the arrangement has been assigned with another
|
||||||
* arrangement.
|
* arrangement.
|
||||||
*/
|
*/
|
||||||
virtual void after_assign()
|
virtual void after_assign() override {
|
||||||
{
|
|
||||||
clear_triangulation();
|
clear_triangulation();
|
||||||
build_triangulation();
|
build_triangulation();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Notification after the arrangement is cleared.
|
/*! Notification after the arrangement is cleared.
|
||||||
*/
|
*/
|
||||||
virtual void after_clear()
|
virtual void after_clear() override {
|
||||||
{
|
|
||||||
clear_triangulation();
|
clear_triangulation();
|
||||||
build_triangulation();
|
build_triangulation();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Notification before a global operation modifies the arrangement.
|
/*! Notification before a global operation modifies the arrangement.
|
||||||
*/
|
*/
|
||||||
virtual void before_global_change()
|
virtual void before_global_change() override {
|
||||||
{
|
|
||||||
clear_triangulation();
|
clear_triangulation();
|
||||||
m_ignore_notifications = true;
|
m_ignore_notifications = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*! Notification after a global operation is completed.
|
/*! Notification after a global operation is completed.
|
||||||
*/
|
*/
|
||||||
virtual void after_global_change()
|
virtual void after_global_change() override {
|
||||||
{
|
|
||||||
build_triangulation();
|
build_triangulation();
|
||||||
m_ignore_notifications = false;
|
m_ignore_notifications = false;
|
||||||
}
|
}
|
||||||
|
|
@ -199,14 +191,13 @@ public:
|
||||||
/*! Notification before the removal of an edge.
|
/*! Notification before the removal of an edge.
|
||||||
* \param e (in) A handle to one of the twin halfedges to be removed.
|
* \param e (in) A handle to one of the twin halfedges to be removed.
|
||||||
*/
|
*/
|
||||||
virtual void before_remove_edge(Halfedge_handle /* e */)
|
virtual void before_remove_edge(Halfedge_handle /* e */) override
|
||||||
{ m_ignore_remove_edge = true; }
|
{ m_ignore_remove_edge = true; }
|
||||||
|
|
||||||
/*! Notification after the creation of a new vertex.
|
/*! Notification after the creation of a new vertex.
|
||||||
* \param v (in) A handle to the created vertex.
|
* \param v (in) A handle to the created vertex.
|
||||||
*/
|
*/
|
||||||
virtual void after_create_vertex(Vertex_handle /* v */)
|
virtual void after_create_vertex(Vertex_handle /* v */) override {
|
||||||
{
|
|
||||||
if (! m_ignore_notifications) {
|
if (! m_ignore_notifications) {
|
||||||
clear_triangulation();
|
clear_triangulation();
|
||||||
build_triangulation();
|
build_triangulation();
|
||||||
|
|
@ -216,8 +207,7 @@ public:
|
||||||
/*! Notification after the creation of a new edge.
|
/*! Notification after the creation of a new edge.
|
||||||
* \param e (in) A handle to one of the twin halfedges that were created.
|
* \param e (in) A handle to one of the twin halfedges that were created.
|
||||||
*/
|
*/
|
||||||
virtual void after_create_edge(Halfedge_handle /* e */)
|
virtual void after_create_edge(Halfedge_handle /* e */) override {
|
||||||
{
|
|
||||||
if (! m_ignore_notifications) {
|
if (! m_ignore_notifications) {
|
||||||
clear_triangulation();
|
clear_triangulation();
|
||||||
build_triangulation();
|
build_triangulation();
|
||||||
|
|
@ -229,8 +219,7 @@ public:
|
||||||
* \param e2 (in) A handle to one of the twin halfedges forming the second edge.
|
* \param e2 (in) A handle to one of the twin halfedges forming the second edge.
|
||||||
*/
|
*/
|
||||||
virtual void after_split_edge(Halfedge_handle /* e1 */,
|
virtual void after_split_edge(Halfedge_handle /* e1 */,
|
||||||
Halfedge_handle /* e2 */)
|
Halfedge_handle /* e2 */) override {
|
||||||
{
|
|
||||||
if (! m_ignore_notifications) {
|
if (! m_ignore_notifications) {
|
||||||
clear_triangulation();
|
clear_triangulation();
|
||||||
build_triangulation();
|
build_triangulation();
|
||||||
|
|
@ -244,8 +233,7 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual void after_split_face(Face_handle /* f */,
|
virtual void after_split_face(Face_handle /* f */,
|
||||||
Face_handle /* new_f */,
|
Face_handle /* new_f */,
|
||||||
bool /* is_hole */)
|
bool /* is_hole */) override {
|
||||||
{
|
|
||||||
if (! m_ignore_notifications) {
|
if (! m_ignore_notifications) {
|
||||||
clear_triangulation();
|
clear_triangulation();
|
||||||
build_triangulation();
|
build_triangulation();
|
||||||
|
|
@ -255,8 +243,7 @@ public:
|
||||||
/*! Notification after an outer CCB was created inside a face.
|
/*! Notification after an outer CCB was created inside a face.
|
||||||
* \param h (in) A circulator representing the boundary of the new outer CCB.
|
* \param h (in) A circulator representing the boundary of the new outer CCB.
|
||||||
*/
|
*/
|
||||||
virtual void after_add_outer_ccb(Ccb_halfedge_circulator /* h */)
|
virtual void after_add_outer_ccb(Ccb_halfedge_circulator /* h */) override {
|
||||||
{
|
|
||||||
if (! m_ignore_notifications) {
|
if (! m_ignore_notifications) {
|
||||||
clear_triangulation();
|
clear_triangulation();
|
||||||
build_triangulation();
|
build_triangulation();
|
||||||
|
|
@ -266,8 +253,7 @@ public:
|
||||||
/*! Notification after an edge was merged.
|
/*! Notification after an edge was merged.
|
||||||
* \param e (in) A handle to one of the twin halfedges forming the merged edge.
|
* \param e (in) A handle to one of the twin halfedges forming the merged edge.
|
||||||
*/
|
*/
|
||||||
virtual void after_merge_edge(Halfedge_handle /* e */)
|
virtual void after_merge_edge(Halfedge_handle /* e */) override {
|
||||||
{
|
|
||||||
if (! m_ignore_notifications) {
|
if (! m_ignore_notifications) {
|
||||||
clear_triangulation();
|
clear_triangulation();
|
||||||
build_triangulation();
|
build_triangulation();
|
||||||
|
|
@ -277,8 +263,7 @@ public:
|
||||||
/*! Notification after a face was merged.
|
/*! Notification after a face was merged.
|
||||||
* \param f (in) A handle to the merged face.
|
* \param f (in) A handle to the merged face.
|
||||||
*/
|
*/
|
||||||
virtual void after_merge_face(Face_handle /* f */)
|
virtual void after_merge_face(Face_handle /* f */) override {
|
||||||
{
|
|
||||||
if (! m_ignore_notifications && ! m_ignore_remove_edge) {
|
if (! m_ignore_notifications && ! m_ignore_remove_edge) {
|
||||||
clear_triangulation();
|
clear_triangulation();
|
||||||
build_triangulation();
|
build_triangulation();
|
||||||
|
|
@ -288,8 +273,7 @@ public:
|
||||||
/*! Notification after an outer CCB is moved from one face to another.
|
/*! Notification after an outer CCB is moved from one face to another.
|
||||||
* \param h (in) A circulator representing the boundary of the component.
|
* \param h (in) A circulator representing the boundary of the component.
|
||||||
*/
|
*/
|
||||||
virtual void after_move_outer_ccb(Ccb_halfedge_circulator /* h */)
|
virtual void after_move_outer_ccb(Ccb_halfedge_circulator /* h */) override {
|
||||||
{
|
|
||||||
if (! m_ignore_notifications) {
|
if (! m_ignore_notifications) {
|
||||||
clear_triangulation();
|
clear_triangulation();
|
||||||
build_triangulation();
|
build_triangulation();
|
||||||
|
|
@ -299,8 +283,7 @@ public:
|
||||||
/*! Notificaion before the removal of a vertex.
|
/*! Notificaion before the removal of a vertex.
|
||||||
* \param v (in) A handle to the vertex to be deleted.
|
* \param v (in) A handle to the vertex to be deleted.
|
||||||
*/
|
*/
|
||||||
virtual void after_remove_vertex()
|
virtual void after_remove_vertex() override {
|
||||||
{
|
|
||||||
if (! m_ignore_notifications && ! m_ignore_remove_edge) {
|
if (! m_ignore_notifications && ! m_ignore_remove_edge) {
|
||||||
clear_triangulation();
|
clear_triangulation();
|
||||||
build_triangulation();
|
build_triangulation();
|
||||||
|
|
@ -310,8 +293,7 @@ public:
|
||||||
/*! Notification before the removal of an edge.
|
/*! Notification before the removal of an edge.
|
||||||
* \param e (in) A handle to one of the twin halfedges to be deleted.
|
* \param e (in) A handle to one of the twin halfedges to be deleted.
|
||||||
*/
|
*/
|
||||||
virtual void after_remove_edge()
|
virtual void after_remove_edge() override {
|
||||||
{
|
|
||||||
if (! m_ignore_notifications) {
|
if (! m_ignore_notifications) {
|
||||||
clear_triangulation();
|
clear_triangulation();
|
||||||
build_triangulation();
|
build_triangulation();
|
||||||
|
|
@ -322,8 +304,7 @@ public:
|
||||||
/*! Notification before the removal of an outer CCB.
|
/*! Notification before the removal of an outer CCB.
|
||||||
* \param f (in) The face that used to own the outer CCB.
|
* \param f (in) The face that used to own the outer CCB.
|
||||||
*/
|
*/
|
||||||
virtual void after_remove_outer_ccb(Face_handle /* f */)
|
virtual void after_remove_outer_ccb(Face_handle /* f */) override {
|
||||||
{
|
|
||||||
if (! m_ignore_notifications && ! m_ignore_remove_edge) {
|
if (! m_ignore_notifications && ! m_ignore_remove_edge) {
|
||||||
clear_triangulation();
|
clear_triangulation();
|
||||||
build_triangulation();
|
build_triangulation();
|
||||||
|
|
@ -333,8 +314,7 @@ public:
|
||||||
/*! Notification after an inner CCB was created inside a face.
|
/*! Notification after an inner CCB was created inside a face.
|
||||||
* \param h (in) A circulator representing the boundary of the new inner CCB.
|
* \param h (in) A circulator representing the boundary of the new inner CCB.
|
||||||
*/
|
*/
|
||||||
virtual void after_add_inner_ccb(Ccb_halfedge_circulator /* h */)
|
virtual void after_add_inner_ccb(Ccb_halfedge_circulator /* h */) override {
|
||||||
{
|
|
||||||
if (! m_ignore_notifications) {
|
if (! m_ignore_notifications) {
|
||||||
clear_triangulation();
|
clear_triangulation();
|
||||||
build_triangulation();
|
build_triangulation();
|
||||||
|
|
@ -344,8 +324,7 @@ public:
|
||||||
/*! Notification after an inner CCB is moved from one face to another.
|
/*! Notification after an inner CCB is moved from one face to another.
|
||||||
* \param h (in) A circulator representing the boundary of the component.
|
* \param h (in) A circulator representing the boundary of the component.
|
||||||
*/
|
*/
|
||||||
virtual void after_move_inner_ccb(Ccb_halfedge_circulator /* h */)
|
virtual void after_move_inner_ccb(Ccb_halfedge_circulator /* h */) override {
|
||||||
{
|
|
||||||
if (! m_ignore_notifications) {
|
if (! m_ignore_notifications) {
|
||||||
clear_triangulation();
|
clear_triangulation();
|
||||||
build_triangulation();
|
build_triangulation();
|
||||||
|
|
@ -355,8 +334,7 @@ public:
|
||||||
/*! Notificaion after the removal of an inner CCB.
|
/*! Notificaion after the removal of an inner CCB.
|
||||||
* \param f (in) The face that used to contain the inner CCB.
|
* \param f (in) The face that used to contain the inner CCB.
|
||||||
*/
|
*/
|
||||||
virtual void after_remove_inner_ccb(Face_handle /* f */)
|
virtual void after_remove_inner_ccb(Face_handle /* f */) override {
|
||||||
{
|
|
||||||
if (! m_ignore_notifications && ! m_ignore_remove_edge) {
|
if (! m_ignore_notifications && ! m_ignore_remove_edge) {
|
||||||
clear_triangulation();
|
clear_triangulation();
|
||||||
build_triangulation();
|
build_triangulation();
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@
|
||||||
/*! \file
|
/*! \file
|
||||||
* Definition of the Arr_vertex_index_map<Arrangement> class.
|
* Definition of the Arr_vertex_index_map<Arrangement> class.
|
||||||
*/
|
*/
|
||||||
#include <CGAL/Arr_observer.h>
|
|
||||||
#include <CGAL/Unique_hash_map.h>
|
#include <CGAL/Unique_hash_map.h>
|
||||||
#include <CGAL/property_map.h>
|
#include <CGAL/property_map.h>
|
||||||
|
|
||||||
|
|
@ -35,136 +34,120 @@ namespace CGAL {
|
||||||
* arrangement vertices to the indices 0, ..., (n -1), where n is the number
|
* arrangement vertices to the indices 0, ..., (n -1), where n is the number
|
||||||
* of vertices in the arrangement.
|
* of vertices in the arrangement.
|
||||||
*/
|
*/
|
||||||
template <class Arrangement_>
|
template <typename Arrangement_>
|
||||||
class Arr_vertex_index_map : public Arr_observer<Arrangement_>
|
class Arr_vertex_index_map : public Arrangement_::Observer {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
|
using Arrangement_2 = Arrangement_;
|
||||||
|
using Base_aos = typename Arrangement_2::Base_aos;
|
||||||
|
|
||||||
typedef Arrangement_ Arrangement_2;
|
using Vertex_handle = typename Base_aos::Vertex_handle;
|
||||||
typedef typename Arrangement_2::Vertex_handle Vertex_handle;
|
|
||||||
|
|
||||||
// Boost property type definitions:
|
// Boost property type definitions:
|
||||||
typedef boost::readable_property_map_tag category;
|
using category = boost::readable_property_map_tag;
|
||||||
typedef unsigned int value_type;
|
using value_type = unsigned int;
|
||||||
typedef value_type reference;
|
using reference = value_type;
|
||||||
typedef Vertex_handle key_type;
|
using key_type = Vertex_handle;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
using Self = Arr_vertex_index_map<Arrangement_2>;
|
||||||
|
using Base = typename Arrangement_2::Observer;
|
||||||
|
|
||||||
typedef Arr_vertex_index_map<Arrangement_2> Self;
|
using Index_map = Unique_hash_map<Vertex_handle, unsigned int>;
|
||||||
typedef Arr_observer<Arrangement_2> Base;
|
|
||||||
|
|
||||||
typedef Unique_hash_map<Vertex_handle, unsigned int> Index_map;
|
|
||||||
|
|
||||||
// Data members:
|
// Data members:
|
||||||
unsigned int n_vertices; // The current number of vertices.
|
unsigned int n_vertices; // The current number of vertices.
|
||||||
Index_map index_map; // Mapping vertices to indices.
|
Index_map index_map; // Mapping vertices to indices.
|
||||||
std::vector<Vertex_handle> rev_map; // Mapping indices to vertices.
|
std::vector<Vertex_handle> rev_map; // Mapping indices to vertices.
|
||||||
|
|
||||||
enum {MIN_REV_MAP_SIZE = 32};
|
enum {MIN_REV_MAP_SIZE = 32};
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/*! Default constructor. */
|
/*! Default constructor. */
|
||||||
Arr_vertex_index_map () :
|
Arr_vertex_index_map() :
|
||||||
Base (),
|
Base(),
|
||||||
n_vertices (0),
|
n_vertices(0),
|
||||||
rev_map (MIN_REV_MAP_SIZE)
|
rev_map(MIN_REV_MAP_SIZE)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
/*! Constructor with an associated arrangement. */
|
/*! Constructor with an associated arrangement. */
|
||||||
Arr_vertex_index_map (const Arrangement_2& arr) :
|
Arr_vertex_index_map(const Base_aos& arr) :
|
||||||
Base (const_cast<Arrangement_2&> (arr))
|
Base(const_cast<Base_aos&>(arr))
|
||||||
{
|
{ _init(); }
|
||||||
_init();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*! Copy constructor. */
|
/*! Copy constructor. */
|
||||||
Arr_vertex_index_map (const Self& other) :
|
Arr_vertex_index_map(const Self& other) :
|
||||||
Base (const_cast<Arrangement_2&> (*(other.arrangement())))
|
Base(const_cast<Base_aos&>(*(other.arrangement())))
|
||||||
{
|
{ _init(); }
|
||||||
_init();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*! Assignment operator. */
|
/*! Assignment operator. */
|
||||||
Self& operator= (const Self& other)
|
Self& operator= (const Self& other) {
|
||||||
{
|
if (this == &other) return (*this);
|
||||||
if (this == &other)
|
|
||||||
return (*this);
|
|
||||||
|
|
||||||
this->detach();
|
this->detach();
|
||||||
this->attach (const_cast<Arrangement_2&> (*(other.arrangement())));
|
this->attach(const_cast<Base_aos&>(*(other.arrangement())));
|
||||||
|
|
||||||
return (*this);
|
return (*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! Get the index of a given vertex.
|
||||||
* Get the index of a given vertex.
|
|
||||||
* \param v A handle to the vertex.
|
* \param v A handle to the vertex.
|
||||||
* \pre v is a valid vertex in the arrangement.
|
* \pre v is a valid vertex in the arrangement.
|
||||||
*/
|
*/
|
||||||
unsigned int operator[] (Vertex_handle v) const
|
unsigned int operator[](Vertex_handle v) const { return index_map[v]; }
|
||||||
{
|
|
||||||
return index_map[v];
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*! Get the vertex given its index.
|
||||||
* Get the vertex given its index.
|
|
||||||
* \param i The index of the vertex.
|
* \param i The index of the vertex.
|
||||||
* \pre i is less than the number of vertices in the graph.
|
* \pre i is less than the number of vertices in the graph.
|
||||||
*/
|
*/
|
||||||
Vertex_handle vertex (const int i) const
|
Vertex_handle vertex(const int i) const {
|
||||||
{
|
CGAL_precondition(i < n_vertices);
|
||||||
CGAL_precondition (i < n_vertices);
|
|
||||||
|
|
||||||
return rev_map[i];
|
return rev_map[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
/// \name Notification functions, to keep the mapping up-to-date.
|
/// \name Notification functions, to keep the mapping up-to-date.
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
/*!
|
/*! Update the mapping after the arrangement has been assigned with another
|
||||||
* Update the mapping after the arrangement has been assigned with another
|
|
||||||
* arrangement.
|
* arrangement.
|
||||||
*/
|
*/
|
||||||
virtual void after_assign ()
|
virtual void after_assign() override { _init(); }
|
||||||
{
|
|
||||||
_init();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*! Update the mapping after the arrangement is cleared.
|
||||||
* Update the mapping after the arrangement is cleared.
|
|
||||||
*/
|
*/
|
||||||
virtual void after_clear ()
|
virtual void after_clear() override { _init(); }
|
||||||
{
|
|
||||||
_init();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*! Update the mapping after attaching to a new arrangement.
|
||||||
* Update the mapping after attaching to a new arrangement.
|
|
||||||
*/
|
*/
|
||||||
virtual void after_attach ()
|
virtual void after_attach() override { _init(); }
|
||||||
{
|
|
||||||
_init();
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*! Update the mapping after detaching the arrangement.
|
||||||
* Update the mapping after detaching the arrangement.
|
|
||||||
*/
|
*/
|
||||||
virtual void after_detach ()
|
virtual void after_detach() override {
|
||||||
{
|
|
||||||
n_vertices = 0;
|
n_vertices = 0;
|
||||||
index_map.clear();
|
index_map.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! Update the mapping after the creation of a new vertex.
|
||||||
* Update the mapping after the creation of a new vertex.
|
|
||||||
* \param v A handle to the created vertex.
|
* \param v A handle to the created vertex.
|
||||||
*/
|
*/
|
||||||
virtual void after_create_vertex (Vertex_handle v)
|
virtual void after_create_vertex(Vertex_handle v) override {
|
||||||
{
|
|
||||||
// Update the number of vertices.
|
// Update the number of vertices.
|
||||||
n_vertices++;
|
++n_vertices;
|
||||||
|
|
||||||
|
// If necessary, allocate memory for the reverse mapping.
|
||||||
|
if (rev_map.size() < n_vertices) rev_map.resize(2 * n_vertices);
|
||||||
|
|
||||||
|
// Update the mapping of the newly created vertex.
|
||||||
|
index_map[v] = n_vertices - 1;
|
||||||
|
rev_map[n_vertices - 1] = v;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*! Update the mapping after the creation of a new boundary vertex.
|
||||||
|
* \param v A handle to the created vertex.
|
||||||
|
*/
|
||||||
|
virtual void after_create_boundary_vertex(Vertex_handle v) override {
|
||||||
|
// Update the number of vertices.
|
||||||
|
++n_vertices;
|
||||||
|
|
||||||
// If necessary, allocate memory for the reverse mapping.
|
// If necessary, allocate memory for the reverse mapping.
|
||||||
if (rev_map.size() < n_vertices)
|
if (rev_map.size() < n_vertices)
|
||||||
|
|
@ -175,49 +158,28 @@ public:
|
||||||
rev_map[n_vertices - 1] = v;
|
rev_map[n_vertices - 1] = v;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! Update the mapping before the removal of a vertex.
|
||||||
* Update the mapping after the creation of a new boundary vertex.
|
|
||||||
* \param v A handle to the created vertex.
|
|
||||||
*/
|
|
||||||
virtual void after_create_boundary_vertex (Vertex_handle v)
|
|
||||||
{
|
|
||||||
// Update the number of vertices.
|
|
||||||
n_vertices++;
|
|
||||||
|
|
||||||
// If necessary, allocate memory for the reverse mapping.
|
|
||||||
if (rev_map.size() < n_vertices)
|
|
||||||
rev_map.resize (2 * n_vertices);
|
|
||||||
|
|
||||||
// Update the mapping of the newly created vertex.
|
|
||||||
index_map[v] = n_vertices - 1;
|
|
||||||
rev_map[n_vertices - 1] = v;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Update the mapping before the removal of a vertex.
|
|
||||||
* \param v A handle to the vertex to be removed.
|
* \param v A handle to the vertex to be removed.
|
||||||
*/
|
*/
|
||||||
virtual void before_remove_vertex (Vertex_handle v)
|
virtual void before_remove_vertex(Vertex_handle v) override {
|
||||||
{
|
|
||||||
// Update the number of vertices.
|
// Update the number of vertices.
|
||||||
n_vertices--;
|
--n_vertices;
|
||||||
|
|
||||||
// Reduce memory consumption in case the number of vertices has
|
// Reduce memory consumption in case the number of vertices has
|
||||||
// drastically decreased.
|
// drastically decreased.
|
||||||
if (2*n_vertices+1 < rev_map.size() &&
|
if (2*n_vertices+1 < rev_map.size() &&
|
||||||
rev_map.size() / 2 >= MIN_REV_MAP_SIZE)
|
rev_map.size() / 2 >= MIN_REV_MAP_SIZE)
|
||||||
{
|
{
|
||||||
rev_map.resize (rev_map.size() / 2);
|
rev_map.resize(rev_map.size() / 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the current vertex index, and assign this index to the vertex
|
// Get the current vertex index, and assign this index to the vertex
|
||||||
// currently indexed (n - 1).
|
// currently indexed (n - 1).
|
||||||
unsigned int index = index_map[v];
|
unsigned int index = index_map[v];
|
||||||
|
|
||||||
if (index == n_vertices)
|
if (index == n_vertices) return;
|
||||||
return;
|
|
||||||
|
|
||||||
Vertex_handle last_v = rev_map[n_vertices];
|
Vertex_handle last_v = rev_map[n_vertices];
|
||||||
index_map[last_v] = index;
|
index_map[last_v] = index;
|
||||||
rev_map[index] = last_v;
|
rev_map[index] = last_v;
|
||||||
|
|
||||||
|
|
@ -227,51 +189,42 @@ public:
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
/*! Initialize the map for the given arrangement. */
|
/*! Initialize the map for the given arrangement. */
|
||||||
void _init ()
|
void _init() {
|
||||||
{
|
|
||||||
// Get the number of vertices and allocate the reverse map accordingly.
|
// Get the number of vertices and allocate the reverse map accordingly.
|
||||||
n_vertices = static_cast<unsigned int>(this->arrangement()->number_of_vertices());
|
n_vertices =
|
||||||
|
static_cast<unsigned int>(this->arrangement()->number_of_vertices());
|
||||||
|
|
||||||
if (n_vertices < MIN_REV_MAP_SIZE)
|
if (n_vertices < MIN_REV_MAP_SIZE) rev_map.resize (MIN_REV_MAP_SIZE);
|
||||||
rev_map.resize (MIN_REV_MAP_SIZE);
|
else rev_map.resize (n_vertices);
|
||||||
else
|
|
||||||
rev_map.resize (n_vertices);
|
|
||||||
|
|
||||||
// Clear the current mapping.
|
// Clear the current mapping.
|
||||||
index_map.clear();
|
index_map.clear();
|
||||||
|
|
||||||
// Create the initial mapping.
|
// Create the initial mapping.
|
||||||
typename Arrangement_2::Vertex_iterator vit;
|
Vertex_handle vh;
|
||||||
Vertex_handle vh;
|
unsigned int index = 0;
|
||||||
unsigned int index = 0;
|
|
||||||
|
|
||||||
for (vit = this->arrangement()->vertices_begin();
|
for (auto vit = this->arrangement()->vertices_begin();
|
||||||
vit != this->arrangement()->vertices_end(); ++vit, ++index)
|
vit != this->arrangement()->vertices_end(); ++vit, ++index) {
|
||||||
{
|
|
||||||
// Map the current vertex to the current index.
|
// Map the current vertex to the current index.
|
||||||
vh = vit;
|
vh = vit;
|
||||||
index_map[vh] = index;
|
index_map[vh] = index;
|
||||||
rev_map[index] = vh;
|
rev_map[index] = vh;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/*!
|
/*! Get the index property-map function. Provided so that boost is able to
|
||||||
* Get the index property-map function. Provided so that boost is able to
|
|
||||||
* access the Arr_vertex_index_map above.
|
* access the Arr_vertex_index_map above.
|
||||||
* \param index_map The index map.
|
* \param index_map The index map.
|
||||||
* \param v A vertex handle.
|
* \param v A vertex handle.
|
||||||
* \return The vertex index.
|
* \return The vertex index.
|
||||||
*/
|
*/
|
||||||
template<class Arrangement>
|
template <typename Arrangement>
|
||||||
unsigned int get (const CGAL::Arr_vertex_index_map<Arrangement>& index_map,
|
unsigned int get(const CGAL::Arr_vertex_index_map<Arrangement>& index_map,
|
||||||
typename Arrangement::Vertex_handle v)
|
typename Arrangement::Vertex_handle v)
|
||||||
{
|
{ return index_map[v]; }
|
||||||
return index_map[v];
|
|
||||||
}
|
|
||||||
|
|
||||||
} //namespace CGAL
|
} //namespace CGAL
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -115,12 +115,9 @@ public:
|
||||||
typedef typename Base::Inner_ccb_const_iterator Hole_const_iterator;
|
typedef typename Base::Inner_ccb_const_iterator Hole_const_iterator;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
friend class Arr_observer<Self>;
|
|
||||||
friend class Arr_accessor<Self>;
|
friend class Arr_accessor<Self>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
/// \name Constructors.
|
/// \name Constructors.
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
|
|
@ -215,34 +212,6 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
protected:
|
|
||||||
|
|
||||||
/// \name Managing and notifying the arrangement observers.
|
|
||||||
//@{
|
|
||||||
typedef Arr_observer<Self> Observer;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Register a new observer (so it starts receiving notifications).
|
|
||||||
* \param p_obs A pointer to the observer object.
|
|
||||||
*/
|
|
||||||
void _register_observer (Observer *p_obs)
|
|
||||||
{
|
|
||||||
Base::_register_observer ((typename Base::Observer*)p_obs);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Unregister a new observer (so it stops receiving notifications).
|
|
||||||
* \param p_obs A pointer to the observer object.
|
|
||||||
* \return Whether the observer was successfully unregistered.
|
|
||||||
*/
|
|
||||||
bool _unregister_observer (Observer *p_obs)
|
|
||||||
{
|
|
||||||
return (Base::_unregister_observer ((typename Base::Observer*)p_obs));
|
|
||||||
}
|
|
||||||
//@}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} //namespace CGAL
|
} //namespace CGAL
|
||||||
|
|
|
||||||
|
|
@ -273,29 +273,6 @@ bool Arrangement_on_surface_with_history_2<GeomTr,TopTr>::are_mergeable
|
||||||
e2->curve()));
|
e2->curve()));
|
||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
// Register a new observer (so it starts receiving notifications).
|
|
||||||
//
|
|
||||||
template<class GeomTr, class TopTr>
|
|
||||||
void Arrangement_on_surface_with_history_2<GeomTr,TopTr>::
|
|
||||||
_register_observer(Arr_observer<Self> *p_obs)
|
|
||||||
{
|
|
||||||
Base_arr_2::_register_observer
|
|
||||||
(reinterpret_cast<Arr_observer<Base_arr_2>*>(p_obs));
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
|
||||||
// Unregister an observer (so it stops receiving notifications).
|
|
||||||
//
|
|
||||||
template<class GeomTr, class TopTr>
|
|
||||||
bool Arrangement_on_surface_with_history_2<GeomTr,TopTr>::
|
|
||||||
_unregister_observer(Arr_observer<Self> *p_obs)
|
|
||||||
{
|
|
||||||
return (Base_arr_2::_unregister_observer
|
|
||||||
(reinterpret_cast<Arr_observer<Base_arr_2>*>(p_obs)));
|
|
||||||
}
|
|
||||||
|
|
||||||
} //namespace CGAL
|
} //namespace CGAL
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@
|
||||||
#include <CGAL/Arrangement_2/Arrangement_2_iterators.h>
|
#include <CGAL/Arrangement_2/Arrangement_2_iterators.h>
|
||||||
#include <CGAL/In_place_list.h>
|
#include <CGAL/In_place_list.h>
|
||||||
#include <CGAL/Arr_default_dcel.h>
|
#include <CGAL/Arr_default_dcel.h>
|
||||||
#include <CGAL/Arr_observer.h>
|
#include <CGAL/Aos_observer.h>
|
||||||
#include <CGAL/Arr_accessor.h>
|
#include <CGAL/Arr_accessor.h>
|
||||||
#include <CGAL/Arrangement_2/Arr_traits_adaptor_2.h>
|
#include <CGAL/Arrangement_2/Arr_traits_adaptor_2.h>
|
||||||
#include <CGAL/function_objects.h>
|
#include <CGAL/function_objects.h>
|
||||||
|
|
@ -109,8 +109,11 @@ public:
|
||||||
typedef typename Topology_traits::Dcel Dcel;
|
typedef typename Topology_traits::Dcel Dcel;
|
||||||
typedef typename Dcel::Size Size;
|
typedef typename Dcel::Size Size;
|
||||||
|
|
||||||
|
using Observer = Aos_observer<Self>;
|
||||||
|
using Base_aos = Self;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
friend class Arr_observer<Self>;
|
friend class Aos_observer<Self>;
|
||||||
friend class Arr_accessor<Self>;
|
friend class Arr_accessor<Self>;
|
||||||
|
|
||||||
// Internal DCEL types:
|
// Internal DCEL types:
|
||||||
|
|
@ -892,7 +895,6 @@ protected:
|
||||||
typedef CGAL_ALLOCATOR(Point_2) Points_alloc;
|
typedef CGAL_ALLOCATOR(Point_2) Points_alloc;
|
||||||
typedef CGAL_ALLOCATOR(X_monotone_curve_2) Curves_alloc;
|
typedef CGAL_ALLOCATOR(X_monotone_curve_2) Curves_alloc;
|
||||||
|
|
||||||
typedef Arr_observer<Self> Observer;
|
|
||||||
typedef std::list<Observer*> Observers_container;
|
typedef std::list<Observer*> Observers_container;
|
||||||
typedef typename Observers_container::iterator Observers_iterator;
|
typedef typename Observers_container::iterator Observers_iterator;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,6 @@
|
||||||
#include <CGAL/Arrangement_on_surface_2.h>
|
#include <CGAL/Arrangement_on_surface_2.h>
|
||||||
#include <CGAL/Arr_overlay_2.h>
|
#include <CGAL/Arr_overlay_2.h>
|
||||||
#include <CGAL/Arr_consolidated_curve_data_traits_2.h>
|
#include <CGAL/Arr_consolidated_curve_data_traits_2.h>
|
||||||
#include <CGAL/Arr_observer.h>
|
|
||||||
#include <CGAL/In_place_list.h>
|
#include <CGAL/In_place_list.h>
|
||||||
#include <CGAL/Arrangement_2/Arr_with_history_accessor.h>
|
#include <CGAL/Arrangement_2/Arr_with_history_accessor.h>
|
||||||
|
|
||||||
|
|
@ -75,10 +74,7 @@ public:
|
||||||
typedef typename Geometry_traits_2::Curve_2 Curve_2;
|
typedef typename Geometry_traits_2::Curve_2 Curve_2;
|
||||||
typedef typename Geometry_traits_2::X_monotone_curve_2 X_monotone_curve_2;
|
typedef typename Geometry_traits_2::X_monotone_curve_2 X_monotone_curve_2;
|
||||||
|
|
||||||
typedef Arr_observer<Self> Observer;
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
friend class Arr_observer<Self>;
|
|
||||||
friend class Arr_accessor<Self>;
|
friend class Arr_accessor<Self>;
|
||||||
friend class Arr_with_history_accessor<Self>;
|
friend class Arr_with_history_accessor<Self>;
|
||||||
|
|
||||||
|
|
@ -276,111 +272,87 @@ protected:
|
||||||
* involving edges and updates the list of halfedges associated with the
|
* involving edges and updates the list of halfedges associated with the
|
||||||
* input curves accordingly.
|
* input curves accordingly.
|
||||||
*/
|
*/
|
||||||
class Curve_halfedges_observer : public Arr_observer<Base_arr_2> {
|
class Curve_halfedges_observer : public Base_arr_2::Observer {
|
||||||
public:
|
public:
|
||||||
|
using Base_aos = typename Base_arr_2::Base_aos;
|
||||||
|
|
||||||
typedef typename Base_arr_2::Halfedge_handle Halfedge_handle;
|
using Vertex_handle = typename Base_aos::Vertex_handle;
|
||||||
typedef typename Base_arr_2::Vertex_handle Vertex_handle;
|
using Halfedge_handle = typename Base_aos::Halfedge_handle;
|
||||||
typedef typename Base_arr_2::X_monotone_curve_2 X_monotone_curve_2;
|
using X_monotone_curve_2 = typename Base_aos::X_monotone_curve_2;
|
||||||
|
|
||||||
/*!
|
/*! Notification after the creation of a new edge.
|
||||||
* Notification after the creation of a new edge.
|
|
||||||
* \param e A handle to one of the twin halfedges that were created.
|
* \param e A handle to one of the twin halfedges that were created.
|
||||||
*/
|
*/
|
||||||
virtual void after_create_edge (Halfedge_handle e)
|
virtual void after_create_edge(Halfedge_handle e) override
|
||||||
{
|
{ _register_edge(e); }
|
||||||
_register_edge(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* Notification before the modification of an existing edge.
|
* Notification before the modification of an existing edge.
|
||||||
* \param e A handle to one of the twin halfedges to be updated.
|
* \param e A handle to one of the twin halfedges to be updated.
|
||||||
* \param c The x-monotone curve to be associated with the edge.
|
* \param c The x-monotone curve to be associated with the edge.
|
||||||
*/
|
*/
|
||||||
virtual void before_modify_edge (Halfedge_handle e,
|
virtual void before_modify_edge(Halfedge_handle e,
|
||||||
const X_monotone_curve_2& /* c */)
|
const X_monotone_curve_2& /* c */) override
|
||||||
{
|
{ _unregister_edge(e); }
|
||||||
_unregister_edge(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*! Notification after an edge was modified.
|
||||||
* Notification after an edge was modified.
|
|
||||||
* \param e A handle to one of the twin halfedges that were updated.
|
* \param e A handle to one of the twin halfedges that were updated.
|
||||||
*/
|
*/
|
||||||
virtual void after_modify_edge (Halfedge_handle e)
|
virtual void after_modify_edge(Halfedge_handle e) override
|
||||||
{
|
{ _register_edge(e); }
|
||||||
_register_edge(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*! Notification before the splitting of an edge into two.
|
||||||
* Notification before the splitting of an edge into two.
|
|
||||||
* \param e A handle to one of the existing halfedges.
|
* \param e A handle to one of the existing halfedges.
|
||||||
* \param c1 The x-monotone curve to be associated with the first edge.
|
* \param c1 The x-monotone curve to be associated with the first edge.
|
||||||
* \param c2 The x-monotone curve to be associated with the second edge.
|
* \param c2 The x-monotone curve to be associated with the second edge.
|
||||||
*/
|
*/
|
||||||
virtual void before_split_edge (Halfedge_handle e,
|
virtual void before_split_edge(Halfedge_handle e,
|
||||||
Vertex_handle /* v */,
|
Vertex_handle /* v */,
|
||||||
const X_monotone_curve_2& /* c1 */,
|
const X_monotone_curve_2& /* c1 */,
|
||||||
const X_monotone_curve_2& /* c2 */)
|
const X_monotone_curve_2& /* c2 */) override
|
||||||
{
|
{ _unregister_edge(e); }
|
||||||
_unregister_edge(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*! Notification after an edge was split.
|
||||||
* Notification after an edge was split.
|
|
||||||
* \param e1 A handle to one of the twin halfedges forming the first edge.
|
* \param e1 A handle to one of the twin halfedges forming the first edge.
|
||||||
* \param e2 A handle to one of the twin halfedges forming the second edge.
|
* \param e2 A handle to one of the twin halfedges forming the second edge.
|
||||||
*/
|
*/
|
||||||
virtual void after_split_edge (Halfedge_handle e1, Halfedge_handle e2)
|
virtual void after_split_edge(Halfedge_handle e1, Halfedge_handle e2)
|
||||||
{
|
override {
|
||||||
_register_edge(e1);
|
_register_edge(e1);
|
||||||
_register_edge(e2);
|
_register_edge(e2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! Notification before the merging of two edges.
|
||||||
* Notification before the merging of two edges.
|
|
||||||
* \param e1 A handle to one of the halfedges forming the first edge.
|
* \param e1 A handle to one of the halfedges forming the first edge.
|
||||||
* \param e2 A handle to one of the halfedges forming the second edge.
|
* \param e2 A handle to one of the halfedges forming the second edge.
|
||||||
* \param c The x-monotone curve to be associated with the merged edge.
|
* \param c The x-monotone curve to be associated with the merged edge.
|
||||||
*/
|
*/
|
||||||
virtual void before_merge_edge (Halfedge_handle e1, Halfedge_handle e2,
|
virtual void before_merge_edge(Halfedge_handle e1, Halfedge_handle e2,
|
||||||
const X_monotone_curve_2& /* c */)
|
const X_monotone_curve_2& /* c */) override {
|
||||||
{
|
|
||||||
_unregister_edge(e1);
|
_unregister_edge(e1);
|
||||||
_unregister_edge(e2);
|
_unregister_edge(e2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! Notification after an edge was merged.
|
||||||
* Notification after an edge was merged.
|
|
||||||
* \param e A handle to one of the twin halfedges forming the merged edge.
|
* \param e A handle to one of the twin halfedges forming the merged edge.
|
||||||
*/
|
*/
|
||||||
virtual void after_merge_edge (Halfedge_handle e)
|
virtual void after_merge_edge(Halfedge_handle e) override
|
||||||
{
|
{ _register_edge(e); }
|
||||||
_register_edge(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
/*! Notification before the removal of an edge.
|
||||||
* Notification before the removal of an edge.
|
|
||||||
* \param e A handle to one of the twin halfedges to be deleted.
|
* \param e A handle to one of the twin halfedges to be deleted.
|
||||||
*/
|
*/
|
||||||
virtual void before_remove_edge (Halfedge_handle e)
|
virtual void before_remove_edge(Halfedge_handle e) override
|
||||||
{
|
{ _unregister_edge(e); }
|
||||||
_unregister_edge(e);
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
/*!
|
/*! Register the given halfedge in the set(s) associated with its curve.
|
||||||
* Register the given halfedge in the set(s) associated with its curve.
|
|
||||||
*/
|
*/
|
||||||
void _register_edge (Halfedge_handle e)
|
void _register_edge(Halfedge_handle e) {
|
||||||
{
|
for (auto di = e->curve().data().begin(); di != e->curve().data().end();
|
||||||
Curve_halfedges *curve_halfedges;
|
++di) {
|
||||||
Data_iterator di;
|
Curve_halfedges* curve_halfedges = static_cast<Curve_halfedges*>(*di);
|
||||||
|
|
||||||
for (di = e->curve().data().begin(); di != e->curve().data().end(); ++di)
|
|
||||||
{
|
|
||||||
curve_halfedges = static_cast<Curve_halfedges*>(*di);
|
|
||||||
curve_halfedges->_insert(e);
|
curve_halfedges->_insert(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -388,14 +360,10 @@ protected:
|
||||||
/*!
|
/*!
|
||||||
* Unregister the given halfedge from the set(s) associated with its curve.
|
* Unregister the given halfedge from the set(s) associated with its curve.
|
||||||
*/
|
*/
|
||||||
void _unregister_edge (Halfedge_handle e)
|
void _unregister_edge(Halfedge_handle e) {
|
||||||
{
|
for (auto di = e->curve().data().begin(); di != e->curve().data().end();
|
||||||
Curve_halfedges *curve_halfedges;
|
++di) {
|
||||||
Data_iterator di;
|
Curve_halfedges* curve_halfedges = static_cast<Curve_halfedges*>(*di);
|
||||||
|
|
||||||
for (di = e->curve().data().begin(); di != e->curve().data().end(); ++di)
|
|
||||||
{
|
|
||||||
curve_halfedges = static_cast<Curve_halfedges*>(*di);
|
|
||||||
curve_halfedges->_erase(e);
|
curve_halfedges->_erase(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -582,24 +550,6 @@ public:
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
/// \name Managing and notifying the arrangement observers.
|
|
||||||
//@{
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Register a new observer (so it starts receiving notifications).
|
|
||||||
* \param p_obs A pointer to the observer object.
|
|
||||||
*/
|
|
||||||
void _register_observer (Observer *p_obs);
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Unregister an observer (so it stops receiving notifications).
|
|
||||||
* \param p_obs A pointer to the observer object.
|
|
||||||
* \return Whether the observer was successfully unregistered.
|
|
||||||
*/
|
|
||||||
bool _unregister_observer (Observer *p_obs);
|
|
||||||
//@}
|
|
||||||
|
|
||||||
/// \name Curve insertion and deletion.
|
/// \name Curve insertion and deletion.
|
||||||
//@{
|
//@{
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,6 @@ public:
|
||||||
private:
|
private:
|
||||||
typedef Arrangement_with_history_2<Geometry_traits_2, Dcel> Self;
|
typedef Arrangement_with_history_2<Geometry_traits_2, Dcel> Self;
|
||||||
|
|
||||||
friend class Arr_observer<Self>;
|
|
||||||
friend class Arr_accessor<Self>;
|
friend class Arr_accessor<Self>;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
@ -233,35 +232,8 @@ public:
|
||||||
|
|
||||||
return (Face_const_handle (p_oc->face()));
|
return (Face_const_handle (p_oc->face()));
|
||||||
}
|
}
|
||||||
|
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
protected:
|
|
||||||
|
|
||||||
/// \name Managing and notifying the arrangement observers.
|
|
||||||
//@{
|
|
||||||
typedef Arr_observer<Self> Observer;
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Register a new observer (so it starts receiving notifications).
|
|
||||||
* \param p_obs A pointer to the observer object.
|
|
||||||
*/
|
|
||||||
void _register_observer (Observer *p_obs)
|
|
||||||
{
|
|
||||||
Base::_register_observer ((typename Base::Observer*)p_obs);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* Unregister a new observer (so it stops receiving notifications).
|
|
||||||
* \param p_obs A pointer to the observer object.
|
|
||||||
* \return Whether the observer was successfully unregistered.
|
|
||||||
*/
|
|
||||||
bool _unregister_observer (Observer *p_obs)
|
|
||||||
{
|
|
||||||
return (Base::_unregister_observer ((typename Base::Observer*)p_obs));
|
|
||||||
}
|
|
||||||
//@}
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} //namespace CGAL
|
} //namespace CGAL
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
//
|
//
|
||||||
// $URL$
|
// $URL$
|
||||||
// $Id$
|
// $Id$
|
||||||
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
//
|
//
|
||||||
// Author(s) : Eric Berberich <eric@mpi-inf.mpg.de>
|
// Author(s) : Eric Berberich <eric@mpi-inf.mpg.de>
|
||||||
// Pavel Emeliyanenko <asm@mpi-sb.mpg.de>
|
// Pavel Emeliyanenko <asm@mpi-sb.mpg.de>
|
||||||
|
|
@ -13,6 +13,9 @@
|
||||||
#ifndef CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_ARC_2_H
|
#ifndef CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_ARC_2_H
|
||||||
#define CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_ARC_2_H
|
#define CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_ARC_2_H
|
||||||
|
|
||||||
|
#include <CGAL/license/Arrangement_on_surface_2.h>
|
||||||
|
|
||||||
|
|
||||||
/*!\file include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h
|
/*!\file include/CGAL/Curved_kernel_via_analysis_2/Arc_2.h
|
||||||
*\brief defines class \c Arc_2 that represents an arc on a curve that
|
*\brief defines class \c Arc_2 that represents an arc on a curve that
|
||||||
* can be analyzed.
|
* can be analyzed.
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
//
|
//
|
||||||
// $URL$
|
// $URL$
|
||||||
// $Id$
|
// $Id$
|
||||||
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Author(s) : Pavel Emeliyanenko <asm@mpi-sb.mpg.de>
|
// Author(s) : Pavel Emeliyanenko <asm@mpi-sb.mpg.de>
|
||||||
|
|
@ -13,6 +13,9 @@
|
||||||
#ifndef CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_CURVE_INTERVAL_ARCNO_CACHE_H
|
#ifndef CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_CURVE_INTERVAL_ARCNO_CACHE_H
|
||||||
#define CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_CURVE_INTERVAL_ARCNO_CACHE_H
|
#define CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_CURVE_INTERVAL_ARCNO_CACHE_H
|
||||||
|
|
||||||
|
#include <CGAL/license/Arrangement_on_surface_2.h>
|
||||||
|
|
||||||
|
|
||||||
/*!\file include/CGAL/Curved_kernel_via_analysis_2/Curve_interval_arcno_cache.h
|
/*!\file include/CGAL/Curved_kernel_via_analysis_2/Curve_interval_arcno_cache.h
|
||||||
* \brief defines \c Curve_interval_arcno_cache functor
|
* \brief defines \c Curve_interval_arcno_cache functor
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
//
|
//
|
||||||
// $URL$
|
// $URL$
|
||||||
// $Id$
|
// $Id$
|
||||||
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
//
|
//
|
||||||
// Author(s) : Pavel Emeliyanenko <asm@mpi-sb.mpg.de>
|
// Author(s) : Pavel Emeliyanenko <asm@mpi-sb.mpg.de>
|
||||||
//
|
//
|
||||||
|
|
@ -21,6 +21,9 @@
|
||||||
#ifndef CGAL_CKVA_CURVE_RENDERER_FACADE_H
|
#ifndef CGAL_CKVA_CURVE_RENDERER_FACADE_H
|
||||||
#define CGAL_CKVA_CURVE_RENDERER_FACADE_H
|
#define CGAL_CKVA_CURVE_RENDERER_FACADE_H
|
||||||
|
|
||||||
|
#include <CGAL/license/Arrangement_on_surface_2.h>
|
||||||
|
|
||||||
|
|
||||||
// do not compile curve renderer code (for fast debugging)
|
// do not compile curve renderer code (for fast debugging)
|
||||||
//#define CGAL_CKVA_DUMMY_RENDERER
|
//#define CGAL_CKVA_DUMMY_RENDERER
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
//
|
//
|
||||||
// $URL$
|
// $URL$
|
||||||
// $Id$
|
// $Id$
|
||||||
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Author(s) : Eric Berberich <eric@mpi-inf.mpg.de>
|
// Author(s) : Eric Berberich <eric@mpi-inf.mpg.de>
|
||||||
|
|
@ -14,6 +14,9 @@
|
||||||
#ifndef CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_FUNCTORS_H
|
#ifndef CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_FUNCTORS_H
|
||||||
#define CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_FUNCTORS_H
|
#define CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_FUNCTORS_H
|
||||||
|
|
||||||
|
#include <CGAL/license/Arrangement_on_surface_2.h>
|
||||||
|
|
||||||
|
|
||||||
/*!\file include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_functors.h
|
/*!\file include/CGAL/Curved_kernel_via_analysis_2/Curved_kernel_via_analysis_2_functors.h
|
||||||
* \brief defines Curved_kernel_via_analysis_2 function objects + class
|
* \brief defines Curved_kernel_via_analysis_2 function objects + class
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
//
|
//
|
||||||
// $URL$
|
// $URL$
|
||||||
// $Id$
|
// $Id$
|
||||||
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Author(s) : Eric Berberich <eric@mpi-inf.mpg.de>
|
// Author(s) : Eric Berberich <eric@mpi-inf.mpg.de>
|
||||||
|
|
@ -14,6 +14,9 @@
|
||||||
#ifndef CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_IMPL_H
|
#ifndef CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_IMPL_H
|
||||||
#define CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_IMPL_H
|
#define CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_IMPL_H
|
||||||
|
|
||||||
|
#include <CGAL/license/Arrangement_on_surface_2.h>
|
||||||
|
|
||||||
|
|
||||||
/*!\file include/CGAL/Curved_kernel_via_analysis_2.h
|
/*!\file include/CGAL/Curved_kernel_via_analysis_2.h
|
||||||
* \brief defines class \c Curved_kernel_via_analysis_2
|
* \brief defines class \c Curved_kernel_via_analysis_2
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
//
|
//
|
||||||
// $URL$
|
// $URL$
|
||||||
// $Id$
|
// $Id$
|
||||||
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Author(s) : Eric Berberich <eric@mpi-inf.mpg.de>
|
// Author(s) : Eric Berberich <eric@mpi-inf.mpg.de>
|
||||||
|
|
@ -15,6 +15,9 @@
|
||||||
#ifndef CGAL_FILTERED_CURVED_KERNEL_VIA_ANALYSIS_2_IMPL_H
|
#ifndef CGAL_FILTERED_CURVED_KERNEL_VIA_ANALYSIS_2_IMPL_H
|
||||||
#define CGAL_FILTERED_CURVED_KERNEL_VIA_ANALYSIS_2_IMPL_H
|
#define CGAL_FILTERED_CURVED_KERNEL_VIA_ANALYSIS_2_IMPL_H
|
||||||
|
|
||||||
|
#include <CGAL/license/Arrangement_on_surface_2.h>
|
||||||
|
|
||||||
|
|
||||||
/*!\file include/CGAL/Filtered_curved_kernel_via_analysis_2.h
|
/*!\file include/CGAL/Filtered_curved_kernel_via_analysis_2.h
|
||||||
* \brief defines class \c Filtered_curved_kernel_via_analysis_2
|
* \brief defines class \c Filtered_curved_kernel_via_analysis_2
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
//
|
//
|
||||||
// $URL$
|
// $URL$
|
||||||
// $Id$
|
// $Id$
|
||||||
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Author(s) : Pavel Emeliyanenko <asm@mpi-sb.mpg.de>
|
// Author(s) : Pavel Emeliyanenko <asm@mpi-sb.mpg.de>
|
||||||
|
|
@ -14,6 +14,9 @@
|
||||||
#ifndef CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_GENERIC_ARC_2_H
|
#ifndef CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_GENERIC_ARC_2_H
|
||||||
#define CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_GENERIC_ARC_2_H
|
#define CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_GENERIC_ARC_2_H
|
||||||
|
|
||||||
|
#include <CGAL/license/Arrangement_on_surface_2.h>
|
||||||
|
|
||||||
|
|
||||||
/*!\file include/CGAL/Curved_kernel_via_analysis_2/Generic_arc_2.h
|
/*!\file include/CGAL/Curved_kernel_via_analysis_2/Generic_arc_2.h
|
||||||
* \brief defines class \c Generic_arc_2
|
* \brief defines class \c Generic_arc_2
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
//
|
//
|
||||||
// $URL$
|
// $URL$
|
||||||
// $Id$
|
// $Id$
|
||||||
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Author(s) : Pavel Emeliyanenko <asm@mpi-sb.mpg.de>
|
// Author(s) : Pavel Emeliyanenko <asm@mpi-sb.mpg.de>
|
||||||
|
|
@ -13,6 +13,9 @@
|
||||||
#ifndef CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_GENERIC_POINT_2_H
|
#ifndef CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_GENERIC_POINT_2_H
|
||||||
#define CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_GENERIC_POINT_2_H
|
#define CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_GENERIC_POINT_2_H
|
||||||
|
|
||||||
|
#include <CGAL/license/Arrangement_on_surface_2.h>
|
||||||
|
|
||||||
|
|
||||||
/*!\file include/CGAL/Curved_kernel_via_analysis_2/Generic_point_2.h
|
/*!\file include/CGAL/Curved_kernel_via_analysis_2/Generic_point_2.h
|
||||||
* \brief defines class \c Generic_point_2
|
* \brief defines class \c Generic_point_2
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
//
|
//
|
||||||
// $URL$
|
// $URL$
|
||||||
// $Id$
|
// $Id$
|
||||||
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Author(s) : Eric Berberich <eric@mpi-inf.mpg.de>
|
// Author(s) : Eric Berberich <eric@mpi-inf.mpg.de>
|
||||||
|
|
@ -17,6 +17,9 @@
|
||||||
#ifndef CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_MAKE_X_MONOTONE_2_H
|
#ifndef CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_MAKE_X_MONOTONE_2_H
|
||||||
#define CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_MAKE_X_MONOTONE_2_H
|
#define CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_MAKE_X_MONOTONE_2_H
|
||||||
|
|
||||||
|
#include <CGAL/license/Arrangement_on_surface_2.h>
|
||||||
|
|
||||||
|
|
||||||
/*!\file include/CGAL/Curved_kernel_via_analysis_2/Make_x_monotone_2.h
|
/*!\file include/CGAL/Curved_kernel_via_analysis_2/Make_x_monotone_2.h
|
||||||
* \brief defines \c Make_x_monotone_2 functor
|
* \brief defines \c Make_x_monotone_2 functor
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
//
|
//
|
||||||
// $URL$
|
// $URL$
|
||||||
// $Id$
|
// $Id$
|
||||||
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Author(s) : Pavel Emeliyanenko <asm@mpi-sb.mpg.de>
|
// Author(s) : Pavel Emeliyanenko <asm@mpi-sb.mpg.de>
|
||||||
|
|
@ -13,6 +13,9 @@
|
||||||
#ifndef CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_NON_X_MONOTONE_ARC_2_H
|
#ifndef CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_NON_X_MONOTONE_ARC_2_H
|
||||||
#define CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_NON_X_MONOTONE_ARC_2_H
|
#define CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_NON_X_MONOTONE_ARC_2_H
|
||||||
|
|
||||||
|
#include <CGAL/license/Arrangement_on_surface_2.h>
|
||||||
|
|
||||||
|
|
||||||
/*!\file include/CGAL/Curved_kernel_via_analysis_2/Non_x_monotone_arc_2.h
|
/*!\file include/CGAL/Curved_kernel_via_analysis_2/Non_x_monotone_arc_2.h
|
||||||
* \brief defines class \c Non_x_monotone_arc_2
|
* \brief defines class \c Non_x_monotone_arc_2
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
//
|
//
|
||||||
// $URL$
|
// $URL$
|
||||||
// $Id$
|
// $Id$
|
||||||
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Author(s) : Eric Berberich <eric@mpi-inf.mpg.de>
|
// Author(s) : Eric Berberich <eric@mpi-inf.mpg.de>
|
||||||
|
|
@ -14,6 +14,9 @@
|
||||||
#ifndef CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_POINT_2_H
|
#ifndef CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_POINT_2_H
|
||||||
#define CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_POINT_2_H
|
#define CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_POINT_2_H
|
||||||
|
|
||||||
|
#include <CGAL/license/Arrangement_on_surface_2.h>
|
||||||
|
|
||||||
|
|
||||||
/*!\file include/CGAL/Curved_kernel_via_analysis_2/Point_2.h
|
/*!\file include/CGAL/Curved_kernel_via_analysis_2/Point_2.h
|
||||||
* \brief defines class \c Point_2 that represents a point on a curve that can
|
* \brief defines class \c Point_2 that represents a point on a curve that can
|
||||||
* be analyzed.
|
* be analyzed.
|
||||||
|
|
|
||||||
|
|
@ -5,13 +5,16 @@
|
||||||
//
|
//
|
||||||
// $URL$
|
// $URL$
|
||||||
// $Id$
|
// $Id$
|
||||||
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Author(s) : Pavel Emeliyanenko <asm@mpi-sb.mpg.de>
|
// Author(s) : Pavel Emeliyanenko <asm@mpi-sb.mpg.de>
|
||||||
|
|
||||||
#ifndef CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_SWEEP_CURVES_ADAPTER_2_H
|
#ifndef CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_SWEEP_CURVES_ADAPTER_2_H
|
||||||
#define CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_SWEEP_CURVES_ADAPTER_2_H 1
|
#define CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_SWEEP_CURVES_ADAPTER_2_H
|
||||||
|
|
||||||
|
#include <CGAL/license/Arrangement_on_surface_2.h>
|
||||||
|
|
||||||
|
|
||||||
/*!\file include/CGAL/Curved_kernel_via_analysis_2/Sweep_curves_adapter_2.h
|
/*!\file include/CGAL/Curved_kernel_via_analysis_2/Sweep_curves_adapter_2.h
|
||||||
* \brief defines class \c Sweep_curves_adapter_2
|
* \brief defines class \c Sweep_curves_adapter_2
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
//
|
//
|
||||||
// $URL$
|
// $URL$
|
||||||
// $Id$
|
// $Id$
|
||||||
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
//
|
//
|
||||||
// Author(s) : Pavel Emeliyanenko <asm@mpi-sb.mpg.de>
|
// Author(s) : Pavel Emeliyanenko <asm@mpi-sb.mpg.de>
|
||||||
//
|
//
|
||||||
|
|
@ -19,6 +19,9 @@
|
||||||
#ifndef CGAL_CKVA_CURVE_RENDERER_2_H
|
#ifndef CGAL_CKVA_CURVE_RENDERER_2_H
|
||||||
#define CGAL_CKVA_CURVE_RENDERER_2_H
|
#define CGAL_CKVA_CURVE_RENDERER_2_H
|
||||||
|
|
||||||
|
#include <CGAL/license/Arrangement_on_surface_2.h>
|
||||||
|
|
||||||
|
|
||||||
#ifndef CGAL_AK_ENABLE_DEPRECATED_INTERFACE
|
#ifndef CGAL_AK_ENABLE_DEPRECATED_INTERFACE
|
||||||
#define CGAL_AK_ENABLE_DEPRECATED_INTERFACE 1
|
#define CGAL_AK_ENABLE_DEPRECATED_INTERFACE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
//
|
//
|
||||||
// $URL$
|
// $URL$
|
||||||
// $Id$
|
// $Id$
|
||||||
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
//
|
//
|
||||||
// Author(s) : Pavel Emeliyanenko <asm@mpi-sb.mpg.de>
|
// Author(s) : Pavel Emeliyanenko <asm@mpi-sb.mpg.de>
|
||||||
//
|
//
|
||||||
|
|
@ -22,7 +22,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CGAL_CKVA_CURVE_RENDERER_INTERNALS_H
|
#ifndef CGAL_CKVA_CURVE_RENDERER_INTERNALS_H
|
||||||
#define CGAL_CKVA_CURVE_RENDERER_INTERNALS_H 1
|
#define CGAL_CKVA_CURVE_RENDERER_INTERNALS_H
|
||||||
|
|
||||||
|
#include <CGAL/license/Arrangement_on_surface_2.h>
|
||||||
|
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <stack>
|
#include <stack>
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
//
|
//
|
||||||
// $URL$
|
// $URL$
|
||||||
// $Id$
|
// $Id$
|
||||||
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
//
|
//
|
||||||
// Author(s) : Pavel Emeliyanenko <asm@mpi-sb.mpg.de>
|
// Author(s) : Pavel Emeliyanenko <asm@mpi-sb.mpg.de>
|
||||||
//
|
//
|
||||||
|
|
@ -14,6 +14,9 @@
|
||||||
#ifndef CGAL_CKVA_CURVE_RENDERER_TRAITS_H
|
#ifndef CGAL_CKVA_CURVE_RENDERER_TRAITS_H
|
||||||
#define CGAL_CKVA_CURVE_RENDERER_TRAITS_H
|
#define CGAL_CKVA_CURVE_RENDERER_TRAITS_H
|
||||||
|
|
||||||
|
#include <CGAL/license/Arrangement_on_surface_2.h>
|
||||||
|
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
#include <CGAL/basic.h>
|
||||||
#include <CGAL/function_objects.h>
|
#include <CGAL/function_objects.h>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
//
|
//
|
||||||
// $URL$
|
// $URL$
|
||||||
// $Id$
|
// $Id$
|
||||||
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
//
|
//
|
||||||
// Author(s) : Pavel Emeliyanenko <asm@mpi-sb.mpg.de>
|
// Author(s) : Pavel Emeliyanenko <asm@mpi-sb.mpg.de>
|
||||||
//
|
//
|
||||||
|
|
@ -17,7 +17,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CGAL_CKVA_SUBDIVISION_1_H
|
#ifndef CGAL_CKVA_SUBDIVISION_1_H
|
||||||
#define CGAL_CKVA_SUBDIVISION_1_H 1
|
#define CGAL_CKVA_SUBDIVISION_1_H
|
||||||
|
|
||||||
|
#include <CGAL/license/Arrangement_on_surface_2.h>
|
||||||
|
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <boost/multi_index_container.hpp>
|
#include <boost/multi_index_container.hpp>
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
//
|
//
|
||||||
// $URL$
|
// $URL$
|
||||||
// $Id$
|
// $Id$
|
||||||
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
//
|
//
|
||||||
// Author(s) : Pavel Emeliyanenko <asm@mpi-sb.mpg.de>
|
// Author(s) : Pavel Emeliyanenko <asm@mpi-sb.mpg.de>
|
||||||
//
|
//
|
||||||
|
|
@ -17,7 +17,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef CGAL_CKVA_SUBDIVISION_2_H
|
#ifndef CGAL_CKVA_SUBDIVISION_2_H
|
||||||
#define CGAL_CKVA_SUBDIVISION_2_H 1
|
#define CGAL_CKVA_SUBDIVISION_2_H
|
||||||
|
|
||||||
|
#include <CGAL/license/Arrangement_on_surface_2.h>
|
||||||
|
|
||||||
|
|
||||||
#warning this file is considered obsolete
|
#warning this file is considered obsolete
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
//
|
//
|
||||||
// $URL$
|
// $URL$
|
||||||
// $Id$
|
// $Id$
|
||||||
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Author(s) : Pavel Emeliyanenko <asm@mpi-sb.mpg.de>
|
// Author(s) : Pavel Emeliyanenko <asm@mpi-sb.mpg.de>
|
||||||
|
|
@ -13,6 +13,9 @@
|
||||||
#ifndef CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_TEST_SIMPLE_MODELS_H
|
#ifndef CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_TEST_SIMPLE_MODELS_H
|
||||||
#define CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_TEST_SIMPLE_MODELS_H
|
#define CGAL_CURVED_KERNEL_VIA_ANALYSIS_2_TEST_SIMPLE_MODELS_H
|
||||||
|
|
||||||
|
#include <CGAL/license/Arrangement_on_surface_2.h>
|
||||||
|
|
||||||
|
|
||||||
/*!\file include/CGAL/Curved_kernel_via_analysis_2/test/simple_models.h
|
/*!\file include/CGAL/Curved_kernel_via_analysis_2/test/simple_models.h
|
||||||
* \brief defines dummy implementations satisfying Curve_kernel_2
|
* \brief defines dummy implementations satisfying Curve_kernel_2
|
||||||
* concept requirenments
|
* concept requirenments
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
//
|
//
|
||||||
// $URL$
|
// $URL$
|
||||||
// $Id$
|
// $Id$
|
||||||
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Author(s) : Ron Wein <wein@post.tau.ac.il>
|
// Author(s) : Ron Wein <wein@post.tau.ac.il>
|
||||||
|
|
@ -14,6 +14,9 @@
|
||||||
#ifndef CGAL_BOOST_GRAPH_GRAPH_TRAITS_ARRANGEMENT_2_H
|
#ifndef CGAL_BOOST_GRAPH_GRAPH_TRAITS_ARRANGEMENT_2_H
|
||||||
#define CGAL_BOOST_GRAPH_GRAPH_TRAITS_ARRANGEMENT_2_H
|
#define CGAL_BOOST_GRAPH_GRAPH_TRAITS_ARRANGEMENT_2_H
|
||||||
|
|
||||||
|
#include <CGAL/license/Arrangement_on_surface_2.h>
|
||||||
|
|
||||||
|
|
||||||
#include <CGAL/graph_traits_Arrangement_2.h>
|
#include <CGAL/graph_traits_Arrangement_2.h>
|
||||||
|
|
||||||
#endif //CGAL_BOOST_GRAPH_GRAPH_TRAITS_ARRANGEMENT_2_H
|
#endif //CGAL_BOOST_GRAPH_GRAPH_TRAITS_ARRANGEMENT_2_H
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
//
|
//
|
||||||
// $URL$
|
// $URL$
|
||||||
// $Id$
|
// $Id$
|
||||||
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Author(s) : Ron Wein <wein@post.tau.ac.il>
|
// Author(s) : Ron Wein <wein@post.tau.ac.il>
|
||||||
|
|
@ -14,6 +14,9 @@
|
||||||
#ifndef CGAL_BOOST_GRAPH_GRAPH_TRAITS_DUAL_ARRANGEMENT_2_H
|
#ifndef CGAL_BOOST_GRAPH_GRAPH_TRAITS_DUAL_ARRANGEMENT_2_H
|
||||||
#define CGAL_BOOST_GRAPH_GRAPH_TRAITS_ARRANGEMENT_2_H
|
#define CGAL_BOOST_GRAPH_GRAPH_TRAITS_ARRANGEMENT_2_H
|
||||||
|
|
||||||
|
#include <CGAL/license/Arrangement_on_surface_2.h>
|
||||||
|
|
||||||
|
|
||||||
#include <CGAL/graph_traits_dual_arrangement_2.h>
|
#include <CGAL/graph_traits_dual_arrangement_2.h>
|
||||||
|
|
||||||
#endif //CGAL_BOOST_GRAPH_GRAPH_TRAITS_DUAL_ARRANGEMENT_2_H
|
#endif //CGAL_BOOST_GRAPH_GRAPH_TRAITS_DUAL_ARRANGEMENT_2_H
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
//
|
//
|
||||||
// $URL$
|
// $URL$
|
||||||
// $Id$
|
// $Id$
|
||||||
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Author(s): Efi Fogel <efifogel@gmail.com>
|
// Author(s): Efi Fogel <efifogel@gmail.com>
|
||||||
|
|
@ -17,6 +17,9 @@
|
||||||
#ifndef CGAL_DRAW_ARRANGEMENT_2_H
|
#ifndef CGAL_DRAW_ARRANGEMENT_2_H
|
||||||
#define CGAL_DRAW_ARRANGEMENT_2_H
|
#define CGAL_DRAW_ARRANGEMENT_2_H
|
||||||
|
|
||||||
|
#include <CGAL/license/Arrangement_on_surface_2.h>
|
||||||
|
|
||||||
|
|
||||||
#include <CGAL/config.h>
|
#include <CGAL/config.h>
|
||||||
|
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
|
||||||
|
|
@ -72,13 +72,23 @@ if(CGAL_DISABLE_GMP)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CGAL_DISABLE_GMP)
|
if(CGAL_DISABLE_GMP)
|
||||||
message(STATUS "GMP is disable. Try to use LEDA instead.")
|
if (CGAL_USE_LEDA)
|
||||||
set(GMPZ_NT ${LEDA_INT_NT})
|
message(STATUS "GMP is disabled, try to use LEDA instead.")
|
||||||
set(QUOTIENT_CGAL_GMPZ_NT ${LEDA_RAT_NT})
|
set(GMPZ_NT ${LEDA_INT_NT})
|
||||||
set(CGAL_GMPQ_NT ${LEDA_RAT_NT})
|
set(QUOTIENT_CGAL_GMPZ_NT ${LEDA_RAT_NT})
|
||||||
set(LAZY_CGAL_GMPQ_NT ${LAZY_LEDA_RAT_NT})
|
set(CGAL_GMPQ_NT ${LEDA_RAT_NT})
|
||||||
set(LAZY_GMPZ_NT ${LAZY_LEDA_RAT_NT})
|
set(LAZY_CGAL_GMPQ_NT ${LAZY_LEDA_RAT_NT})
|
||||||
set(CGAL_GMPZ_NT ${LEDA_INT_NT})
|
set(LAZY_GMPZ_NT ${LAZY_LEDA_RAT_NT})
|
||||||
|
set(CGAL_GMPZ_NT ${LEDA_INT_NT})
|
||||||
|
else()
|
||||||
|
message(STATUS "GMP is disabled, try to use MP float instead.")
|
||||||
|
set(GMPZ_NT ${MP_FLOAT_NT})
|
||||||
|
set(QUOTIENT_CGAL_GMPZ_NT ${QUOTIENT_MP_FLOAT_NT})
|
||||||
|
set(CGAL_GMPQ_NT ${QUOTIENT_MP_FLOAT_NT})
|
||||||
|
set(LAZY_CGAL_GMPQ_NT ${LAZY_QUOTIENT_MP_FLOAT_NT})
|
||||||
|
set(LAZY_GMPZ_NT ${LAZY_QUOTIENT_MP_FLOAT_NT})
|
||||||
|
set(CGAL_GMPZ_NT ${MP_FLOAT_NT})
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(COMPARE 1)
|
set(COMPARE 1)
|
||||||
|
|
|
||||||
|
|
@ -78,13 +78,23 @@ CORE_INT_NT=15
|
||||||
CORE_RAT_NT=16
|
CORE_RAT_NT=16
|
||||||
|
|
||||||
if [ -n "${CGAL_DISABLE_GMP}" ]; then
|
if [ -n "${CGAL_DISABLE_GMP}" ]; then
|
||||||
echo GMP is disable. Try to use LEDA instead.
|
if [ -n "CGAL_USE_LEDA" ]; then
|
||||||
GMPZ_NT=$LEDA_INT_NT
|
echo GMP is disabled, try to use LEDA instead.
|
||||||
QUOTIENT_CGAL_GMPZ_NT=$LEDA_RAT_NT
|
GMPZ_NT=$LEDA_INT_NT
|
||||||
CGAL_GMPQ_NT=$LEDA_RAT_NT
|
QUOTIENT_CGAL_GMPZ_NT=$LEDA_RAT_NT
|
||||||
LAZY_CGAL_GMPQ_NT=$LAZY_LEDA_RAT_NT
|
CGAL_GMPQ_NT=$LEDA_RAT_NT
|
||||||
LAZY_GMPZ_NT=$LAZY_LEDA_RAT_NT
|
LAZY_CGAL_GMPQ_NT=$LAZY_LEDA_RAT_NT
|
||||||
CGAL_GMPZ_NT=$LEDA_INT_NT
|
LAZY_GMPZ_NT=$LAZY_LEDA_RAT_NT
|
||||||
|
CGAL_GMPZ_NT=$LEDA_INT_NT
|
||||||
|
else
|
||||||
|
echo GMP is disabled, try to use MP float instead.
|
||||||
|
GMPZ_NT=$MP_FLOAT_NT
|
||||||
|
QUOTIENT_CGAL_GMPZ_NT=$QUOTIENT_MP_FLOAT_NT
|
||||||
|
CGAL_GMPQ_NT=$QUOTIENT_MP_FLOAT_NT
|
||||||
|
LAZY_CGAL_GMPQ_NT=$LAZY_QUOTIENT_MP_FLOAT_NT
|
||||||
|
LAZY_GMPZ_NT=$LAZY_QUOTIENT_MP_FLOAT_NT
|
||||||
|
CGAL_GMPZ_NT=$MP_FLOAT_NT
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
COMPARE=1
|
COMPARE=1
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -9,7 +9,7 @@
|
||||||
//
|
//
|
||||||
// $URL$
|
// $URL$
|
||||||
// $Id$
|
// $Id$
|
||||||
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Author(s) : Guillaume Damiand <guillaume.damiand@liris.cnrs.fr>
|
// Author(s) : Guillaume Damiand <guillaume.damiand@liris.cnrs.fr>
|
||||||
|
|
@ -17,6 +17,9 @@
|
||||||
#ifndef CGAL_DRAW_POLYGON_SET_2_H
|
#ifndef CGAL_DRAW_POLYGON_SET_2_H
|
||||||
#define CGAL_DRAW_POLYGON_SET_2_H
|
#define CGAL_DRAW_POLYGON_SET_2_H
|
||||||
|
|
||||||
|
#include <CGAL/license/Boolean_set_operations_2.h>
|
||||||
|
|
||||||
|
|
||||||
#include <CGAL/Qt/Basic_viewer_qt.h>
|
#include <CGAL/Qt/Basic_viewer_qt.h>
|
||||||
|
|
||||||
#ifdef DOXYGEN_RUNNING
|
#ifdef DOXYGEN_RUNNING
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,10 @@
|
||||||
//
|
//
|
||||||
// Author(s) : Kaspar Fischer <fischerk@inf.ethz.ch>
|
// Author(s) : Kaspar Fischer <fischerk@inf.ethz.ch>
|
||||||
|
|
||||||
|
#ifndef CGAL_APPROXIMATE_MIN_ELLIPSOID_D_APPROXIMATE_MIN_ELLIPSOID_D_IMPL_H
|
||||||
|
#define CGAL_APPROXIMATE_MIN_ELLIPSOID_D_APPROXIMATE_MIN_ELLIPSOID_D_IMPL_H
|
||||||
|
|
||||||
|
#include <CGAL/license/Bounding_volumes.h>
|
||||||
|
|
||||||
#include <CGAL/Default_diagonalize_traits.h>
|
#include <CGAL/Default_diagonalize_traits.h>
|
||||||
|
|
||||||
|
|
@ -272,3 +276,5 @@ namespace CGAL {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif //CGAL_APPROXIMATE_MIN_ELLIPSOID_D_APPROXIMATE_MIN_ELLIPSOID_D_IMPL_H
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,11 @@
|
||||||
//
|
//
|
||||||
// Author(s) : Kaspar Fischer <fischerk@inf.ethz.ch>
|
// Author(s) : Kaspar Fischer <fischerk@inf.ethz.ch>
|
||||||
|
|
||||||
|
#ifndef CGAL_APPROX_MIN_ELLIPSOID_KHACHIYAN_APPROX_IMPL_H
|
||||||
|
#define CGAL_APPROX_MIN_ELLIPSOID_KHACHIYAN_APPROX_IMPL_H
|
||||||
|
|
||||||
|
#include <CGAL/license/Bounding_volumes.h>
|
||||||
|
|
||||||
// Note: whenever a comment refers to "Khachiyan's paper" then the
|
// Note: whenever a comment refers to "Khachiyan's paper" then the
|
||||||
// paper "Rounding of polytopes in the real number model of
|
// paper "Rounding of polytopes in the real number model of
|
||||||
// computation" is meant (Mathematics of Operations Research, Vol. 21,
|
// computation" is meant (Mathematics of Operations Research, Vol. 21,
|
||||||
|
|
@ -663,3 +668,5 @@ namespace CGAL {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // CGAL_APPROX_MIN_ELLIPSOID_KHACHIYAN_APPROX_IMPL_H
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,11 @@
|
||||||
//
|
//
|
||||||
// Author(s) : Sven Schoenherr <sven@inf.ethz.ch>, Bernd Gaertner
|
// Author(s) : Sven Schoenherr <sven@inf.ethz.ch>, Bernd Gaertner
|
||||||
|
|
||||||
|
#ifndef CGAL_MIN_CIRCLE_2_MIN_CIRCLE_2_IMPL_H
|
||||||
|
#define CGAL_MIN_CIRCLE_2_MIN_CIRCLE_2_IMPL_H
|
||||||
|
|
||||||
|
#include <CGAL/license/Bounding_volumes.h>
|
||||||
|
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
@ -98,3 +103,5 @@ operator >> ( std::istream& is, CGAL::Min_circle_2<Traits_>& min_circle)
|
||||||
} //namespace CGAL
|
} //namespace CGAL
|
||||||
|
|
||||||
// ===== EOF ==================================================================
|
// ===== EOF ==================================================================
|
||||||
|
|
||||||
|
#endif // CGAL_MIN_CIRCLE_2_MIN_CIRCLE_2_IMPL_H
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,11 @@
|
||||||
//
|
//
|
||||||
// Author(s) : Sven Schoenherr <sven@inf.ethz.ch>, Bernd Gaertner
|
// Author(s) : Sven Schoenherr <sven@inf.ethz.ch>, Bernd Gaertner
|
||||||
|
|
||||||
|
#ifndef CGAL_MIN_SPHERE_D_OPTIMISATION_CIRCLE_2_IMPL_H
|
||||||
|
#define CGAL_MIN_SPHERE_D_OPTIMISATION_CIRCLE_2_IMPL_H
|
||||||
|
|
||||||
|
#include <CGAL/license/Bounding_volumes.h>
|
||||||
|
|
||||||
// includes
|
// includes
|
||||||
# include <CGAL/assertions.h>
|
# include <CGAL/assertions.h>
|
||||||
|
|
||||||
|
|
@ -89,3 +94,5 @@ operator >> ( std::istream& is, CGAL::Optimisation_circle_2<K_>& c)
|
||||||
} //namespace CGAL
|
} //namespace CGAL
|
||||||
|
|
||||||
// ===== EOF ==================================================================
|
// ===== EOF ==================================================================
|
||||||
|
|
||||||
|
#endif //CGAL_MIN_SPHERE_D_OPTIMISATION_CIRCLE_2_IMPL_H
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,11 @@
|
||||||
//
|
//
|
||||||
// Author(s) : Sven Schoenherr <sven@inf.ethz.ch>, Bernd Gaertner
|
// Author(s) : Sven Schoenherr <sven@inf.ethz.ch>, Bernd Gaertner
|
||||||
|
|
||||||
|
#ifndef CGAL_MIN_ELLIPSE_2_MIN_ELLIPSE_2_IMP_H
|
||||||
|
#define CGAL_MIN_ELLIPSE_2_MIN_ELLIPSE_2_IMP_H
|
||||||
|
|
||||||
|
#include <CGAL/license/Bounding_volumes.h>
|
||||||
|
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
@ -98,3 +103,5 @@ operator >> ( std::istream& is, CGAL::Min_ellipse_2<Traits_>& min_ellipse)
|
||||||
} //namespace CGAL
|
} //namespace CGAL
|
||||||
|
|
||||||
// ===== EOF ==================================================================
|
// ===== EOF ==================================================================
|
||||||
|
|
||||||
|
#endif // CGAL_MIN_ELLIPSE_2_MIN_ELLIPSE_2_IMP_H
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,11 @@
|
||||||
//
|
//
|
||||||
// Author(s) : Sven Schoenherr <sven@inf.ethz.ch>, Bernd Gaertner
|
// Author(s) : Sven Schoenherr <sven@inf.ethz.ch>, Bernd Gaertner
|
||||||
|
|
||||||
|
#ifndef CGAL_MIN_ELLIPSE_2_OPTIMISATION_ELLIPSE_2_IMPL_H
|
||||||
|
#define CGAL_MIN_ELLIPSE_2_OPTIMISATION_ELLIPSE_2_IMPL_H
|
||||||
|
|
||||||
|
#include <CGAL/license/Bounding_volumes.h>
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
// Class implementation (continued)
|
// Class implementation (continued)
|
||||||
|
|
@ -116,3 +121,5 @@ operator >> ( std::istream& is, CGAL::Optimisation_ellipse_2<K_>& e)
|
||||||
} //namespace CGAL
|
} //namespace CGAL
|
||||||
|
|
||||||
// ===== EOF ==================================================================
|
// ===== EOF ==================================================================
|
||||||
|
|
||||||
|
#endif // CGAL_MIN_ELLIPSE_2_OPTIMISATION_ELLIPSE_2_IMPL_H
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
//
|
//
|
||||||
// $URL$
|
// $URL$
|
||||||
// $Id$
|
// $Id$
|
||||||
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Author(s) : Sven Schoenherr <sven@inf.ethz.ch>
|
// Author(s) : Sven Schoenherr <sven@inf.ethz.ch>
|
||||||
|
|
@ -17,6 +17,9 @@
|
||||||
#ifndef CGAL_MIN_SPHERE_ANNULUS_D_TRAITS_2_H
|
#ifndef CGAL_MIN_SPHERE_ANNULUS_D_TRAITS_2_H
|
||||||
#define CGAL_MIN_SPHERE_ANNULUS_D_TRAITS_2_H
|
#define CGAL_MIN_SPHERE_ANNULUS_D_TRAITS_2_H
|
||||||
|
|
||||||
|
#include <CGAL/license/Bounding_volumes.h>
|
||||||
|
|
||||||
|
|
||||||
// includes
|
// includes
|
||||||
# include <CGAL/Optimisation/Access_dimension_2.h>
|
# include <CGAL/Optimisation/Access_dimension_2.h>
|
||||||
# include <CGAL/Optimisation/Access_coordinates_begin_2.h>
|
# include <CGAL/Optimisation/Access_coordinates_begin_2.h>
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
//
|
//
|
||||||
// $URL$
|
// $URL$
|
||||||
// $Id$
|
// $Id$
|
||||||
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Author(s) : Sven Schoenherr <sven@inf.ethz.ch>
|
// Author(s) : Sven Schoenherr <sven@inf.ethz.ch>
|
||||||
|
|
@ -17,6 +17,9 @@
|
||||||
#ifndef CGAL_MIN_SPHERE_ANNULUS_D_TRAITS_3_H
|
#ifndef CGAL_MIN_SPHERE_ANNULUS_D_TRAITS_3_H
|
||||||
#define CGAL_MIN_SPHERE_ANNULUS_D_TRAITS_3_H
|
#define CGAL_MIN_SPHERE_ANNULUS_D_TRAITS_3_H
|
||||||
|
|
||||||
|
#include <CGAL/license/Bounding_volumes.h>
|
||||||
|
|
||||||
|
|
||||||
// includes
|
// includes
|
||||||
# include <CGAL/Optimisation/Access_dimension_3.h>
|
# include <CGAL/Optimisation/Access_dimension_3.h>
|
||||||
# include <CGAL/Optimisation/Access_coordinates_begin_3.h>
|
# include <CGAL/Optimisation/Access_coordinates_begin_3.h>
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
//
|
//
|
||||||
// $URL$
|
// $URL$
|
||||||
// $Id$
|
// $Id$
|
||||||
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Author(s) : Sven Schoenherr <sven@inf.ethz.ch>
|
// Author(s) : Sven Schoenherr <sven@inf.ethz.ch>
|
||||||
|
|
@ -17,6 +17,9 @@
|
||||||
#ifndef CGAL_MIN_SPHERE_ANULUS_D_TRAITS_D_H
|
#ifndef CGAL_MIN_SPHERE_ANULUS_D_TRAITS_D_H
|
||||||
#define CGAL_MIN_SPHERE_ANULUS_D_TRAITS_D_H
|
#define CGAL_MIN_SPHERE_ANULUS_D_TRAITS_D_H
|
||||||
|
|
||||||
|
#include <CGAL/license/Bounding_volumes.h>
|
||||||
|
|
||||||
|
|
||||||
// includes
|
// includes
|
||||||
# include <CGAL/Optimisation/Access_dimension_d.h>
|
# include <CGAL/Optimisation/Access_dimension_d.h>
|
||||||
# include <CGAL/Optimisation/Access_coordinates_begin_d.h>
|
# include <CGAL/Optimisation/Access_coordinates_begin_d.h>
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,11 @@
|
||||||
// Author(s) : Sven Schoenherr <sven@inf.fu-berlin.de>
|
// Author(s) : Sven Schoenherr <sven@inf.fu-berlin.de>
|
||||||
// Bernd Gaertner
|
// Bernd Gaertner
|
||||||
|
|
||||||
|
#ifndef CGAL_MIN_SPHERE_D_MIN_SPHERE_D_IMPL_H
|
||||||
|
#define CGAL_MIN_SPHERE_D_MIN_SPHERE_D_IMPL_H
|
||||||
|
|
||||||
|
#include <CGAL/license/Bounding_volumes.h>
|
||||||
|
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
@ -105,3 +110,5 @@ operator >> ( std::istream& is, Min_sphere_d<Traits>& min_sphere)
|
||||||
} //namespace CGAL
|
} //namespace CGAL
|
||||||
|
|
||||||
// ===== EOF ==================================================================
|
// ===== EOF ==================================================================
|
||||||
|
|
||||||
|
#endif //CGAL_MIN_SPHERE_D_MIN_SPHERE_D_IMPL_H
|
||||||
|
|
|
||||||
|
|
@ -463,60 +463,79 @@ int _readAnalyzeHeader( _image* im, const char* name,
|
||||||
for ( i=0; i<im->nuser; i++ ) im->user[i] = nullptr;
|
for ( i=0; i<im->nuser; i++ ) im->user[i] = nullptr;
|
||||||
i = 0 ;
|
i = 0 ;
|
||||||
|
|
||||||
im->user[i] = (char *) ImageIO_alloc((strlen("Data lost in the Analyze -> ImageIO conversion:") + 1));
|
size_t buffer_size;
|
||||||
sprintf( im->user[i++], "Data lost in the Analyze -> ImageIO conversion:" );
|
buffer_size = strlen("Data lost in the Analyze -> ImageIO conversion:") + 1;
|
||||||
|
im->user[i] = (char *) ImageIO_alloc(buffer_size);
|
||||||
|
snprintf( im->user[i++], buffer_size, "Data lost in the Analyze -> ImageIO conversion:" );
|
||||||
|
|
||||||
im->user[i] = (char *) ImageIO_alloc((strlen(" descrip: ") + 1 + strlen(analyzeHeader->hist.descrip) ));
|
buffer_size = snprintf(nullptr, 0, " descrip: %s", analyzeHeader->hist.descrip) + 1;
|
||||||
sprintf( im->user[i++], " descrip: %s", analyzeHeader->hist.descrip );
|
im->user[i] = (char *) ImageIO_alloc(buffer_size);
|
||||||
|
snprintf( im->user[i++], buffer_size, " descrip: %s", analyzeHeader->hist.descrip );
|
||||||
|
|
||||||
im->user[i] = (char *) ImageIO_alloc((strlen(" aux_file: ") + 1 + strlen(analyzeHeader->hist.descrip) ));
|
buffer_size = snprintf(nullptr, 0, " aux_file: %s", analyzeHeader->hist.descrip ) + 1;
|
||||||
sprintf( im->user[i++], " aux_file: %s", analyzeHeader->hist.descrip );
|
im->user[i] = (char *) ImageIO_alloc(buffer_size);
|
||||||
|
snprintf( im->user[i++], buffer_size, " aux_file: %s", analyzeHeader->hist.descrip );
|
||||||
|
|
||||||
im->user[i] = (char *) ImageIO_alloc((strlen(" orient: ") + 1+ 2));
|
buffer_size = snprintf(nullptr, 0, " orient: %d", analyzeHeader->hist.orient ) + 1;
|
||||||
sprintf( im->user[i++], " orient: %d", analyzeHeader->hist.orient );
|
im->user[i] = (char *) ImageIO_alloc(buffer_size);
|
||||||
|
snprintf( im->user[i++], buffer_size, " orient: %d", analyzeHeader->hist.orient );
|
||||||
|
|
||||||
im->user[i] = (char *) ImageIO_alloc((strlen(" originator: ") + 1 + strlen(analyzeHeader->hist.originator) ));
|
buffer_size = snprintf(nullptr, 0, " originator: %s", analyzeHeader->hist.originator ) + 1;
|
||||||
sprintf( im->user[i++], " originator: %s", analyzeHeader->hist.originator );
|
im->user[i] = (char *) ImageIO_alloc(buffer_size);
|
||||||
|
snprintf( im->user[i++], buffer_size, " originator: %s", analyzeHeader->hist.originator );
|
||||||
|
|
||||||
im->user[i] = (char *) ImageIO_alloc((strlen(" generated: ") + 1 + strlen(analyzeHeader->hist.generated) ));
|
buffer_size = snprintf(nullptr, 0, " generated: %s", analyzeHeader->hist.generated ) + 1;
|
||||||
sprintf( im->user[i++], " generated: %s", analyzeHeader->hist.generated );
|
im->user[i] = (char *) ImageIO_alloc(buffer_size);
|
||||||
|
snprintf( im->user[i++], buffer_size, " generated: %s", analyzeHeader->hist.generated );
|
||||||
|
|
||||||
im->user[i] = (char *) ImageIO_alloc((strlen(" scannum: ") + 1 + strlen(analyzeHeader->hist.scannum) ));
|
buffer_size = snprintf(nullptr, 0, " scannum: %s", analyzeHeader->hist.scannum ) + 1;
|
||||||
sprintf( im->user[i++], " scannum: %s", analyzeHeader->hist.scannum );
|
im->user[i] = (char *) ImageIO_alloc(buffer_size);
|
||||||
|
snprintf( im->user[i++], buffer_size, " scannum: %s", analyzeHeader->hist.scannum );
|
||||||
|
|
||||||
im->user[i] = (char *) ImageIO_alloc((strlen(" patient_id: ") + 1 + strlen(analyzeHeader->hist.patient_id) ));
|
buffer_size = snprintf(nullptr, 0, " patient_id: %s", analyzeHeader->hist.patient_id ) +1;
|
||||||
sprintf( im->user[i++], " patient_id: %s", analyzeHeader->hist.patient_id );
|
im->user[i] = (char *) ImageIO_alloc(buffer_size);
|
||||||
|
snprintf( im->user[i++], buffer_size, " patient_id: %s", analyzeHeader->hist.patient_id );
|
||||||
|
|
||||||
im->user[i] = (char *) ImageIO_alloc((strlen(" exp_date: ") + 1 + strlen(analyzeHeader->hist.exp_date) ));
|
buffer_size = snprintf(nullptr, 0, " exp_date: %s", analyzeHeader->hist.exp_date ) + 1;
|
||||||
sprintf( im->user[i++], " exp_date: %s", analyzeHeader->hist.exp_date );
|
im->user[i] = (char *) ImageIO_alloc(buffer_size);
|
||||||
|
snprintf( im->user[i++], buffer_size, " exp_date: %s", analyzeHeader->hist.exp_date );
|
||||||
|
|
||||||
im->user[i] = (char *) ImageIO_alloc((strlen(" exp_time: ") + 1 + strlen(analyzeHeader->hist.exp_time) ));
|
buffer_size = snprintf(nullptr, 0, " exp_time: %s", analyzeHeader->hist.exp_time ) + 1;
|
||||||
sprintf( im->user[i++], " exp_time: %s", analyzeHeader->hist.exp_time );
|
im->user[i] = (char *) ImageIO_alloc(buffer_size);
|
||||||
|
snprintf( im->user[i++], buffer_size, " exp_time: %s", analyzeHeader->hist.exp_time );
|
||||||
|
|
||||||
|
buffer_size = snprintf(nullptr, 0, " views: %d", analyzeHeader->hist.views ) + 1;
|
||||||
/* A 32 bit int doesn't print on more than 11 chars */
|
/* A 32 bit int doesn't print on more than 11 chars */
|
||||||
im->user[i] = (char *) ImageIO_alloc((strlen(" views: ") + 11 + 1));
|
im->user[i] = (char *) ImageIO_alloc(buffer_size);
|
||||||
sprintf( im->user[i++], " views: %d", analyzeHeader->hist.views );
|
snprintf( im->user[i++], buffer_size, " views: %d", analyzeHeader->hist.views );
|
||||||
|
|
||||||
im->user[i] = (char *) ImageIO_alloc((strlen(" vols_added: ") + 11 + 1));
|
buffer_size = snprintf(nullptr, 0, " vols_added: %d", analyzeHeader->hist.vols_added ) + 1;
|
||||||
sprintf( im->user[i++], " vols_added: %d", analyzeHeader->hist.vols_added );
|
im->user[i] = (char *) ImageIO_alloc(buffer_size);
|
||||||
|
snprintf( im->user[i++], buffer_size, " vols_added: %d", analyzeHeader->hist.vols_added );
|
||||||
|
|
||||||
im->user[i] = (char *) ImageIO_alloc((strlen(" start_field: ") + 11 + 1));
|
buffer_size = snprintf(nullptr, 0, " start_field: %d", analyzeHeader->hist.start_field ) + 1;
|
||||||
sprintf( im->user[i++], " start_field: %d", analyzeHeader->hist.start_field );
|
im->user[i] = (char *) ImageIO_alloc(buffer_size);
|
||||||
|
snprintf( im->user[i++], buffer_size, " start_field: %d", analyzeHeader->hist.start_field );
|
||||||
|
|
||||||
im->user[i] = (char *) ImageIO_alloc((strlen(" field_skip: ") + 11 + 1));
|
buffer_size = snprintf(nullptr, 0, " field_skip: %d", analyzeHeader->hist.field_skip ) + 1;
|
||||||
sprintf( im->user[i++], " field_skip: %d", analyzeHeader->hist.field_skip );
|
im->user[i] = (char *) ImageIO_alloc(buffer_size);
|
||||||
|
snprintf( im->user[i++], buffer_size, " field_skip: %d", analyzeHeader->hist.field_skip );
|
||||||
|
|
||||||
im->user[i] = (char *) ImageIO_alloc((strlen(" omax: ") + 11 + 1));
|
buffer_size = snprintf(nullptr, 0, " omax: %d", analyzeHeader->hist.omax ) + 1;
|
||||||
sprintf( im->user[i++], " omax: %d", analyzeHeader->hist.omax );
|
im->user[i] = (char *) ImageIO_alloc(buffer_size);
|
||||||
|
snprintf( im->user[i++], buffer_size, " omax: %d", analyzeHeader->hist.omax );
|
||||||
|
|
||||||
im->user[i] = (char *) ImageIO_alloc((strlen(" omin: ") + 11 + 1));
|
buffer_size = snprintf(nullptr, 0, " omin: %d", analyzeHeader->hist.omin ) + 1;
|
||||||
sprintf( im->user[i++], " omin: %d", analyzeHeader->hist.omin );
|
im->user[i] = (char *) ImageIO_alloc(buffer_size);
|
||||||
|
snprintf( im->user[i++], buffer_size, " omin: %d", analyzeHeader->hist.omin );
|
||||||
|
|
||||||
im->user[i] = (char *) ImageIO_alloc((strlen(" smax: ") + 11 + 1));
|
buffer_size = snprintf(nullptr, 0, " smax: %d", analyzeHeader->hist.smax ) + 1;
|
||||||
sprintf( im->user[i++], " smax: %d", analyzeHeader->hist.smax );
|
im->user[i] = (char *) ImageIO_alloc(buffer_size);
|
||||||
|
snprintf( im->user[i++], buffer_size, " smax: %d", analyzeHeader->hist.smax );
|
||||||
|
|
||||||
im->user[i] = (char *) ImageIO_alloc((strlen(" smin: ") + 11 + 1));
|
buffer_size = snprintf(nullptr, 0, " smin: %d", analyzeHeader->hist.smin ) +1;
|
||||||
sprintf( im->user[i++], " smin: %d", analyzeHeader->hist.smin );
|
im->user[i] = (char *) ImageIO_alloc(buffer_size);
|
||||||
|
snprintf( im->user[i++], buffer_size, " smin: %d", analyzeHeader->hist.smin );
|
||||||
|
|
||||||
|
|
||||||
/* header is read. close header file and open data file. */
|
/* header is read. close header file and open data file. */
|
||||||
|
|
|
||||||
|
|
@ -130,10 +130,10 @@ int writeGis( char *name, _image* im) {
|
||||||
do {
|
do {
|
||||||
memset( str, 0, _LGTH_STRING_ );
|
memset( str, 0, _LGTH_STRING_ );
|
||||||
for ( j=0; j<n && i<size; j++, i++ ) {
|
for ( j=0; j<n && i<size; j++, i++ ) {
|
||||||
sprintf( str+strlen(str), "%d", theBuf[i] );
|
snprintf( str+strlen(str), _LGTH_STRING_ - strlen(str), "%d", theBuf[i] );
|
||||||
if ( j<n && i<size ) sprintf( str+strlen(str), " " );
|
if ( j<n && i<size ) snprintf( str+strlen(str), _LGTH_STRING_ - strlen(str), " " );
|
||||||
}
|
}
|
||||||
sprintf( str+strlen(str), "\n" );
|
snprintf( str+strlen(str), _LGTH_STRING_ - strlen(str), "\n" );
|
||||||
done = ImageIO_write( im, str, strlen( str ) );
|
done = ImageIO_write( im, str, strlen( str ) );
|
||||||
res = (done == strlen( str )) ? int(done) : -1;
|
res = (done == strlen( str )) ? int(done) : -1;
|
||||||
if ( res <= 0 ) {
|
if ( res <= 0 ) {
|
||||||
|
|
@ -150,10 +150,10 @@ int writeGis( char *name, _image* im) {
|
||||||
do {
|
do {
|
||||||
memset( str, 0, _LGTH_STRING_ );
|
memset( str, 0, _LGTH_STRING_ );
|
||||||
for ( j=0; j<n && i<size; j++, i++ ) {
|
for ( j=0; j<n && i<size; j++, i++ ) {
|
||||||
sprintf( str+strlen(str), "%d", theBuf[i] );
|
snprintf( str+strlen(str), _LGTH_STRING_ - strlen(str), "%d", theBuf[i] );
|
||||||
if ( j<n && i<size ) sprintf( str+strlen(str), " " );
|
if ( j<n && i<size ) snprintf( str+strlen(str), _LGTH_STRING_ - strlen(str), " " );
|
||||||
}
|
}
|
||||||
sprintf( str+strlen(str), "\n" );
|
snprintf( str+strlen(str), _LGTH_STRING_ - strlen(str), "\n" );
|
||||||
done = ImageIO_write( im, str, strlen( str ) );
|
done = ImageIO_write( im, str, strlen( str ) );
|
||||||
res = (done == strlen( str )) ? int(done) : -1;
|
res = (done == strlen( str )) ? int(done) : -1;
|
||||||
if ( res <= 0 ) {
|
if ( res <= 0 ) {
|
||||||
|
|
@ -178,10 +178,10 @@ int writeGis( char *name, _image* im) {
|
||||||
do {
|
do {
|
||||||
memset( str, 0, _LGTH_STRING_ );
|
memset( str, 0, _LGTH_STRING_ );
|
||||||
for ( j=0; j<n && i<size; j++, i++ ) {
|
for ( j=0; j<n && i<size; j++, i++ ) {
|
||||||
sprintf( str+strlen(str), "%d", theBuf[i] );
|
snprintf( str+strlen(str), _LGTH_STRING_ - strlen(str), "%d", theBuf[i] );
|
||||||
if ( j<n && i<size ) sprintf( str+strlen(str), " " );
|
if ( j<n && i<size ) snprintf( str+strlen(str), _LGTH_STRING_ - strlen(str), " " );
|
||||||
}
|
}
|
||||||
sprintf( str+strlen(str), "\n" );
|
snprintf( str+strlen(str), _LGTH_STRING_ - strlen(str), "\n" );
|
||||||
done = ImageIO_write( im, str, strlen( str ) );
|
done = ImageIO_write( im, str, strlen( str ) );
|
||||||
res = (done == strlen( str )) ? int(done) : -1;
|
res = (done == strlen( str )) ? int(done) : -1;
|
||||||
if ( res <= 0 ) {
|
if ( res <= 0 ) {
|
||||||
|
|
@ -198,10 +198,10 @@ int writeGis( char *name, _image* im) {
|
||||||
do {
|
do {
|
||||||
memset( str, 0, _LGTH_STRING_ );
|
memset( str, 0, _LGTH_STRING_ );
|
||||||
for ( j=0; j<n && i<size; j++, i++ ) {
|
for ( j=0; j<n && i<size; j++, i++ ) {
|
||||||
sprintf( str+strlen(str), "%d", theBuf[i] );
|
snprintf( str+strlen(str), _LGTH_STRING_ - strlen(str), "%d", theBuf[i] );
|
||||||
if ( j<n && i<size ) sprintf( str+strlen(str), " " );
|
if ( j<n && i<size ) snprintf( str+strlen(str),_LGTH_STRING_ - strlen(str), " " );
|
||||||
}
|
}
|
||||||
sprintf( str+strlen(str), "\n" );
|
snprintf( str+strlen(str), _LGTH_STRING_ - strlen(str), "\n" );
|
||||||
done = ImageIO_write( im, str, strlen( str ) );
|
done = ImageIO_write( im, str, strlen( str ) );
|
||||||
res = (done == strlen( str )) ? int(done) : -1;
|
res = (done == strlen( str )) ? int(done) : -1;
|
||||||
if ( res <= 0 ) {
|
if ( res <= 0 ) {
|
||||||
|
|
|
||||||
|
|
@ -77,22 +77,22 @@ int _writeInrimageHeader(const _image *im, ENDIANNESS end) {
|
||||||
switch(im->wordKind) {
|
switch(im->wordKind) {
|
||||||
|
|
||||||
case WK_FLOAT:
|
case WK_FLOAT:
|
||||||
sprintf(type, "float");
|
snprintf(type, 30, "float");
|
||||||
scale[0] = '\0';
|
scale[0] = '\0';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WK_FIXED:
|
case WK_FIXED:
|
||||||
switch(im->sign) {
|
switch(im->sign) {
|
||||||
case SGN_SIGNED:
|
case SGN_SIGNED:
|
||||||
sprintf(type, "signed fixed");
|
snprintf(type, 30, "signed fixed");
|
||||||
break;
|
break;
|
||||||
case SGN_UNSIGNED:
|
case SGN_UNSIGNED:
|
||||||
sprintf(type, "unsigned fixed");
|
snprintf(type, 30, "unsigned fixed");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
sprintf(scale, "SCALE=2**0\n");
|
snprintf(scale, 20, "SCALE=2**0\n");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
@ -101,17 +101,17 @@ int _writeInrimageHeader(const _image *im, ENDIANNESS end) {
|
||||||
|
|
||||||
switch(end) {
|
switch(end) {
|
||||||
case END_LITTLE:
|
case END_LITTLE:
|
||||||
sprintf(endianness, "decm");
|
snprintf(endianness, 5, "decm");
|
||||||
break;
|
break;
|
||||||
case END_BIG:
|
case END_BIG:
|
||||||
sprintf(endianness, "sun");
|
snprintf(endianness, 5, "sun");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
/* fix architecture endianness */
|
/* fix architecture endianness */
|
||||||
if( _getEndianness() == END_LITTLE)
|
if( _getEndianness() == END_LITTLE)
|
||||||
sprintf(endianness, "decm");
|
snprintf(endianness, 5, "decm");
|
||||||
else
|
else
|
||||||
sprintf(endianness, "sun");
|
snprintf(endianness, 5, "sun");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -357,7 +357,7 @@ int writeMincFile( const _image* im, const char *filename,
|
||||||
strcat(newname, filename + i + 1);
|
strcat(newname, filename + i + 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
sprintf(newname, "#TMP#%s", filename);
|
snprintf(newname,strlen(filename) + 10, "#TMP#%s", filename);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -524,14 +524,14 @@ int writePgmImage(char *name,_image *im )
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( im->dataMode == DM_ASCII )
|
if ( im->dataMode == DM_ASCII )
|
||||||
sprintf( string, "%s\n", PGM_ASCII_MAGIC );
|
snprintf( string, 256, "%s\n", PGM_ASCII_MAGIC );
|
||||||
else
|
else
|
||||||
sprintf( string, "%s\n", PGM_MAGIC );
|
snprintf( string, 256, "%s\n", PGM_MAGIC );
|
||||||
|
|
||||||
ImageIO_write( im, string, strlen( string ) );
|
ImageIO_write( im, string, strlen( string ) );
|
||||||
sprintf( string, "# CREATOR: pnm.c $Revision$ $Date$\n" );
|
snprintf( string, 256, "# CREATOR: pnm.c $Revision$ $Date$\n" );
|
||||||
ImageIO_write( im, string, strlen( string ) );
|
ImageIO_write( im, string, strlen( string ) );
|
||||||
sprintf( string, "%zu %zu\n", im->xdim, im->ydim );
|
snprintf( string, 256, "%zu %zu\n", im->xdim, im->ydim );
|
||||||
ImageIO_write( im, string, strlen( string ) );
|
ImageIO_write( im, string, strlen( string ) );
|
||||||
max = 0;
|
max = 0;
|
||||||
switch ( im->wdim ) {
|
switch ( im->wdim ) {
|
||||||
|
|
@ -552,7 +552,7 @@ int writePgmImage(char *name,_image *im )
|
||||||
}
|
}
|
||||||
/* max == 0 causes problems for xv */
|
/* max == 0 causes problems for xv */
|
||||||
if ( max == 0 ) max = 1;
|
if ( max == 0 ) max = 1;
|
||||||
sprintf( string, "%d\n", max );
|
snprintf( string, 256, "%d\n", max );
|
||||||
ImageIO_write( im, string, strlen( string ) );
|
ImageIO_write( im, string, strlen( string ) );
|
||||||
|
|
||||||
if ( im->dataMode == DM_ASCII ) {
|
if ( im->dataMode == DM_ASCII ) {
|
||||||
|
|
@ -574,10 +574,10 @@ int writePgmImage(char *name,_image *im )
|
||||||
do {
|
do {
|
||||||
memset( str, 0, _LGTH_STRING_ );
|
memset( str, 0, _LGTH_STRING_ );
|
||||||
for ( j=0; j<n && i<size; j++, i++ ) {
|
for ( j=0; j<n && i<size; j++, i++ ) {
|
||||||
sprintf( str+strlen(str), "%d", theBuf[i] );
|
snprintf( str+strlen(str), _LGTH_STRING_ - strlen(str), "%d", theBuf[i] );
|
||||||
if ( j<n && i<size ) sprintf( str+strlen(str), " " );
|
if ( j<n && i<size ) snprintf( str+strlen(str), _LGTH_STRING_ - strlen(str), " " );
|
||||||
}
|
}
|
||||||
sprintf( str+strlen(str), "\n" );
|
snprintf( str+strlen(str), _LGTH_STRING_ - strlen(str), "\n" );
|
||||||
if ( ImageIO_write( im, str, strlen( str ) ) <= 0 ) {
|
if ( ImageIO_write( im, str, strlen( str ) ) <= 0 ) {
|
||||||
fprintf(stderr, "writePgmImage: error when writing data in \'%s\'\n", name );
|
fprintf(stderr, "writePgmImage: error when writing data in \'%s\'\n", name );
|
||||||
return( -3 );
|
return( -3 );
|
||||||
|
|
@ -591,10 +591,10 @@ int writePgmImage(char *name,_image *im )
|
||||||
do {
|
do {
|
||||||
memset( str, 0, _LGTH_STRING_ );
|
memset( str, 0, _LGTH_STRING_ );
|
||||||
for ( j=0; j<n && i<size; j++, i++ ) {
|
for ( j=0; j<n && i<size; j++, i++ ) {
|
||||||
sprintf( str+strlen(str), "%d", theBuf[i] );
|
snprintf( str+strlen(str), _LGTH_STRING_ - strlen(str), "%d", theBuf[i] );
|
||||||
if ( j<n && i<size ) sprintf( str+strlen(str), " " );
|
if ( j<n && i<size ) snprintf( str+strlen(str), 2, " " );
|
||||||
}
|
}
|
||||||
sprintf( str+strlen(str), "\n" );
|
snprintf( str+strlen(str), _LGTH_STRING_ - strlen(str), "\n" );
|
||||||
if ( ImageIO_write( im, str, strlen( str ) ) <= 0 ) {
|
if ( ImageIO_write( im, str, strlen( str ) ) <= 0 ) {
|
||||||
fprintf(stderr, "writePgmImage: error when writing data in \'%s\'\n", name );
|
fprintf(stderr, "writePgmImage: error when writing data in \'%s\'\n", name );
|
||||||
return( -3 );
|
return( -3 );
|
||||||
|
|
@ -629,6 +629,3 @@ int writePgmImage(char *name,_image *im )
|
||||||
im->openMode = OM_CLOSE;
|
im->openMode = OM_CLOSE;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,11 @@
|
||||||
//
|
//
|
||||||
// $URL$
|
// $URL$
|
||||||
// $Id$
|
// $Id$
|
||||||
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
//
|
//
|
||||||
// $URL$
|
// $URL$
|
||||||
// $Id$
|
// $Id$
|
||||||
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Author(s) : Philipp Möller and Sebastien Loriot
|
// Author(s) : Philipp Möller and Sebastien Loriot
|
||||||
|
|
@ -17,6 +17,9 @@
|
||||||
#ifndef CGAL_CIRCULAR_KERNEL_2_INTERSECTION_TRAITS_H
|
#ifndef CGAL_CIRCULAR_KERNEL_2_INTERSECTION_TRAITS_H
|
||||||
#define CGAL_CIRCULAR_KERNEL_2_INTERSECTION_TRAITS_H
|
#define CGAL_CIRCULAR_KERNEL_2_INTERSECTION_TRAITS_H
|
||||||
|
|
||||||
|
#include <CGAL/license/Circular_kernel_2.h>
|
||||||
|
|
||||||
|
|
||||||
#include <CGAL/Intersection_traits.h>
|
#include <CGAL/Intersection_traits.h>
|
||||||
|
|
||||||
#include <variant>
|
#include <variant>
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,8 @@
|
||||||
//
|
//
|
||||||
// Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado
|
// Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado
|
||||||
|
|
||||||
|
#include <CGAL/license/Circular_kernel_2.h>
|
||||||
|
|
||||||
// Partially supported by the IST Programme of the EU as a Shared-cost
|
// Partially supported by the IST Programme of the EU as a Shared-cost
|
||||||
// RTD (FET Open) Project under Contract No IST-2000-26473
|
// RTD (FET Open) Project under Contract No IST-2000-26473
|
||||||
// (ECG - Effective Computational Geometry for Curves and Surfaces)
|
// (ECG - Effective Computational Geometry for Curves and Surfaces)
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,8 @@
|
||||||
//
|
//
|
||||||
// Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado
|
// Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado
|
||||||
|
|
||||||
|
#include <CGAL/license/Circular_kernel_2.h>
|
||||||
|
|
||||||
// Partially supported by the IST Programme of the EU as a Shared-cost
|
// Partially supported by the IST Programme of the EU as a Shared-cost
|
||||||
// RTD (FET Open) Project under Contract No IST-2000-26473
|
// RTD (FET Open) Project under Contract No IST-2000-26473
|
||||||
// (ECG - Effective Computational Geometry for Curves and Surfaces)
|
// (ECG - Effective Computational Geometry for Curves and Surfaces)
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
//
|
//
|
||||||
// $URL$
|
// $URL$
|
||||||
// $Id$
|
// $Id$
|
||||||
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Author(s) : Philipp Möller and Sebastien Loriot
|
// Author(s) : Philipp Möller and Sebastien Loriot
|
||||||
|
|
@ -13,6 +13,9 @@
|
||||||
#ifndef CGAL_CIRCULAR_KERNEL_3_INTERSECTION_TRAITS_H
|
#ifndef CGAL_CIRCULAR_KERNEL_3_INTERSECTION_TRAITS_H
|
||||||
#define CGAL_CIRCULAR_KERNEL_3_INTERSECTION_TRAITS_H
|
#define CGAL_CIRCULAR_KERNEL_3_INTERSECTION_TRAITS_H
|
||||||
|
|
||||||
|
#include <CGAL/license/Circular_kernel_3.h>
|
||||||
|
|
||||||
|
|
||||||
#include <CGAL/Intersection_traits.h>
|
#include <CGAL/Intersection_traits.h>
|
||||||
|
|
||||||
#include <variant>
|
#include <variant>
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,8 @@
|
||||||
// Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado,
|
// Author(s) : Monique Teillaud, Sylvain Pion, Pedro Machado,
|
||||||
// Sebastien Loriot, Julien Hazebrouck, Damien Leroy
|
// Sebastien Loriot, Julien Hazebrouck, Damien Leroy
|
||||||
|
|
||||||
|
#include <CGAL/license/Circular_kernel_3.h>
|
||||||
|
|
||||||
// Partially supported by the IST Programme of the EU as a
|
// Partially supported by the IST Programme of the EU as a
|
||||||
// STREP (FET Open) Project under Contract No IST-006413
|
// STREP (FET Open) Project under Contract No IST-006413
|
||||||
// (ACS -- Algorithms for Complex Shapes)
|
// (ACS -- Algorithms for Complex Shapes)
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@
|
||||||
//
|
//
|
||||||
// $URL$
|
// $URL$
|
||||||
// $Id$
|
// $Id$
|
||||||
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
//
|
//
|
||||||
// Author(s) : Monique Teillaud <Monique.Teillaud@sophia.inria.fr>
|
// Author(s) : Monique Teillaud <Monique.Teillaud@sophia.inria.fr>
|
||||||
// Sylvain Pion
|
// Sylvain Pion
|
||||||
|
|
@ -22,6 +22,9 @@
|
||||||
#ifndef CGAL_SPHERICAL_KERNEL_TYPE_EQUALITY_WRAPPER_H
|
#ifndef CGAL_SPHERICAL_KERNEL_TYPE_EQUALITY_WRAPPER_H
|
||||||
#define CGAL_SPHERICAL_KERNEL_TYPE_EQUALITY_WRAPPER_H
|
#define CGAL_SPHERICAL_KERNEL_TYPE_EQUALITY_WRAPPER_H
|
||||||
|
|
||||||
|
#include <CGAL/license/Circular_kernel_3.h>
|
||||||
|
|
||||||
|
|
||||||
#include <CGAL/user_classes.h>
|
#include <CGAL/user_classes.h>
|
||||||
#include <CGAL/Circular_arc_point_3.h>
|
#include <CGAL/Circular_arc_point_3.h>
|
||||||
#include <CGAL/Circular_arc_3.h>
|
#include <CGAL/Circular_arc_3.h>
|
||||||
|
|
|
||||||
|
|
@ -5,21 +5,10 @@ find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core)
|
||||||
find_package(LEDA QUIET)
|
find_package(LEDA QUIET)
|
||||||
|
|
||||||
if(CGAL_Core_FOUND OR LEDA_FOUND)
|
if(CGAL_Core_FOUND OR LEDA_FOUND)
|
||||||
if(MSVC)
|
create_single_source_cgal_program("compute_cones.cpp")
|
||||||
# Turn off a boost related warning that appears with VC2015
|
create_single_source_cgal_program("theta_io.cpp")
|
||||||
# boost_1_65_1\boost\graph\named_function_params.hpp(240) :
|
|
||||||
# warning C4172: returning address of local variable or temporary
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4172")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# create a target per cppfile
|
|
||||||
file(
|
|
||||||
GLOB cppfiles
|
|
||||||
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
|
|
||||||
foreach(cppfile ${cppfiles})
|
|
||||||
create_single_source_cgal_program("${cppfile}")
|
|
||||||
endforeach()
|
|
||||||
else()
|
else()
|
||||||
message("NOTICE: This program requires the CGAL_Core library (or LEDA), and will not be compiled.")
|
message("NOTICE: This program requires the CGAL_Core library (or LEDA), and will not be compiled.")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
create_single_source_cgal_program("dijkstra_theta.cpp")
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,9 @@
|
||||||
#include <CGAL/Polynomial.h>
|
#include <CGAL/Polynomial.h>
|
||||||
#include <CGAL/number_type_config.h> // CGAL_PI is defined there
|
#include <CGAL/number_type_config.h> // CGAL_PI is defined there
|
||||||
#include <CGAL/enum.h>
|
#include <CGAL/enum.h>
|
||||||
|
#if defined(CGAL_USE_LEDA) || defined(CGAL_USE_CORE)
|
||||||
#include <CGAL/Exact_predicates_exact_constructions_kernel_with_root_of.h>
|
#include <CGAL/Exact_predicates_exact_constructions_kernel_with_root_of.h>
|
||||||
|
#endif
|
||||||
#include <CGAL/Aff_transformation_2.h>
|
#include <CGAL/Aff_transformation_2.h>
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
@ -111,7 +113,7 @@ public:
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#if defined(CGAL_USE_LEDA) || defined(CGAL_USE_CORE)
|
||||||
/*
|
/*
|
||||||
The specialised functor for computing the directions of cone boundaries exactly
|
The specialised functor for computing the directions of cone boundaries exactly
|
||||||
with a given cone number and a given initial direction.
|
with a given cone number and a given initial direction.
|
||||||
|
|
@ -209,6 +211,7 @@ public:
|
||||||
|
|
||||||
} // end of operator()
|
} // end of operator()
|
||||||
}; // end of functor specialization: Compute_cone_..._2
|
}; // end of functor specialization: Compute_cone_..._2
|
||||||
|
#endif
|
||||||
|
|
||||||
} // namespace CGAL
|
} // namespace CGAL
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@
|
||||||
#include <CGAL/Polynomial.h>
|
#include <CGAL/Polynomial.h>
|
||||||
#include <CGAL/number_utils.h>
|
#include <CGAL/number_utils.h>
|
||||||
#include <CGAL/enum.h>
|
#include <CGAL/enum.h>
|
||||||
#include <CGAL/Exact_predicates_exact_constructions_kernel_with_sqrt.h>
|
|
||||||
#include <CGAL/Aff_transformation_2.h>
|
#include <CGAL/Aff_transformation_2.h>
|
||||||
|
|
||||||
#include <boost/config.hpp>
|
#include <boost/config.hpp>
|
||||||
|
|
|
||||||
|
|
@ -5,12 +5,16 @@ cmake_minimum_required(VERSION 3.1...3.23)
|
||||||
project(Cone_spanners_2_Tests)
|
project(Cone_spanners_2_Tests)
|
||||||
|
|
||||||
find_package(CGAL REQUIRED COMPONENTS Core)
|
find_package(CGAL REQUIRED COMPONENTS Core)
|
||||||
|
find_package(LEDA QUIET)
|
||||||
|
|
||||||
# create a target per cppfile
|
create_single_source_cgal_program("cones_inexact.cpp")
|
||||||
file(
|
create_single_source_cgal_program("theta_inexact.cpp")
|
||||||
GLOB cppfiles
|
create_single_source_cgal_program("yao_inexact.cpp")
|
||||||
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
|
if(CGAL_Core_FOUND OR LEDA_FOUND)
|
||||||
foreach(cppfile ${cppfiles})
|
create_single_source_cgal_program("cones_exact.cpp")
|
||||||
create_single_source_cgal_program("${cppfile}")
|
create_single_source_cgal_program("theta_exact.cpp")
|
||||||
endforeach()
|
create_single_source_cgal_program("yao_exact.cpp")
|
||||||
|
else()
|
||||||
|
message("NOTICE: Some tests require the CGAL_Core library (or LEDA), and will not be compiled.")
|
||||||
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
//
|
//
|
||||||
// $URL$
|
// $URL$
|
||||||
// $Id$
|
// $Id$
|
||||||
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
//
|
//
|
||||||
// Author(s) : Sebastien Loriot
|
// Author(s) : Sebastien Loriot
|
||||||
|
|
||||||
|
|
@ -13,6 +13,9 @@
|
||||||
#ifndef CGAL_CONVEX_HULL_TRAITS_ADAPTER_2_H
|
#ifndef CGAL_CONVEX_HULL_TRAITS_ADAPTER_2_H
|
||||||
#define CGAL_CONVEX_HULL_TRAITS_ADAPTER_2_H
|
#define CGAL_CONVEX_HULL_TRAITS_ADAPTER_2_H
|
||||||
|
|
||||||
|
#include <CGAL/license/Convex_hull_2.h>
|
||||||
|
|
||||||
|
|
||||||
#include <boost/call_traits.hpp>
|
#include <boost/call_traits.hpp>
|
||||||
|
|
||||||
#include <CGAL/property_map.h>
|
#include <CGAL/property_map.h>
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,7 @@
|
||||||
<!-- $.treeview -->
|
<!-- $.treeview -->
|
||||||
<!-- $.search -->
|
<!-- $.search -->
|
||||||
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
||||||
|
<script src="$relpath^../Manual/cookie.js" type="text/javascript"></script>
|
||||||
<script type="text/javascript" src="$relpath^../Manual/resize.js"></script>
|
<script type="text/javascript" src="$relpath^../Manual/resize.js"></script>
|
||||||
<script type="text/javascript" src="navtreedata.js"></script>
|
<script type="text/javascript" src="navtreedata.js"></script>
|
||||||
<script type="text/javascript" src="navtree.js"></script>
|
<script type="text/javascript" src="navtree.js"></script>
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,6 @@
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
#include <CGAL/enum.h>
|
#include <CGAL/enum.h>
|
||||||
#include <CGAL/Arr_observer.h>
|
|
||||||
#include <CGAL/Envelope_3/Envelope_base.h>
|
#include <CGAL/Envelope_3/Envelope_base.h>
|
||||||
#include <CGAL/Envelope_3/Envelope_overlay_2.h>
|
#include <CGAL/Envelope_3/Envelope_overlay_2.h>
|
||||||
#include <CGAL/Envelope_3/Envelope_element_visitor_3.h>
|
#include <CGAL/Envelope_3/Envelope_element_visitor_3.h>
|
||||||
|
|
@ -134,7 +133,8 @@ protected:
|
||||||
typedef typename Minimization_diagram_2::Inner_ccb_iterator
|
typedef typename Minimization_diagram_2::Inner_ccb_iterator
|
||||||
Inner_ccb_iterator;
|
Inner_ccb_iterator;
|
||||||
|
|
||||||
typedef Arr_observer<Minimization_diagram_2> Md_observer;
|
typedef typename Minimization_diagram_2::Observer
|
||||||
|
Md_observer;
|
||||||
typedef typename Minimization_diagram_2::Dcel::Dcel_data_iterator
|
typedef typename Minimization_diagram_2::Dcel::Dcel_data_iterator
|
||||||
Envelope_data_iterator;
|
Envelope_data_iterator;
|
||||||
|
|
||||||
|
|
@ -1584,19 +1584,16 @@ protected:
|
||||||
|
|
||||||
// observer for the minimization diagram
|
// observer for the minimization diagram
|
||||||
// keeps the relevant data in the new faces
|
// keeps the relevant data in the new faces
|
||||||
class Keep_face_data_observer : public Md_observer
|
class Keep_face_data_observer : public Md_observer {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
typedef typename Minimization_diagram_2::Face_handle Face_handle;
|
using Base_aos = typename Minimization_diagram_2::Base_aos;
|
||||||
|
using Face_handle = typename Base_aos::Face_handle;
|
||||||
|
|
||||||
Keep_face_data_observer(Minimization_diagram_2& arr) :
|
Keep_face_data_observer(Base_aos& arr) : Md_observer(arr) {}
|
||||||
Md_observer(arr)
|
|
||||||
{}
|
|
||||||
|
|
||||||
virtual void after_split_face(Face_handle org_f,
|
virtual void after_split_face(Face_handle org_f,
|
||||||
Face_handle new_f,
|
Face_handle new_f,
|
||||||
bool /* is_hole*/)
|
bool /* is_hole*/) override {
|
||||||
{
|
|
||||||
// update data in the new face from the original face
|
// update data in the new face from the original face
|
||||||
if (org_f->get_aux_is_set(0))
|
if (org_f->get_aux_is_set(0))
|
||||||
new_f->set_aux_source(0, org_f->get_aux_source(0));
|
new_f->set_aux_source(0, org_f->get_aux_source(0));
|
||||||
|
|
@ -1610,34 +1607,30 @@ protected:
|
||||||
|
|
||||||
// observer for the minimization diagram
|
// observer for the minimization diagram
|
||||||
// keeps the relevant data in the new edges & vertices
|
// keeps the relevant data in the new edges & vertices
|
||||||
class Keep_edge_data_observer : public Md_observer
|
class Keep_edge_data_observer : public Md_observer {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
typedef typename Minimization_diagram_2::Halfedge_handle Halfedge_handle;
|
using Base_aos = typename Minimization_diagram_2::Base_aos;
|
||||||
typedef typename Minimization_diagram_2::Vertex_handle Vertex_handle;
|
using Vertex_handle = typename Base_aos::Vertex_handle;
|
||||||
typedef typename Minimization_diagram_2::X_monotone_curve_2
|
using Halfedge_handle = typename Base_aos::Halfedge_handle;
|
||||||
X_monotone_curve_2;
|
using X_monotone_curve_2 = typename Base_aos::X_monotone_curve_2;
|
||||||
|
|
||||||
typedef typename Envelope_divide_and_conquer_3<Traits,
|
using Self = typename Envelope_divide_and_conquer_3<Traits,
|
||||||
Minimization_diagram_2,
|
Minimization_diagram_2,
|
||||||
EnvelopeResolver_3,
|
EnvelopeResolver_3,
|
||||||
Overlay_2>::Self Self;
|
Overlay_2>::Self;
|
||||||
Keep_edge_data_observer(Minimization_diagram_2& arr,
|
Keep_edge_data_observer(Base_aos& arr, Self* b) :
|
||||||
Self* b) :
|
|
||||||
Md_observer(arr), base(b)
|
Md_observer(arr), base(b)
|
||||||
{
|
{ CGAL_assertion(base != nullptr); }
|
||||||
CGAL_assertion(base != nullptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* virtual void before_split_edge (Halfedge_handle e,
|
/* virtual void before_split_edge(Halfedge_handle e,
|
||||||
* Vertex_handle v,
|
* Vertex_handle v,
|
||||||
* const X_monotone_curve_2& c1,
|
* const X_monotone_curve_2& c1,
|
||||||
* const X_monotone_curve_2& c2)
|
* const X_monotone_curve_2& c2)
|
||||||
* {}
|
* {}
|
||||||
*/
|
*/
|
||||||
|
|
||||||
virtual void after_split_edge(Halfedge_handle he1, Halfedge_handle he2)
|
virtual void after_split_edge(Halfedge_handle he1, Halfedge_handle he2)
|
||||||
{
|
override {
|
||||||
// update data of the new vertex, which is the common vertex of he1 and
|
// update data of the new vertex, which is the common vertex of he1 and
|
||||||
// he2, and of the new edge according to the data in the original edge
|
// he2, and of the new edge according to the data in the original edge
|
||||||
CGAL_assertion(he2->source() == he1->target());
|
CGAL_assertion(he2->source() == he1->target());
|
||||||
|
|
@ -1657,20 +1650,17 @@ protected:
|
||||||
// the second halfedge
|
// the second halfedge
|
||||||
Halfedge_handle org_he = he1, new_he = he2;
|
Halfedge_handle org_he = he1, new_he = he2;
|
||||||
|
|
||||||
if (org_he->is_decision_set())
|
if (org_he->is_decision_set()) {
|
||||||
{
|
|
||||||
new_he->set_decision(org_he->get_decision());
|
new_he->set_decision(org_he->get_decision());
|
||||||
new_he->twin()->set_decision(org_he->get_decision());
|
new_he->twin()->set_decision(org_he->get_decision());
|
||||||
new_vertex->set_decision(org_he->get_decision());
|
new_vertex->set_decision(org_he->get_decision());
|
||||||
}
|
}
|
||||||
if (org_he->get_aux_is_set(0))
|
if (org_he->get_aux_is_set(0)) {
|
||||||
{
|
|
||||||
new_vertex->set_aux_source(0, org_he->get_aux_source(0));
|
new_vertex->set_aux_source(0, org_he->get_aux_source(0));
|
||||||
new_he->set_aux_source(0, org_he->get_aux_source(0));
|
new_he->set_aux_source(0, org_he->get_aux_source(0));
|
||||||
new_he->twin()->set_aux_source(0, org_he->twin()->get_aux_source(0));
|
new_he->twin()->set_aux_source(0, org_he->twin()->get_aux_source(0));
|
||||||
}
|
}
|
||||||
if (org_he->get_aux_is_set(1))
|
if (org_he->get_aux_is_set(1)) {
|
||||||
{
|
|
||||||
new_vertex->set_aux_source(1, org_he->get_aux_source(1));
|
new_vertex->set_aux_source(1, org_he->get_aux_source(1));
|
||||||
new_he->set_aux_source(1, org_he->get_aux_source(1));
|
new_he->set_aux_source(1, org_he->get_aux_source(1));
|
||||||
new_he->twin()->set_aux_source(1, org_he->twin()->get_aux_source(1));
|
new_he->twin()->set_aux_source(1, org_he->twin()->get_aux_source(1));
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@
|
||||||
#include <CGAL/enum.h>
|
#include <CGAL/enum.h>
|
||||||
#include <CGAL/Unique_hash_map.h>
|
#include <CGAL/Unique_hash_map.h>
|
||||||
#include <CGAL/Arr_tags.h>
|
#include <CGAL/Arr_tags.h>
|
||||||
#include <CGAL/Arr_observer.h>
|
|
||||||
#include <CGAL/Arr_accessor.h>
|
#include <CGAL/Arr_accessor.h>
|
||||||
#include <CGAL/Arr_walk_along_line_point_location.h>
|
#include <CGAL/Arr_walk_along_line_point_location.h>
|
||||||
#include <CGAL/Arr_naive_point_location.h>
|
#include <CGAL/Arr_naive_point_location.h>
|
||||||
|
|
@ -96,7 +95,7 @@ protected:
|
||||||
typedef typename Minimization_diagram_2::Dcel::Dcel_data_iterator
|
typedef typename Minimization_diagram_2::Dcel::Dcel_data_iterator
|
||||||
Envelope_data_iterator;
|
Envelope_data_iterator;
|
||||||
|
|
||||||
typedef Arr_observer<Minimization_diagram_2> Md_observer;
|
typedef typename Minimization_diagram_2::Observer Md_observer;
|
||||||
typedef Arr_accessor<Minimization_diagram_2> Md_accessor;
|
typedef Arr_accessor<Minimization_diagram_2> Md_accessor;
|
||||||
|
|
||||||
typedef typename Topology_traits::Default_point_location_strategy
|
typedef typename Topology_traits::Default_point_location_strategy
|
||||||
|
|
@ -1979,14 +1978,13 @@ protected:
|
||||||
// so we can later identify all the faces that form the original given face
|
// so we can later identify all the faces that form the original given face
|
||||||
// it also should remember the edges of the face, that are also projected
|
// it also should remember the edges of the face, that are also projected
|
||||||
// intersections
|
// intersections
|
||||||
class Copied_face_observer : public Md_observer
|
class Copied_face_observer : public Md_observer {
|
||||||
|
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
typedef typename Minimization_diagram_2::Face_handle Face_handle;
|
using Base_aos = typename Minimization_diagram_2::Base_aos;
|
||||||
typedef typename Minimization_diagram_2::Halfedge_handle Halfedge_handle;
|
|
||||||
typedef typename Minimization_diagram_2::X_monotone_curve_2
|
using Face_handle = typename Base_aos::Face_handle;
|
||||||
X_monotone_curve_2;
|
using Halfedge_handle = typename Base_aos::Halfedge_handle;
|
||||||
|
using X_monotone_curve_2 = typename Base_aos::X_monotone_curve_2;
|
||||||
|
|
||||||
Copied_face_observer(Halfedges_map& map_h) : map_halfedges(map_h) {}
|
Copied_face_observer(Halfedges_map& map_h) : map_halfedges(map_h) {}
|
||||||
|
|
||||||
|
|
@ -1998,8 +1996,7 @@ protected:
|
||||||
Faces_hash& parts,
|
Faces_hash& parts,
|
||||||
Vertices_hash& boundaryv,
|
Vertices_hash& boundaryv,
|
||||||
Vertices_hash& specialv,
|
Vertices_hash& specialv,
|
||||||
Vertices_to_edges_map& v_to_h)
|
Vertices_to_edges_map& v_to_h) {
|
||||||
{
|
|
||||||
boundary_halfedges = &boundary;
|
boundary_halfedges = &boundary;
|
||||||
special_edges = &specialh;
|
special_edges = &specialh;
|
||||||
new_edges = &newh;
|
new_edges = &newh;
|
||||||
|
|
@ -2010,20 +2007,16 @@ protected:
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void after_split_face(Face_handle org_f,
|
virtual void after_split_face(Face_handle org_f,
|
||||||
Face_handle new_f, bool)
|
Face_handle new_f, bool) override {
|
||||||
{
|
|
||||||
// keep track of the face parts
|
// keep track of the face parts
|
||||||
if (face_parts->is_defined(org_f))
|
if (face_parts->is_defined(org_f))
|
||||||
(*face_parts)[new_f] = face_parts->default_value();
|
(*face_parts)[new_f] = face_parts->default_value();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void after_split_edge(Halfedge_handle org_he,
|
virtual void after_split_edge(Halfedge_handle org_he,
|
||||||
Halfedge_handle new_he)
|
Halfedge_handle new_he) override {
|
||||||
{
|
|
||||||
// take care of special edges that were split
|
// take care of special edges that were split
|
||||||
if (special_edges->is_defined(org_he))
|
if (special_edges->is_defined(org_he)) {
|
||||||
|
|
||||||
{
|
|
||||||
// if original edge was in the set, then now both split parts should
|
// if original edge was in the set, then now both split parts should
|
||||||
// be in the set
|
// be in the set
|
||||||
(*special_edges)[new_he] = special_edges->default_value();
|
(*special_edges)[new_he] = special_edges->default_value();
|
||||||
|
|
@ -2031,15 +2024,13 @@ protected:
|
||||||
}
|
}
|
||||||
|
|
||||||
// take care of new edges that were split
|
// take care of new edges that were split
|
||||||
if (new_edges->is_defined(org_he))
|
if (new_edges->is_defined(org_he)) {
|
||||||
{
|
|
||||||
(*new_edges)[new_he] = (*new_edges)[org_he];
|
(*new_edges)[new_he] = (*new_edges)[org_he];
|
||||||
(*new_edges)[new_he->twin()] = (*new_edges)[org_he];
|
(*new_edges)[new_he->twin()] = (*new_edges)[org_he];
|
||||||
}
|
}
|
||||||
|
|
||||||
// take care for boundary edges
|
// take care for boundary edges
|
||||||
if (boundary_halfedges->is_defined(org_he))
|
if (boundary_halfedges->is_defined(org_he)) {
|
||||||
{
|
|
||||||
(*boundary_halfedges)[new_he] = boundary_halfedges->default_value();
|
(*boundary_halfedges)[new_he] = boundary_halfedges->default_value();
|
||||||
(*boundary_halfedges)[new_he->twin()] =
|
(*boundary_halfedges)[new_he->twin()] =
|
||||||
boundary_halfedges->default_value();
|
boundary_halfedges->default_value();
|
||||||
|
|
@ -2066,8 +2057,7 @@ protected:
|
||||||
Halfedge_handle correct_side_he;
|
Halfedge_handle correct_side_he;
|
||||||
if (face_parts->is_defined(org_he->face()))
|
if (face_parts->is_defined(org_he->face()))
|
||||||
correct_side_he = org_he;
|
correct_side_he = org_he;
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
CGAL_assertion(face_parts->is_defined(new_he->twin()->face()));
|
CGAL_assertion(face_parts->is_defined(new_he->twin()->face()));
|
||||||
// new_he->twin() is directed as org_he, so on the boundary pointing
|
// new_he->twin() is directed as org_he, so on the boundary pointing
|
||||||
// inside the face, and has the new vertex as target
|
// inside the face, and has the new vertex as target
|
||||||
|
|
@ -2080,7 +2070,8 @@ protected:
|
||||||
//BZBZ
|
//BZBZ
|
||||||
/* CGAL_assertion(vertices_to_halfedges->is_defined(correct_side_he->source()) &&
|
/* CGAL_assertion(vertices_to_halfedges->is_defined(correct_side_he->source()) &&
|
||||||
vertices_to_halfedges->is_defined(correct_side_he->next()->target()));*/
|
vertices_to_halfedges->is_defined(correct_side_he->next()->target()));*/
|
||||||
(*vertices_to_halfedges)[correct_side_he->next()->target()] = correct_side_he->next();
|
(*vertices_to_halfedges)[correct_side_he->next()->target()] =
|
||||||
|
correct_side_he->next();
|
||||||
|
|
||||||
if (correct_side_he == org_he &&
|
if (correct_side_he == org_he &&
|
||||||
face_parts->is_defined(org_he->twin()->face()))
|
face_parts->is_defined(org_he->twin()->face()))
|
||||||
|
|
@ -2100,46 +2091,42 @@ protected:
|
||||||
Halfedges_map& map_halfedges;
|
Halfedges_map& map_halfedges;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// this observer is used in the process of resolving a face
|
// this observer is used in the process of resolving a face
|
||||||
// it listens to what happens in the copied arrangement, and copies back
|
// it listens to what happens in the copied arrangement, and copies back
|
||||||
// the actions to result arrangements very efficiently
|
// the actions to result arrangements very efficiently
|
||||||
class Copy_observer : public Md_observer
|
class Copy_observer : public Md_observer {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
typedef typename Minimization_diagram_2::Face_handle Face_handle;
|
using Base_aos = typename Minimization_diagram_2::Base_aos;
|
||||||
typedef typename Minimization_diagram_2::Halfedge_handle Halfedge_handle;
|
|
||||||
typedef typename Minimization_diagram_2::Vertex_handle Vertex_handle;
|
|
||||||
typedef typename Minimization_diagram_2::Point_2 Point_2;
|
|
||||||
typedef typename Minimization_diagram_2::X_monotone_curve_2
|
|
||||||
X_monotone_curve_2;
|
|
||||||
typedef typename Minimization_diagram_2::Ccb_halfedge_circulator
|
|
||||||
Ccb_halfedge_circulator;
|
|
||||||
|
|
||||||
typedef typename Traits::Left_side_category Left_side_category;
|
using Face_handle = typename Base_aos::Face_handle;
|
||||||
typedef typename Traits::Right_side_category Right_side_category;
|
using Halfedge_handle = typename Base_aos::Halfedge_handle;
|
||||||
typedef typename Traits::Top_side_category Top_side_category;
|
using Vertex_handle = typename Base_aos::Vertex_handle;
|
||||||
typedef typename Traits::Bottom_side_category Bottom_side_category;
|
using Point_2 = typename Base_aos::Point_2;
|
||||||
|
using X_monotone_curve_2 = typename Base_aos::X_monotone_curve_2;
|
||||||
|
using Ccb_halfedge_circulator = typename Base_aos::Ccb_halfedge_circulator;
|
||||||
|
|
||||||
|
using Left_side_category = typename Traits::Left_side_category;
|
||||||
|
using Right_side_category = typename Traits::Right_side_category;
|
||||||
|
using Top_side_category = typename Traits::Top_side_category;
|
||||||
|
using Bottom_side_category = typename Traits::Bottom_side_category;
|
||||||
|
|
||||||
Copy_observer(Minimization_diagram_2& small_,
|
Copy_observer(Minimization_diagram_2& small_,
|
||||||
Minimization_diagram_2& big,
|
Minimization_diagram_2& big,
|
||||||
Halfedges_map& map_h,
|
Halfedges_map& map_h,
|
||||||
Vertices_map& map_v,
|
Vertices_map& map_v,
|
||||||
Faces_map& map_f)
|
Faces_map& map_f) :
|
||||||
: small_arr(small_), big_arr(big),
|
small_arr(small_), big_arr(big),
|
||||||
big_arr_accessor(big_arr),
|
big_arr_accessor(big_arr),
|
||||||
map_halfedges(map_h),
|
map_halfedges(map_h),
|
||||||
map_vertices(map_v),
|
map_vertices(map_v),
|
||||||
map_faces(map_f)
|
map_faces(map_f)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
virtual ~Copy_observer() {}
|
virtual ~Copy_observer() {}
|
||||||
|
|
||||||
virtual void before_create_vertex (const Point_2& /* p */)
|
virtual void before_create_vertex (const Point_2& /* p */) override {}
|
||||||
{}
|
|
||||||
|
|
||||||
virtual void after_create_vertex (Vertex_handle v)
|
virtual void after_create_vertex (Vertex_handle v) override {
|
||||||
{
|
|
||||||
// should create a new vertex with v->point() inside
|
// should create a new vertex with v->point() inside
|
||||||
Vertex_handle new_v = big_arr_accessor.create_vertex(v->point());
|
Vertex_handle new_v = big_arr_accessor.create_vertex(v->point());
|
||||||
|
|
||||||
|
|
@ -2150,11 +2137,11 @@ protected:
|
||||||
new_vertices.push_back(v);
|
new_vertices.push_back(v);
|
||||||
}
|
}
|
||||||
|
|
||||||
void before_create_boundary_vertex (const X_monotone_curve_2& cv,
|
virtual void before_create_boundary_vertex(const X_monotone_curve_2& cv,
|
||||||
Arr_curve_end ind,
|
Arr_curve_end ind,
|
||||||
Arr_parameter_space in_ps_x,
|
Arr_parameter_space in_ps_x,
|
||||||
Arr_parameter_space in_ps_y)
|
Arr_parameter_space in_ps_y)
|
||||||
{
|
override {
|
||||||
boundary_vertex_cv = cv;
|
boundary_vertex_cv = cv;
|
||||||
boundary_vertex_ind = ind;
|
boundary_vertex_ind = ind;
|
||||||
ps_x = in_ps_x;
|
ps_x = in_ps_x;
|
||||||
|
|
@ -2164,8 +2151,7 @@ protected:
|
||||||
bool is_bounded_impl(Arr_open_side_tag) { return false; }
|
bool is_bounded_impl(Arr_open_side_tag) { return false; }
|
||||||
bool is_bounded_impl(Arr_boundary_side_tag) { return true; }
|
bool is_bounded_impl(Arr_boundary_side_tag) { return true; }
|
||||||
|
|
||||||
bool is_bounded()
|
bool is_bounded() {
|
||||||
{
|
|
||||||
// This is the case of create boundary vertex.
|
// This is the case of create boundary vertex.
|
||||||
CGAL_assertion((ps_x != ARR_INTERIOR) || (ps_y != ARR_INTERIOR));
|
CGAL_assertion((ps_x != ARR_INTERIOR) || (ps_y != ARR_INTERIOR));
|
||||||
|
|
||||||
|
|
@ -2185,8 +2171,7 @@ protected:
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void after_create_boundary_vertex(Vertex_handle v)
|
virtual void after_create_boundary_vertex(Vertex_handle v) override {
|
||||||
{
|
|
||||||
CGAL_assertion(big_arr.is_valid());
|
CGAL_assertion(big_arr.is_valid());
|
||||||
Vertex_handle new_v =
|
Vertex_handle new_v =
|
||||||
big_arr_accessor.create_boundary_vertex(boundary_vertex_cv,
|
big_arr_accessor.create_boundary_vertex(boundary_vertex_cv,
|
||||||
|
|
@ -2200,16 +2185,15 @@ protected:
|
||||||
map_vertices[v] = new_v;
|
map_vertices[v] = new_v;
|
||||||
}
|
}
|
||||||
|
|
||||||
void before_split_fictitious_edge(Halfedge_handle e,
|
virtual void
|
||||||
Vertex_handle v)
|
before_split_fictitious_edge(Halfedge_handle e, Vertex_handle v) override {
|
||||||
{
|
|
||||||
split_fict_v = v;
|
split_fict_v = v;
|
||||||
split_fict_e = e;
|
split_fict_e = e;
|
||||||
}
|
}
|
||||||
|
|
||||||
void after_split_fictitious_edge(Halfedge_handle e1,
|
virtual void
|
||||||
Halfedge_handle e2)
|
after_split_fictitious_edge(Halfedge_handle e1, Halfedge_handle e2)
|
||||||
{
|
override {
|
||||||
// find the corresponding split vertex in big_arr
|
// find the corresponding split vertex in big_arr
|
||||||
CGAL_assertion(map_vertices.is_defined(split_fict_v));
|
CGAL_assertion(map_vertices.is_defined(split_fict_v));
|
||||||
Vertex_handle big_v = map_vertices[split_fict_v];
|
Vertex_handle big_v = map_vertices[split_fict_v];
|
||||||
|
|
@ -2236,8 +2220,7 @@ protected:
|
||||||
|
|
||||||
virtual void before_create_edge(const X_monotone_curve_2& /* c */,
|
virtual void before_create_edge(const X_monotone_curve_2& /* c */,
|
||||||
Vertex_handle v1,
|
Vertex_handle v1,
|
||||||
Vertex_handle v2)
|
Vertex_handle v2) override {
|
||||||
{
|
|
||||||
// save state for after_create_edge event
|
// save state for after_create_edge event
|
||||||
create_edge_v1 = v1;
|
create_edge_v1 = v1;
|
||||||
create_edge_v2 = v2;
|
create_edge_v2 = v2;
|
||||||
|
|
@ -2245,9 +2228,7 @@ protected:
|
||||||
is_in_relocate = false;
|
is_in_relocate = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void after_create_edge(Halfedge_handle e)
|
virtual void after_create_edge(Halfedge_handle e) override {
|
||||||
|
|
||||||
{
|
|
||||||
// a new edge e was created in small_arr, we should create a corresponding
|
// a new edge e was created in small_arr, we should create a corresponding
|
||||||
// edge in big_arr
|
// edge in big_arr
|
||||||
CGAL_assertion(map_vertices.is_defined(create_edge_v1));
|
CGAL_assertion(map_vertices.is_defined(create_edge_v1));
|
||||||
|
|
@ -2261,18 +2242,14 @@ protected:
|
||||||
// if we have 2 new vertices, they must be new.
|
// if we have 2 new vertices, they must be new.
|
||||||
// if we have only one, we should check which is new
|
// if we have only one, we should check which is new
|
||||||
bool v1_is_new = false, v2_is_new = false;
|
bool v1_is_new = false, v2_is_new = false;
|
||||||
if (new_vertices.size() == 1)
|
if (new_vertices.size() == 1) {
|
||||||
{
|
if (new_vertices.back() == create_edge_v1) v1_is_new = true;
|
||||||
if (new_vertices.back() == create_edge_v1)
|
else {
|
||||||
v1_is_new = true;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
CGAL_assertion(new_vertices.back() == create_edge_v2);
|
CGAL_assertion(new_vertices.back() == create_edge_v2);
|
||||||
v2_is_new = true;
|
v2_is_new = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (new_vertices.size() == 2)
|
if (new_vertices.size() == 2) {
|
||||||
{
|
|
||||||
v1_is_new = true;
|
v1_is_new = true;
|
||||||
v2_is_new = true;
|
v2_is_new = true;
|
||||||
}
|
}
|
||||||
|
|
@ -2286,15 +2263,13 @@ protected:
|
||||||
|
|
||||||
// if an endpoint is not new, but is isolated, we should remove it from
|
// if an endpoint is not new, but is isolated, we should remove it from
|
||||||
// its face's isolated vertices list, and treat it as new
|
// its face's isolated vertices list, and treat it as new
|
||||||
if (!v1_is_new && big_v1->is_isolated())
|
if (!v1_is_new && big_v1->is_isolated()) {
|
||||||
{
|
|
||||||
//Face_handle f = big_v1->face(); //big_arr.incident_face(big_v1);
|
//Face_handle f = big_v1->face(); //big_arr.incident_face(big_v1);
|
||||||
//big_arr_accessor.find_and_erase_isolated_vertex(f, big_v1);
|
//big_arr_accessor.find_and_erase_isolated_vertex(f, big_v1);
|
||||||
big_arr_accessor.remove_isolated_vertex_ex(big_v1);
|
big_arr_accessor.remove_isolated_vertex_ex(big_v1);
|
||||||
v1_is_new = true;
|
v1_is_new = true;
|
||||||
}
|
}
|
||||||
if (!v2_is_new && big_v2->is_isolated())
|
if (! v2_is_new && big_v2->is_isolated()) {
|
||||||
{
|
|
||||||
//Face_handle f = big_v2->face(); //big_arr.incident_face(big_v2);
|
//Face_handle f = big_v2->face(); //big_arr.incident_face(big_v2);
|
||||||
//big_arr_accessor.find_and_erase_isolated_vertex(f, big_v2);
|
//big_arr_accessor.find_and_erase_isolated_vertex(f, big_v2);
|
||||||
big_arr_accessor.remove_isolated_vertex_ex(big_v2);
|
big_arr_accessor.remove_isolated_vertex_ex(big_v2);
|
||||||
|
|
@ -2302,8 +2277,7 @@ protected:
|
||||||
}
|
}
|
||||||
|
|
||||||
// now use the approppriate method to insert the new edge
|
// now use the approppriate method to insert the new edge
|
||||||
if (v1_is_new && v2_is_new)
|
if (v1_is_new && v2_is_new) {
|
||||||
{
|
|
||||||
// if both vertices are new - use the O(1) operation
|
// if both vertices are new - use the O(1) operation
|
||||||
// _insert_in_face_interior (in the face mapped to by he->face())
|
// _insert_in_face_interior (in the face mapped to by he->face())
|
||||||
CGAL_assertion(map_faces.is_defined(he->face()));
|
CGAL_assertion(map_faces.is_defined(he->face()));
|
||||||
|
|
@ -2320,8 +2294,7 @@ protected:
|
||||||
map_halfedges[he] = new_he;
|
map_halfedges[he] = new_he;
|
||||||
map_halfedges[he->twin()] = new_he->twin();
|
map_halfedges[he->twin()] = new_he->twin();
|
||||||
}
|
}
|
||||||
else if (!v1_is_new && !v2_is_new)
|
else if (! v1_is_new && !v2_is_new) {
|
||||||
{
|
|
||||||
// if both vertices are old - use _insert_at_vertices
|
// if both vertices are old - use _insert_at_vertices
|
||||||
// this is a linear action by the size of the faces involved
|
// this is a linear action by the size of the faces involved
|
||||||
// we can get relevant prev halfedges from he
|
// we can get relevant prev halfedges from he
|
||||||
|
|
@ -2361,8 +2334,7 @@ protected:
|
||||||
|
|
||||||
// if a new face was created update its mapping too
|
// if a new face was created update its mapping too
|
||||||
// the new face is the incident face of he
|
// the new face is the incident face of he
|
||||||
if (new_face)
|
if (new_face) {
|
||||||
{
|
|
||||||
map_faces[he->face()] = new_he->face();
|
map_faces[he->face()] = new_he->face();
|
||||||
// save state for move_hole/move_isolated_vertex events
|
// save state for move_hole/move_isolated_vertex events
|
||||||
is_in_relocate = true;
|
is_in_relocate = true;
|
||||||
|
|
@ -2373,16 +2345,14 @@ protected:
|
||||||
CGAL_assertion(map_faces.is_defined(he->face()) &&
|
CGAL_assertion(map_faces.is_defined(he->face()) &&
|
||||||
map_faces[he->face()] == new_he->face());
|
map_faces[he->face()] == new_he->face());
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
// only one vertex is new - use the O(1) operation _insert_from_vertex
|
// only one vertex is new - use the O(1) operation _insert_from_vertex
|
||||||
// we can get the relevant prev halfedge from e
|
// we can get the relevant prev halfedge from e
|
||||||
Halfedge_handle prev = he->prev();
|
Halfedge_handle prev = he->prev();
|
||||||
CGAL_assertion(map_halfedges.is_defined(prev));
|
CGAL_assertion(map_halfedges.is_defined(prev));
|
||||||
Halfedge_handle big_prev = map_halfedges[prev];
|
Halfedge_handle big_prev = map_halfedges[prev];
|
||||||
Halfedge_handle new_he;
|
Halfedge_handle new_he;
|
||||||
if (!v1_is_new)
|
if (!v1_is_new) {
|
||||||
{
|
|
||||||
new_he = big_arr_accessor.insert_from_vertex_ex(big_prev,
|
new_he = big_arr_accessor.insert_from_vertex_ex(big_prev,
|
||||||
he->curve(), (HE_COMP_RES(he) == SMALLER ? ARR_LEFT_TO_RIGHT : ARR_RIGHT_TO_LEFT),
|
he->curve(), (HE_COMP_RES(he) == SMALLER ? ARR_LEFT_TO_RIGHT : ARR_RIGHT_TO_LEFT),
|
||||||
big_v2);
|
big_v2);
|
||||||
|
|
@ -2392,8 +2362,7 @@ protected:
|
||||||
map_halfedges[he] = new_he;
|
map_halfedges[he] = new_he;
|
||||||
map_halfedges[he->twin()] = new_he->twin();
|
map_halfedges[he->twin()] = new_he->twin();
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
new_he =
|
new_he =
|
||||||
big_arr_accessor.insert_from_vertex_ex(big_prev,
|
big_arr_accessor.insert_from_vertex_ex(big_prev,
|
||||||
he->curve(), (HE_COMP_RES(he->twin()) == SMALLER ? ARR_LEFT_TO_RIGHT : ARR_RIGHT_TO_LEFT),
|
he->curve(), (HE_COMP_RES(he->twin()) == SMALLER ? ARR_LEFT_TO_RIGHT : ARR_RIGHT_TO_LEFT),
|
||||||
|
|
@ -2411,14 +2380,13 @@ protected:
|
||||||
Vertex_handle v,
|
Vertex_handle v,
|
||||||
const X_monotone_curve_2& /* c1 */,
|
const X_monotone_curve_2& /* c1 */,
|
||||||
const X_monotone_curve_2& /* c2 */)
|
const X_monotone_curve_2& /* c2 */)
|
||||||
{
|
override {
|
||||||
// save state info for using _split_edge in after event
|
// save state info for using _split_edge in after event
|
||||||
split_v = v;
|
split_v = v;
|
||||||
split_e = e;
|
split_e = e;
|
||||||
}
|
}
|
||||||
virtual void after_split_edge (Halfedge_handle e1,
|
virtual void after_split_edge(Halfedge_handle e1,
|
||||||
Halfedge_handle e2)
|
Halfedge_handle e2) override {
|
||||||
{
|
|
||||||
// find the corresponding split vertex in big_arr
|
// find the corresponding split vertex in big_arr
|
||||||
CGAL_assertion(map_vertices.is_defined(split_v));
|
CGAL_assertion(map_vertices.is_defined(split_v));
|
||||||
Vertex_handle big_v = map_vertices[split_v];
|
Vertex_handle big_v = map_vertices[split_v];
|
||||||
|
|
@ -2449,11 +2417,10 @@ protected:
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void before_add_isolated_vertex(Face_handle f,
|
virtual void before_add_isolated_vertex(Face_handle f,
|
||||||
Vertex_handle /* v */)
|
Vertex_handle /* v */) override
|
||||||
{
|
{ saved_face = f; }
|
||||||
saved_face = f;
|
|
||||||
}
|
virtual void after_add_isolated_vertex(Vertex_handle v) override
|
||||||
virtual void after_add_isolated_vertex(Vertex_handle v)
|
|
||||||
{
|
{
|
||||||
// make sure it is the only new vertex right now
|
// make sure it is the only new vertex right now
|
||||||
CGAL_assertion(new_vertices.size() == 1 &&
|
CGAL_assertion(new_vertices.size() == 1 &&
|
||||||
|
|
@ -2476,15 +2443,14 @@ protected:
|
||||||
|
|
||||||
virtual void before_move_inner_ccb(Face_handle from_f,
|
virtual void before_move_inner_ccb(Face_handle from_f,
|
||||||
Face_handle to_f,
|
Face_handle to_f,
|
||||||
Ccb_halfedge_circulator )
|
Ccb_halfedge_circulator) override {
|
||||||
{
|
|
||||||
// should be used after insert_at_vertices which creates a new face
|
// should be used after insert_at_vertices which creates a new face
|
||||||
CGAL_assertion(is_in_relocate);
|
CGAL_assertion(is_in_relocate);
|
||||||
move_from = from_f;
|
move_from = from_f;
|
||||||
move_to = to_f;
|
move_to = to_f;
|
||||||
}
|
}
|
||||||
virtual void after_move_inner_ccb(Ccb_halfedge_circulator h)
|
|
||||||
{
|
virtual void after_move_inner_ccb(Ccb_halfedge_circulator h) override {
|
||||||
CGAL_assertion(map_faces.is_defined(move_from));
|
CGAL_assertion(map_faces.is_defined(move_from));
|
||||||
CGAL_assertion(map_faces.is_defined(move_to));
|
CGAL_assertion(map_faces.is_defined(move_to));
|
||||||
CGAL_assertion(map_halfedges.is_defined(h));
|
CGAL_assertion(map_halfedges.is_defined(h));
|
||||||
|
|
@ -2501,16 +2467,14 @@ protected:
|
||||||
|
|
||||||
virtual void before_move_isolated_vertex(Face_handle from_f,
|
virtual void before_move_isolated_vertex(Face_handle from_f,
|
||||||
Face_handle to_f,
|
Face_handle to_f,
|
||||||
Vertex_handle )
|
Vertex_handle) override {
|
||||||
{
|
|
||||||
// should be used after insert_at_vertices which creates a new face
|
// should be used after insert_at_vertices which creates a new face
|
||||||
|
|
||||||
CGAL_assertion(is_in_relocate);
|
CGAL_assertion(is_in_relocate);
|
||||||
move_from = from_f;
|
move_from = from_f;
|
||||||
move_to = to_f;
|
move_to = to_f;
|
||||||
}
|
}
|
||||||
virtual void after_move_isolated_vertex(Vertex_handle v)
|
virtual void after_move_isolated_vertex(Vertex_handle v) override {
|
||||||
{
|
|
||||||
CGAL_assertion(map_faces.is_defined(move_from));
|
CGAL_assertion(map_faces.is_defined(move_from));
|
||||||
CGAL_assertion(map_faces.is_defined(move_to));
|
CGAL_assertion(map_faces.is_defined(move_to));
|
||||||
CGAL_assertion(map_vertices.is_defined(v));
|
CGAL_assertion(map_vertices.is_defined(v));
|
||||||
|
|
@ -2525,12 +2489,12 @@ protected:
|
||||||
protected:
|
protected:
|
||||||
Minimization_diagram_2& small_arr;
|
Minimization_diagram_2& small_arr;
|
||||||
Minimization_diagram_2& big_arr;
|
Minimization_diagram_2& big_arr;
|
||||||
Md_accessor big_arr_accessor;
|
Md_accessor big_arr_accessor;
|
||||||
|
|
||||||
// mappings between small_arr features to big_arr features
|
// mappings between small_arr features to big_arr features
|
||||||
Halfedges_map& map_halfedges;
|
Halfedges_map& map_halfedges;
|
||||||
Vertices_map& map_vertices;
|
Vertices_map& map_vertices;
|
||||||
Faces_map& map_faces;
|
Faces_map& map_faces;
|
||||||
std::deque<Vertex_handle> new_vertices;
|
std::deque<Vertex_handle> new_vertices;
|
||||||
|
|
||||||
// state for actions
|
// state for actions
|
||||||
|
|
@ -2538,25 +2502,23 @@ protected:
|
||||||
Vertex_handle create_edge_v2;
|
Vertex_handle create_edge_v2;
|
||||||
Vertex_handle split_v, split_fict_v;
|
Vertex_handle split_v, split_fict_v;
|
||||||
Halfedge_handle split_e, split_fict_e;
|
Halfedge_handle split_e, split_fict_e;
|
||||||
Face_handle saved_face;
|
Face_handle saved_face;
|
||||||
Face_handle move_from;
|
Face_handle move_from;
|
||||||
Face_handle move_to;
|
Face_handle move_to;
|
||||||
|
|
||||||
// for the create_vertex call-back
|
// for the create_vertex call-back
|
||||||
X_monotone_curve_2 boundary_vertex_cv;
|
X_monotone_curve_2 boundary_vertex_cv;
|
||||||
Arr_curve_end boundary_vertex_ind;
|
Arr_curve_end boundary_vertex_ind;
|
||||||
Arr_parameter_space ps_x;
|
Arr_parameter_space ps_x;
|
||||||
Arr_parameter_space ps_y;
|
Arr_parameter_space ps_y;
|
||||||
bool is_in_relocate;
|
bool is_in_relocate;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// A zone visitor for the Minimization Diagram which only inserts
|
// A zone visitor for the Minimization Diagram which only inserts
|
||||||
// parts of the curve which are inside a given face
|
// parts of the curve which are inside a given face
|
||||||
// it also remembers those parts which overlap the boundary of the original
|
// it also remembers those parts which overlap the boundary of the original
|
||||||
// face
|
// face
|
||||||
class Copied_face_zone_visitor
|
class Copied_face_zone_visitor {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
typedef typename Minimization_diagram_2::Vertex_handle Vertex_handle;
|
typedef typename Minimization_diagram_2::Vertex_handle Vertex_handle;
|
||||||
typedef typename Minimization_diagram_2::Halfedge_handle Halfedge_handle;
|
typedef typename Minimization_diagram_2::Halfedge_handle Halfedge_handle;
|
||||||
|
|
@ -2640,7 +2602,7 @@ protected:
|
||||||
// the zone visitor functions
|
// the zone visitor functions
|
||||||
|
|
||||||
/*! Initialize the visitor with an arrangement object. */
|
/*! Initialize the visitor with an arrangement object. */
|
||||||
void init (Minimization_diagram_2* arr)
|
void init(Minimization_diagram_2* arr)
|
||||||
{
|
{
|
||||||
CGAL_assertion(&copied_arr == arr);
|
CGAL_assertion(&copied_arr == arr);
|
||||||
insert_visitor.init(arr);
|
insert_visitor.init(arr);
|
||||||
|
|
@ -2822,8 +2784,7 @@ protected:
|
||||||
result_new_he->twin()->set_has_equal_aux_data_in_target_and_face(1, flag);
|
result_new_he->twin()->set_has_equal_aux_data_in_target_and_face(1, flag);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
result_new_he->twin()->set_is_equal_aux_data_in_target(0, true);
|
result_new_he->twin()->set_is_equal_aux_data_in_target(0, true);
|
||||||
result_new_he->twin()->set_is_equal_aux_data_in_target(1, true);
|
result_new_he->twin()->set_is_equal_aux_data_in_target(1, true);
|
||||||
result_new_he->twin()->set_has_equal_aux_data_in_target(0, true);
|
result_new_he->twin()->set_has_equal_aux_data_in_target(0, true);
|
||||||
|
|
@ -2834,8 +2795,7 @@ protected:
|
||||||
|
|
||||||
return base_result;
|
return base_result;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
|
||||||
// we don't insert the subcurve, but it might touch a vertex of the
|
// we don't insert the subcurve, but it might touch a vertex of the
|
||||||
// face's boundary - we need to check it and identify special vertices
|
// face's boundary - we need to check it and identify special vertices
|
||||||
if (left_v != Vertex_handle(nullptr) &&
|
if (left_v != Vertex_handle(nullptr) &&
|
||||||
|
|
@ -2853,8 +2813,7 @@ protected:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*! Handle the a subcurve that overlaps a given edge.
|
||||||
* Handle the a subcurve that overlaps a given edge.
|
|
||||||
* \param cv The overlapping subcurve.
|
* \param cv The overlapping subcurve.
|
||||||
* \param he The overlapped halfedge (directed from left to right).
|
* \param he The overlapped halfedge (directed from left to right).
|
||||||
* \param left_v The vertex that corresponds to the left endpoint of cv
|
* \param left_v The vertex that corresponds to the left endpoint of cv
|
||||||
|
|
@ -2907,7 +2866,6 @@ protected:
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
||||||
* Handle point that lies inside a given face.
|
* Handle point that lies inside a given face.
|
||||||
* \param p The point.
|
* \param p The point.
|
||||||
* \param face The face inside which the point lies.
|
* \param face The face inside which the point lies.
|
||||||
|
|
@ -3135,18 +3093,18 @@ protected:
|
||||||
Vertices_list& result_special_vertices;
|
Vertices_list& result_special_vertices;
|
||||||
|
|
||||||
// helper collections (for copied_arr features)
|
// helper collections (for copied_arr features)
|
||||||
Halfedges_hash copied_arr_boundary_halfedges;
|
Halfedges_hash copied_arr_boundary_halfedges;
|
||||||
Vertices_hash copied_arr_orig_vertices;
|
Vertices_hash copied_arr_orig_vertices;
|
||||||
Vertices_hash copied_arr_new_boundary_vertices;
|
Vertices_hash copied_arr_new_boundary_vertices;
|
||||||
Vertices_to_edges_map copied_vertices_to_halfedges;
|
Vertices_to_edges_map copied_vertices_to_halfedges;
|
||||||
|
|
||||||
Halfedges_hash copied_arr_special_edges;
|
Halfedges_hash copied_arr_special_edges;
|
||||||
Halfedges_hash_w_type copied_arr_new_edges;
|
Halfedges_hash_w_type copied_arr_new_edges;
|
||||||
Faces_hash copied_face_parts;
|
Faces_hash copied_face_parts;
|
||||||
Vertices_hash copied_arr_special_vertices;
|
Vertices_hash copied_arr_special_vertices;
|
||||||
|
|
||||||
// this observer will take care of the result arrangegment
|
// this observer will take care of the result arrangegment
|
||||||
Copy_observer md_copy_observer;
|
Copy_observer md_copy_observer;
|
||||||
|
|
||||||
// this observer will keep all our information in the helper collections
|
// this observer will keep all our information in the helper collections
|
||||||
// during the insert process
|
// during the insert process
|
||||||
|
|
@ -3161,26 +3119,23 @@ protected:
|
||||||
};
|
};
|
||||||
|
|
||||||
// this minimization diagram observer updates data in new faces created
|
// this minimization diagram observer updates data in new faces created
|
||||||
class New_faces_observer : public Md_observer
|
class New_faces_observer : public Md_observer {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
typedef typename Minimization_diagram_2::Face_handle Face_handle;
|
using Base_aos = typename Minimization_diagram_2::Base_aos;
|
||||||
|
using Face_handle = typename Base_aos::Face_handle;
|
||||||
|
|
||||||
New_faces_observer(Minimization_diagram_2& arr) : Md_observer(arr) {}
|
New_faces_observer(Base_aos& arr) : Md_observer(arr) {}
|
||||||
|
|
||||||
virtual ~New_faces_observer() {}
|
virtual ~New_faces_observer() {}
|
||||||
|
|
||||||
virtual void after_split_face(Face_handle org_f,
|
virtual void after_split_face(Face_handle org_f, Face_handle new_f, bool)
|
||||||
Face_handle new_f,
|
override {
|
||||||
bool)
|
|
||||||
{
|
|
||||||
// update the new face's aux_data from original face
|
// update the new face's aux_data from original face
|
||||||
if (org_f->get_aux_is_set(0))
|
if (org_f->get_aux_is_set(0))
|
||||||
new_f->set_aux_source(0, org_f->get_aux_source(0));
|
new_f->set_aux_source(0, org_f->get_aux_source(0));
|
||||||
if (org_f->get_aux_is_set(1))
|
if (org_f->get_aux_is_set(1))
|
||||||
new_f->set_aux_source(1, org_f->get_aux_source(1));
|
new_f->set_aux_source(1, org_f->get_aux_source(1));
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//! The geometry traits object.
|
//! The geometry traits object.
|
||||||
|
|
|
||||||
|
|
@ -6,11 +6,10 @@ project(Envelope_3_Tests)
|
||||||
|
|
||||||
find_package(CGAL REQUIRED COMPONENTS Core)
|
find_package(CGAL REQUIRED COMPONENTS Core)
|
||||||
|
|
||||||
# create a target per cppfile
|
create_single_source_cgal_program("triangles_test.cpp")
|
||||||
file(
|
|
||||||
GLOB cppfiles
|
if (CGAL_Core_FOUND)
|
||||||
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
|
create_single_source_cgal_program("spheres_test.cpp")
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
|
else()
|
||||||
foreach(cppfile ${cppfiles})
|
message("NOTICE: A test requires CGAL_Core, and will not be compiled.")
|
||||||
create_single_source_cgal_program("${cppfile}")
|
endif()
|
||||||
endforeach()
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
int main ()
|
int main ()
|
||||||
{
|
{
|
||||||
bool UNTESTED_TRAITS_AS_CORE_IS_NOT_ISTALLED;
|
bool UNTESTED_TRAITS_AS_CORE_IS_NOT_INSTALLED;
|
||||||
std::cout << std::endl
|
std::cout << std::endl
|
||||||
<< "WARNING: Core is not installed, "
|
<< "WARNING: Core is not installed, "
|
||||||
<< "skipping the test ..."
|
<< "skipping the test ..."
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
//
|
//
|
||||||
// $URL$
|
// $URL$
|
||||||
// $Id$
|
// $Id$
|
||||||
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Author(s) : Laurent Rineau
|
// Author(s) : Laurent Rineau
|
||||||
|
|
@ -12,6 +12,9 @@
|
||||||
#ifndef CGAL_QT_CONFIG_H
|
#ifndef CGAL_QT_CONFIG_H
|
||||||
#define CGAL_QT_CONFIG_H
|
#define CGAL_QT_CONFIG_H
|
||||||
|
|
||||||
|
#include <CGAL/license/GraphicsView.h>
|
||||||
|
|
||||||
|
|
||||||
#include <QtCore/qglobal.h>
|
#include <QtCore/qglobal.h>
|
||||||
|
|
||||||
#if defined(CGAL_Qt6_DLL)
|
#if defined(CGAL_Qt6_DLL)
|
||||||
|
|
|
||||||
|
|
@ -5,13 +5,16 @@
|
||||||
//
|
//
|
||||||
// $URL$
|
// $URL$
|
||||||
// $Id$
|
// $Id$
|
||||||
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Author(s) : Laurent Rineau and Maxime Gimeno
|
// Author(s) : Laurent Rineau and Maxime Gimeno
|
||||||
#ifndef CGAL_QT_CREATE_OPENGL_CONTEXT_H
|
#ifndef CGAL_QT_CREATE_OPENGL_CONTEXT_H
|
||||||
#define CGAL_QT_CREATE_OPENGL_CONTEXT_H
|
#define CGAL_QT_CREATE_OPENGL_CONTEXT_H
|
||||||
|
|
||||||
|
#include <CGAL/license/GraphicsView.h>
|
||||||
|
|
||||||
|
|
||||||
#include <QOpenGLContext>
|
#include <QOpenGLContext>
|
||||||
|
|
||||||
namespace CGAL{
|
namespace CGAL{
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
//
|
//
|
||||||
// $URL$
|
// $URL$
|
||||||
// $Id$
|
// $Id$
|
||||||
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Author(s) : Laurent Rineau
|
// Author(s) : Laurent Rineau
|
||||||
|
|
@ -12,6 +12,9 @@
|
||||||
#ifndef CGAL_AUTO_LINK_QT_H
|
#ifndef CGAL_AUTO_LINK_QT_H
|
||||||
#define CGAL_AUTO_LINK_QT_H
|
#define CGAL_AUTO_LINK_QT_H
|
||||||
|
|
||||||
|
#include <CGAL/license/GraphicsView.h>
|
||||||
|
|
||||||
|
|
||||||
#include <CGAL/config.h>
|
#include <CGAL/config.h>
|
||||||
#include <QtCore/qglobal.h>
|
#include <QtCore/qglobal.h>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
//
|
//
|
||||||
// $URL$
|
// $URL$
|
||||||
// $Id$
|
// $Id$
|
||||||
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
|
// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-Commercial
|
||||||
//
|
//
|
||||||
//
|
//
|
||||||
// Author(s) : Andreas Fabri
|
// Author(s) : Andreas Fabri
|
||||||
|
|
@ -12,6 +12,9 @@
|
||||||
#ifndef CGAL_QT_EXPORT_H
|
#ifndef CGAL_QT_EXPORT_H
|
||||||
#define CGAL_QT_EXPORT_H
|
#define CGAL_QT_EXPORT_H
|
||||||
|
|
||||||
|
#include <CGAL/license/GraphicsView.h>
|
||||||
|
|
||||||
|
|
||||||
#include <CGAL/config.h>
|
#include <CGAL/config.h>
|
||||||
#include <CGAL/export/helpers.h>
|
#include <CGAL/export/helpers.h>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,2 @@
|
||||||
GPL (v3 or later)
|
GPL (v3 or later)
|
||||||
LGPL (v3 or later)
|
|
||||||
UNKNOWN
|
UNKNOWN
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,11 @@ cmake_minimum_required(VERSION 3.1...3.23)
|
||||||
project(Hyperbolic_triangulation_2_Examples)
|
project(Hyperbolic_triangulation_2_Examples)
|
||||||
|
|
||||||
find_package(CGAL REQUIRED COMPONENTS Core)
|
find_package(CGAL REQUIRED COMPONENTS Core)
|
||||||
|
find_package(LEDA QUIET)
|
||||||
|
|
||||||
create_single_source_cgal_program("ht2_example.cpp")
|
if (CGAL_Core_FOUND OR LEDA_FOUND)
|
||||||
create_single_source_cgal_program("ht2_example_color.cpp")
|
create_single_source_cgal_program("ht2_example.cpp")
|
||||||
|
create_single_source_cgal_program("ht2_example_color.cpp")
|
||||||
|
else()
|
||||||
|
message("NOTICE: Examples require CGAL_Core (or LEDA), and will not be compiled.")
|
||||||
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,16 @@ cmake_minimum_required(VERSION 3.1...3.23)
|
||||||
project(Hyperbolic_triangulation_2_Tests)
|
project(Hyperbolic_triangulation_2_Tests)
|
||||||
|
|
||||||
find_package(CGAL REQUIRED COMPONENTS Core)
|
find_package(CGAL REQUIRED COMPONENTS Core)
|
||||||
|
find_package(LEDA QUIET)
|
||||||
|
|
||||||
create_single_source_cgal_program("ht2_test_clear.cpp")
|
if (CGAL_Core_FOUND OR LEDA_FOUND)
|
||||||
create_single_source_cgal_program("ht2_test_locate.cpp")
|
create_single_source_cgal_program("ht2_test_clear.cpp")
|
||||||
create_single_source_cgal_program("ht2_test_remove.cpp")
|
create_single_source_cgal_program("ht2_test_locate.cpp")
|
||||||
create_single_source_cgal_program("ht2_test_swap.cpp")
|
create_single_source_cgal_program("ht2_test_remove.cpp")
|
||||||
create_single_source_cgal_program("ht2_test_copy.cpp")
|
create_single_source_cgal_program("ht2_test_swap.cpp")
|
||||||
create_single_source_cgal_program("ht2_test_hyperbolic_circulator.cpp")
|
create_single_source_cgal_program("ht2_test_copy.cpp")
|
||||||
create_single_source_cgal_program("ht2_test_insert_degenerate.cpp")
|
create_single_source_cgal_program("ht2_test_hyperbolic_circulator.cpp")
|
||||||
|
create_single_source_cgal_program("ht2_test_insert_degenerate.cpp")
|
||||||
|
else()
|
||||||
|
message("NOTICE: Tests require CGAL_Core (or LEDA), and will not be compiled.")
|
||||||
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -23,6 +23,8 @@ Release date: October 2023
|
||||||
`std::variant`. The support for the old macro `CGAL_ARR_POINT_LOCATION_VERSION`
|
`std::variant`. The support for the old macro `CGAL_ARR_POINT_LOCATION_VERSION`
|
||||||
has been removed.
|
has been removed.
|
||||||
|
|
||||||
|
- Eliminated the error-prone c-type casting that was used to define observers. In general, backward compatibility was maintained; however, the former class template `Arr_observer` was replaced by an alias template. (The former class Arr_observer was renamed to Aos_observer).
|
||||||
|
|
||||||
#### Envelopes of Surfaces in 3D
|
#### Envelopes of Surfaces in 3D
|
||||||
- **Breaking change**: Construct_projected_boundary_2 in `EnvelopeTraits_3` is now using `std::variant` instead of `Object`
|
- **Breaking change**: Construct_projected_boundary_2 in `EnvelopeTraits_3` is now using `std::variant` instead of `Object`
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -592,10 +592,9 @@ set(CGAL_INSTALL_LIB_DIR
|
||||||
)
|
)
|
||||||
|
|
||||||
if(CGAL_WIN32_CMAKE_ON_CYGWIN)
|
if(CGAL_WIN32_CMAKE_ON_CYGWIN)
|
||||||
exec_program(
|
execute_process(COMMAND cygpath -w ${CMAKE_INSTALL_PREFIX}
|
||||||
cygpath ARGS
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
-w "${CMAKE_INSTALL_PREFIX}"
|
OUTPUT_VARIABLE CMAKE_INSTALL_PREFIX2)
|
||||||
OUTPUT_VARIABLE CMAKE_INSTALL_PREFIX2)
|
|
||||||
file(TO_CMAKE_PATH ${CMAKE_INSTALL_PREFIX2} CMAKE_INSTALL_PREFIX)
|
file(TO_CMAKE_PATH ${CMAKE_INSTALL_PREFIX2} CMAKE_INSTALL_PREFIX)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,32 +0,0 @@
|
||||||
README
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
This distribution of CGAL includes:
|
|
||||||
|
|
||||||
AUTHORS - current and former authors of CGAL
|
|
||||||
CHANGES - history of changes for the library
|
|
||||||
CMakeLists.txt - main script of the build system
|
|
||||||
INSTALL.md - information about the installation process
|
|
||||||
LICENSE - describes the license of CGAL
|
|
||||||
LICENSE.FREE_USE - text of the free use license (see LICENSE file)
|
|
||||||
LICENSE.GPL - text of GPL v3 license
|
|
||||||
LICENSE.LGPL - text of LGPL v3 license
|
|
||||||
README - this file
|
|
||||||
VERSION - version number of this release
|
|
||||||
auxiliary/ - directory containing miscellaneous things, currently only
|
|
||||||
the icons needed for the demos on MacOS X
|
|
||||||
cmake/ - some scripts needed by the build system
|
|
||||||
config/ - some test programs used during the configuration process
|
|
||||||
demo/ - many demo programs for the library's various packages.
|
|
||||||
These programs produce visual output (see INSTALL for
|
|
||||||
prerequisites).
|
|
||||||
doc_html/ - documentation, e.g. the CGAL Installation Guide
|
|
||||||
examples/ - programs illustrating the library's functionality.
|
|
||||||
These programs do not produce visual output.
|
|
||||||
include/ - the include files for the CGAL library (and other small
|
|
||||||
external libraries as well, see the LICENSE file)
|
|
||||||
scripts/ - some useful scripts for CGAL programmers
|
|
||||||
src/ - the source code for building the CGAL libraries
|
|
||||||
(as well as some external libraries, see the LICENSE file)
|
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
|
|
@ -0,0 +1,32 @@
|
||||||
|
README
|
||||||
|
======
|
||||||
|
|
||||||
|
This distribution of CGAL includes:
|
||||||
|
|
||||||
|
| File or directory | Description |
|
||||||
|
|-------------------|--------------------------------------------------------------------------------------------------|
|
||||||
|
| `AUTHORS` | current and former authors of CGAL |
|
||||||
|
| `CHANGES.md` | history of changes of CGAL |
|
||||||
|
| `CGALConfig.cmake`| [CMake package] configuration file for CGAL |
|
||||||
|
| `CGALConfigVersion.cmake` | [CMake package] version file for CGAL |
|
||||||
|
| `CMakeLists.txt` | main CMake project configuration file |
|
||||||
|
| `INSTALL.md` | information about the installation process |
|
||||||
|
| `LICENSE` | describes the license of CGAL |
|
||||||
|
| `LICENSE.BSL` | text of the Boost Software License (BSL) license |
|
||||||
|
| `LICENSE.COMMERCIAL` | text of the GeometryFactory Commercial license |
|
||||||
|
| `LICENSE.GPL` | text of the GNU General Public License (GPL) v3 license |
|
||||||
|
| `LICENSE.LGPL` | text of the GNU Lesser General Public License (LGPL) v3 license |
|
||||||
|
| `LICENSE.RFL` | text of the ETH Zurich Random Forest algorithm License (RFL) license |
|
||||||
|
| `README.md` | this file |
|
||||||
|
| `VERSION` | version number of this release of CGAL |
|
||||||
|
| `auxiliary/` | directory containing miscellaneous things, such as icons needed for the demos on macOS |
|
||||||
|
| `cmake/` | some scripts needed by the CMake build system |
|
||||||
|
| `data/` | directory containing various geometric data used by examples and demos of CGAL |
|
||||||
|
| `demo/` | many demo programs for the various packages of CGAL. These programs produce visual output. |
|
||||||
|
| `doc_html/` | documentation, such as the CGAL Installation Guide |
|
||||||
|
| `examples/` | programs illustrating the usage of various packages of CGAL. |
|
||||||
|
| `include/` | the include files for the CGAL library (as well as small external libraries, see the file `LICENSE`) |
|
||||||
|
| `lib/` | contains [CMake package] configuration files for CGAL |
|
||||||
|
| `scripts/` | some useful scripts for CGAL programmers |
|
||||||
|
|
||||||
|
[CMake package]: https://cmake.org/cmake/help/latest/manual/cmake-packages.7.html
|
||||||
|
|
@ -20,7 +20,9 @@ if( NOT CGAL_COMMON_FILE_INCLUDED )
|
||||||
if ( WIN32 )
|
if ( WIN32 )
|
||||||
find_program(CMAKE_UNAME uname /bin /usr/bin /usr/local/bin )
|
find_program(CMAKE_UNAME uname /bin /usr/bin /usr/local/bin )
|
||||||
if(CMAKE_UNAME)
|
if(CMAKE_UNAME)
|
||||||
exec_program(uname ARGS -s OUTPUT_VARIABLE CMAKE_SYSTEM_NAME2)
|
execute_process(COMMAND uname -s
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
OUTPUT_VARIABLE CMAKE_SYSTEM_NAME2)
|
||||||
if ( CMAKE_SYSTEM_NAME2 MATCHES "CYGWIN" )
|
if ( CMAKE_SYSTEM_NAME2 MATCHES "CYGWIN" )
|
||||||
message( STATUS "This is the Windows CMake running within the cygwin platform." )
|
message( STATUS "This is the Windows CMake running within the cygwin platform." )
|
||||||
set( CGAL_WIN32_CMAKE_ON_CYGWIN TRUE CACHE INTERNAL "This is the cygwin platform." )
|
set( CGAL_WIN32_CMAKE_ON_CYGWIN TRUE CACHE INTERNAL "This is the cygwin platform." )
|
||||||
|
|
|
||||||
|
|
@ -57,12 +57,6 @@ function(create_single_source_cgal_program firstfile )
|
||||||
set(NO_TESTING TRUE)
|
set(NO_TESTING TRUE)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(NOT NO_TESTING)
|
|
||||||
cgal_add_test(${exe_name})
|
|
||||||
else()
|
|
||||||
cgal_add_test(${exe_name} NO_EXECUTION)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${exe_name} )
|
add_to_cached_list( CGAL_EXECUTABLE_TARGETS ${exe_name} )
|
||||||
|
|
||||||
target_link_libraries(${exe_name} PRIVATE CGAL::CGAL CGAL::Data)
|
target_link_libraries(${exe_name} PRIVATE CGAL::CGAL CGAL::Data)
|
||||||
|
|
@ -75,13 +69,10 @@ function(create_single_source_cgal_program firstfile )
|
||||||
target_link_libraries(${exe_name} PRIVATE ${CGAL_3RD_PARTY_LIBRARIES})
|
target_link_libraries(${exe_name} PRIVATE ${CGAL_3RD_PARTY_LIBRARIES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(POLICY CMP0064)
|
if(NOT NO_TESTING)
|
||||||
# CMake 3.4 or later
|
cgal_add_test(${exe_name})
|
||||||
if(NOT NO_TESTING)
|
else()
|
||||||
cgal_add_test(${exe_name})
|
cgal_add_test(${exe_name} NO_EXECUTION)
|
||||||
else()
|
|
||||||
cgal_add_test(${exe_name} NO_EXECUTION)
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
else()
|
else()
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,9 @@ if ( NOT CGAL_GENERATOR_SPECIFIC_SETTINGS_FILE_INCLUDED )
|
||||||
|
|
||||||
# From james Bigler, in the cmake users list.
|
# From james Bigler, in the cmake users list.
|
||||||
IF (APPLE)
|
IF (APPLE)
|
||||||
exec_program(uname ARGS -v OUTPUT_VARIABLE DARWIN_VERSION)
|
execute_process(COMMAND uname -v
|
||||||
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
|
OUTPUT_VARIABLE DARWIN_VERSION)
|
||||||
string(REGEX MATCH "[0-9]+" DARWIN_VERSION ${DARWIN_VERSION})
|
string(REGEX MATCH "[0-9]+" DARWIN_VERSION ${DARWIN_VERSION})
|
||||||
message(STATUS "Running in macOS DARWIN_VERSION=${DARWIN_VERSION}")
|
message(STATUS "Running in macOS DARWIN_VERSION=${DARWIN_VERSION}")
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -117,16 +117,15 @@ function(cgal_add_compilation_test exe_name)
|
||||||
add_test(NAME "check build system"
|
add_test(NAME "check build system"
|
||||||
COMMAND "${CMAKE_COMMAND}" --build "${CMAKE_BINARY_DIR}" --target "cgal_check_build_system" --config "$<CONFIG>")
|
COMMAND "${CMAKE_COMMAND}" --build "${CMAKE_BINARY_DIR}" --target "cgal_check_build_system" --config "$<CONFIG>")
|
||||||
set_property(TEST "check build system"
|
set_property(TEST "check build system"
|
||||||
APPEND PROPERTY LABELS "CGAL_build_system")
|
APPEND PROPERTY LABELS "CGAL_build_system" "Installation")
|
||||||
set_property(TEST "check build system"
|
set_property(TEST "check build system"
|
||||||
PROPERTY FIXTURES_SETUP "check_build_system_SetupFixture")
|
PROPERTY FIXTURES_SETUP "check_build_system_SetupFixture")
|
||||||
endif()
|
endif()
|
||||||
if(TARGET CGAL_Qt6_moc_and_resources) # if CGAL_Qt6 was searched, and is header-only
|
if(TARGET CGAL_Qt6_moc_and_resources) # if CGAL_Qt6 was searched, and is header-only
|
||||||
get_property(linked_libraries TARGET "${exe_name}" PROPERTY LINK_LIBRARIES)
|
get_property(linked_libraries TARGET "${exe_name}" PROPERTY LINK_LIBRARIES)
|
||||||
# message(STATUS "${exe_name} depends on ${linked_libraries}")
|
# message(STATUS "${exe_name} depends on ${linked_libraries}")
|
||||||
string(FIND "${linked_libraries}" "CGAL::CGAL_Qt6" link_with_CGAL_Qt6)
|
if( ("CGAL_Qt6" IN_LIST linked_libraries OR "CGAL::CGAL_Qt6" IN_LIST linked_libraries OR "CGAL::CGAL_Basic_viewer" IN_LIST linked_libraries)
|
||||||
if(link_with_CGAL_Qt6 STRGREATER "-1" AND
|
AND NOT TARGET "compilation_of__CGAL_Qt6_moc_and_resources")
|
||||||
NOT TARGET "compilation_of__CGAL_Qt6_moc_and_resources")
|
|
||||||
# This custom target is useless. It is used only as a flag to
|
# This custom target is useless. It is used only as a flag to
|
||||||
# detect that the test has already been created.
|
# detect that the test has already been created.
|
||||||
add_custom_target("compilation_of__CGAL_Qt6_moc_and_resources")
|
add_custom_target("compilation_of__CGAL_Qt6_moc_and_resources")
|
||||||
|
|
@ -134,7 +133,7 @@ function(cgal_add_compilation_test exe_name)
|
||||||
add_test(NAME "compilation of CGAL_Qt6_moc_and_resources"
|
add_test(NAME "compilation of CGAL_Qt6_moc_and_resources"
|
||||||
COMMAND "${CMAKE_COMMAND}" --build "${CMAKE_BINARY_DIR}" --target "CGAL_Qt6_moc_and_resources" --config "$<CONFIG>")
|
COMMAND "${CMAKE_COMMAND}" --build "${CMAKE_BINARY_DIR}" --target "CGAL_Qt6_moc_and_resources" --config "$<CONFIG>")
|
||||||
set_property(TEST "compilation of CGAL_Qt6_moc_and_resources"
|
set_property(TEST "compilation of CGAL_Qt6_moc_and_resources"
|
||||||
APPEND PROPERTY LABELS "CGAL_build_system")
|
APPEND PROPERTY LABELS "CGAL_build_system" "Installation")
|
||||||
set_property(TEST "compilation of CGAL_Qt6_moc_and_resources"
|
set_property(TEST "compilation of CGAL_Qt6_moc_and_resources"
|
||||||
PROPERTY FIXTURES_SETUP "CGAL_Qt6_moc_and_resources_Fixture")
|
PROPERTY FIXTURES_SETUP "CGAL_Qt6_moc_and_resources_Fixture")
|
||||||
set_property(TEST "compilation of CGAL_Qt6_moc_and_resources"
|
set_property(TEST "compilation of CGAL_Qt6_moc_and_resources"
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,7 @@ function(CGAL_hook_fix_ctest_depending_on_Qt6)
|
||||||
continue()
|
continue()
|
||||||
endif()
|
endif()
|
||||||
get_property(_target_links TARGET ${_target} PROPERTY LINK_LIBRARIES)
|
get_property(_target_links TARGET ${_target} PROPERTY LINK_LIBRARIES)
|
||||||
if("CGAL_Qt6" IN_LIST _target_links OR "CGAL::CGAL_Qt6" IN_LIST _target_links)
|
if("CGAL_Qt6" IN_LIST _target_links OR "CGAL::CGAL_Qt6" IN_LIST _target_links OR "CGAL::CGAL_Basic_viewer" IN_LIST _target_links)
|
||||||
set_property(TEST "compilation of ${_target}" APPEND PROPERTY FIXTURES_REQUIRED CGAL_Qt6_moc_and_resources_Fixture)
|
set_property(TEST "compilation of ${_target}" APPEND PROPERTY FIXTURES_REQUIRED CGAL_Qt6_moc_and_resources_Fixture)
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ Convex_hull_d dD Convex Hulls and Delaunay Triangulations
|
||||||
Envelope_2 2D Envelopes
|
Envelope_2 2D Envelopes
|
||||||
Envelope_3 3D Envelopes
|
Envelope_3 3D Envelopes
|
||||||
GraphicsView CGAL and the Qt Graphics View Framework
|
GraphicsView CGAL and the Qt Graphics View Framework
|
||||||
|
Heat_method_3 The Heat Method
|
||||||
Hyperbolic_triangulation_2 2D Hyperbolic Delaunay Triangulations
|
Hyperbolic_triangulation_2 2D Hyperbolic Delaunay Triangulations
|
||||||
Inscribed_areas Inscribed Areas
|
Inscribed_areas Inscribed Areas
|
||||||
Interpolation 2D and Surface Function Interpolation
|
Interpolation 2D and Surface Function Interpolation
|
||||||
|
|
@ -34,9 +35,9 @@ Minkowski_sum_3 3D Minkowski Sum of Polyhedra
|
||||||
Nef_2 2D Boolean Operations on Nef Polygons
|
Nef_2 2D Boolean Operations on Nef Polygons
|
||||||
Nef_3 3D Boolean Operations on Nef Polyhedra
|
Nef_3 3D Boolean Operations on Nef Polyhedra
|
||||||
Nef_S2 2D Boolean Operations on Nef Polygons Embedded on the Sphere
|
Nef_S2 2D Boolean Operations on Nef Polygons Embedded on the Sphere
|
||||||
Orthtree Quadtrees, Octrees, and Orthtrees
|
|
||||||
Optimal_bounding_box Optimal Bounding Box
|
Optimal_bounding_box Optimal Bounding Box
|
||||||
Optimal_transportation_reconstruction_2 Optimal Transportation Curve Reconstruction
|
Optimal_transportation_reconstruction_2 Optimal Transportation Curve Reconstruction
|
||||||
|
Orthtree Quadtrees, Octrees, and Orthtrees
|
||||||
Partition_2 2D Polygon Partitioning
|
Partition_2 2D Polygon Partitioning
|
||||||
Periodic_2_triangulation_2 2D Periodic Triangulations
|
Periodic_2_triangulation_2 2D Periodic Triangulations
|
||||||
Periodic_3_mesh_3 3D Periodic Mesh Generation
|
Periodic_3_mesh_3 3D Periodic Mesh Generation
|
||||||
|
|
@ -46,6 +47,7 @@ Point_set_2 2D Range and Neighbor Search
|
||||||
Point_set_3 3D Point Set
|
Point_set_3 3D Point Set
|
||||||
Point_set_processing_3 Point Set Processing
|
Point_set_processing_3 Point Set Processing
|
||||||
Poisson_surface_reconstruction_3 Poisson Surface Reconstruction
|
Poisson_surface_reconstruction_3 Poisson Surface Reconstruction
|
||||||
|
Polygonal_surface_reconstruction Polygonal Surface Reconstruction
|
||||||
Polygon_mesh_processing Polygon Mesh Processing
|
Polygon_mesh_processing Polygon Mesh Processing
|
||||||
Polygon_mesh_processing/Compute_normal Polygon Mesh Processing - Normal Computation
|
Polygon_mesh_processing/Compute_normal Polygon Mesh Processing - Normal Computation
|
||||||
Polygon_mesh_processing/connected_components Polygon Mesh Processing - Connected Components
|
Polygon_mesh_processing/connected_components Polygon Mesh Processing - Connected Components
|
||||||
|
|
@ -53,9 +55,11 @@ Polygon_mesh_processing/corefinement Polygon Mesh Processing - Corefinement
|
||||||
Polygon_mesh_processing/core Polygon Mesh Processing - Core
|
Polygon_mesh_processing/core Polygon Mesh Processing - Core
|
||||||
Polygon_mesh_processing/distance Polygon Mesh Processing - Distance
|
Polygon_mesh_processing/distance Polygon Mesh Processing - Distance
|
||||||
Polygon_mesh_processing/interpolated_corrected_curvatures Polygon Mesh Processing - Interpolated Corrected Curvatures
|
Polygon_mesh_processing/interpolated_corrected_curvatures Polygon Mesh Processing - Interpolated Corrected Curvatures
|
||||||
|
Polygon_mesh_processing/locate Polygon Mesh Processing - Locate
|
||||||
Polygon_mesh_processing/measure Polygon Mesh Processing - Geometric Measure
|
Polygon_mesh_processing/measure Polygon Mesh Processing - Geometric Measure
|
||||||
Polygon_mesh_processing/meshing_hole_filling Polygon Mesh Processing - Meshing and Hole Filling
|
Polygon_mesh_processing/meshing_hole_filling Polygon Mesh Processing - Meshing and Hole Filling
|
||||||
Polygon_mesh_processing/orientation Polygon Mesh Processing - Orientation
|
Polygon_mesh_processing/orientation Polygon Mesh Processing - Orientation
|
||||||
|
Polygon_mesh_processing/Polyhedral_envelope Polygon Mesh Processing - Polyhedral Envelope
|
||||||
Polygon_mesh_processing/predicate Polygon Mesh Processing - Predicate
|
Polygon_mesh_processing/predicate Polygon Mesh Processing - Predicate
|
||||||
Polygon_mesh_processing/combinatorial_repair Polygon Mesh Processing - Combinatorial Repair
|
Polygon_mesh_processing/combinatorial_repair Polygon Mesh Processing - Combinatorial Repair
|
||||||
Polygon_mesh_processing/geometric_repair Polygon Mesh Processing - Geometric Repair
|
Polygon_mesh_processing/geometric_repair Polygon Mesh Processing - Geometric Repair
|
||||||
|
|
@ -77,15 +81,16 @@ Set_movable_separability_2 2D Movable Separability of Sets
|
||||||
Shape_detection Shape Detection
|
Shape_detection Shape Detection
|
||||||
Shape_regularization Shape Regularization
|
Shape_regularization Shape Regularization
|
||||||
Skin_surface_3 3D Skin Surface Meshing
|
Skin_surface_3 3D Skin Surface Meshing
|
||||||
|
SMDS_3 3D Simplicial Mesh Data Structure
|
||||||
Snap_rounding_2 2D Snap Rounding
|
Snap_rounding_2 2D Snap Rounding
|
||||||
Spatial_searching dD Spatial Searching
|
Spatial_searching dD Spatial Searching
|
||||||
Straight_skeleton_2 2D Straight Skeleton and Polygon Offsetting
|
Straight_skeleton_2 2D Straight Skeleton and Polygon Offsetting
|
||||||
Straight_skeleton_extrusion_2 2D Straight Skeleton Extrusion
|
Straight_skeleton_extrusion_2 2D Straight Skeleton Extrusion
|
||||||
Stream_lines_2 2D Placement of Streamlines
|
Stream_lines_2 2D Placement of Streamlines
|
||||||
|
Surface_mesh_approximation Triangulated Surface Mesh Approximation
|
||||||
Surface_mesh_deformation Triangulated Surface Mesh Deformation
|
Surface_mesh_deformation Triangulated Surface Mesh Deformation
|
||||||
Surface_mesher 3D Surface Mesh Generation
|
Surface_mesher 3D Surface Mesh Generation
|
||||||
Surface_mesh Surface Mesh
|
Surface_mesh Surface Mesh
|
||||||
Surface_mesh_approximation Triangulated Surface Mesh Approximation
|
|
||||||
Surface_mesh_parameterization Triangulated Surface Mesh Parameterization
|
Surface_mesh_parameterization Triangulated Surface Mesh Parameterization
|
||||||
Surface_mesh_segmentation Triangulated Surface Mesh Segmentation
|
Surface_mesh_segmentation Triangulated Surface Mesh Segmentation
|
||||||
Surface_mesh_shortest_path Triangulated Surface Mesh Shortest Paths
|
Surface_mesh_shortest_path Triangulated Surface Mesh Shortest Paths
|
||||||
|
|
@ -95,12 +100,11 @@ Surface_mesh_topology Surface Mesh Topology
|
||||||
Surface_sweep_2 2D Intersection of Curves
|
Surface_sweep_2 2D Intersection of Curves
|
||||||
TDS_2 2D Triangulation Data Structure
|
TDS_2 2D Triangulation Data Structure
|
||||||
TDS_3 3D Triangulation Data Structure
|
TDS_3 3D Triangulation Data Structure
|
||||||
|
Tetrahedral_remeshing Tetrahedral Remeshing
|
||||||
Three Three
|
Three Three
|
||||||
SMDS_3 3D Simplicial Mesh Data Structure
|
|
||||||
Triangulation_2 2D Triangulation
|
Triangulation_2 2D Triangulation
|
||||||
Triangulation_on_sphere_2 2D Triangulation on Sphere
|
|
||||||
Triangulation_3 3D Triangulations
|
Triangulation_3 3D Triangulations
|
||||||
Triangulation dD Triangulations
|
Triangulation dD Triangulations
|
||||||
|
Triangulation_on_sphere_2 2D Triangulation on Sphere
|
||||||
Visibility_2 2D Visibility Computation
|
Visibility_2 2D Visibility Computation
|
||||||
Voronoi_diagram_2 2D Voronoi Diagram Adaptor
|
Voronoi_diagram_2 2D Voronoi Diagram Adaptor
|
||||||
Tetrahedral_remeshing Tetrahedral Remeshing
|
|
||||||
|
|
|
||||||
|
|
@ -2691,6 +2691,42 @@ const CGAL::Point_3<Kernel>& r);
|
||||||
/// \defgroup squared_distance_grp CGAL::squared_distance()
|
/// \defgroup squared_distance_grp CGAL::squared_distance()
|
||||||
/// \ingroup kernel_global_function
|
/// \ingroup kernel_global_function
|
||||||
|
|
||||||
|
/// \defgroup squared_length_grp CGAL::squared_length()
|
||||||
|
/// \ingroup kernel_global_function
|
||||||
|
|
||||||
|
/// @{
|
||||||
|
|
||||||
|
/*!
|
||||||
|
compute the squared length of vector `v`.
|
||||||
|
*/
|
||||||
|
template <typename Kernel>
|
||||||
|
FT
|
||||||
|
squared_length(const CGAL::Vector_2<Kernel>& v);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
compute the squared length of segment `s`.
|
||||||
|
*/
|
||||||
|
template <typename Kernel>
|
||||||
|
FT
|
||||||
|
squared_length(const CGAL::Segment_2<Kernel>& s);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
compute the squared length of vector `v`.
|
||||||
|
*/
|
||||||
|
template <typename Kernel>
|
||||||
|
FT
|
||||||
|
squared_length(const CGAL::Vector_3<Kernel>& v);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
compute the squared length of segment `s`.
|
||||||
|
*/
|
||||||
|
template <typename Kernel>
|
||||||
|
FT
|
||||||
|
squared_length(const CGAL::Segment_3<Kernel>& s);
|
||||||
|
|
||||||
|
/// @}
|
||||||
|
|
||||||
|
|
||||||
/// \defgroup squared_radius_grp CGAL::squared_radius()
|
/// \defgroup squared_radius_grp CGAL::squared_radius()
|
||||||
/// \ingroup kernel_global_function
|
/// \ingroup kernel_global_function
|
||||||
/// \sa `Circle_2<Kernel>_grp`
|
/// \sa `Circle_2<Kernel>_grp`
|
||||||
|
|
|
||||||
|
|
@ -1114,6 +1114,22 @@ side_of_oriented_circle(const Point_2<K> &p,
|
||||||
return internal::side_of_oriented_circle(p, q, r, t, K());
|
return internal::side_of_oriented_circle(p, q, r, t, K());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template < class K >
|
||||||
|
inline
|
||||||
|
typename K::FT
|
||||||
|
squared_length(const Vector_2<K> &v)
|
||||||
|
{
|
||||||
|
return internal::squared_length(v, K());
|
||||||
|
}
|
||||||
|
|
||||||
|
template < class K >
|
||||||
|
inline
|
||||||
|
typename K::FT
|
||||||
|
squared_length(const Segment_2<K> &s)
|
||||||
|
{
|
||||||
|
return internal::squared_length(s, K());
|
||||||
|
}
|
||||||
|
|
||||||
template < class K >
|
template < class K >
|
||||||
inline
|
inline
|
||||||
typename K::FT
|
typename K::FT
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue