BWAPI
Public Types | Public Member Functions | Protected Types | Protected Attributes
Arr_overlay_sl_visitor< OverlayHelper_, OverlayTraits_ > Class Template Reference

#include <Arr_overlay_sl_visitor.h>

Inheritance diagram for Arr_overlay_sl_visitor< OverlayHelper_, OverlayTraits_ >:
Inheritance graph
[legend]
Collaboration diagram for Arr_overlay_sl_visitor< OverlayHelper_, OverlayTraits_ >:
Collaboration graph
[legend]

List of all members.

Public Types

typedef OverlayHelper_ Overlay_helper
typedef OverlayTraits_ Overlay_traits
typedef Overlay_helper::Traits_2 Traits_2
typedef Overlay_helper::Event Event
typedef Overlay_helper::Subcurve Subcurve
typedef
Traits_2::X_monotone_curve_2 
X_monotone_curve_2
typedef Traits_2::Point_2 Point_2
typedef
Overlay_helper::Arrangement_red_2 
Arrangement_red_2
typedef
Arrangement_red_2::Halfedge_const_handle 
Halfedge_handle_red
typedef
Arrangement_red_2::Face_const_handle 
Face_handle_red
typedef
Arrangement_red_2::Vertex_const_handle 
Vertex_handle_red
typedef
Overlay_helper::Arrangement_blue_2 
Arrangement_blue_2
typedef
Arrangement_blue_2::Halfedge_const_handle 
Halfedge_handle_blue
typedef
Arrangement_blue_2::Face_const_handle 
Face_handle_blue
typedef
Arrangement_blue_2::Vertex_const_handle 
Vertex_handle_blue
typedef
Overlay_helper::Arrangement_2 
Arrangement_2
typedef
Arrangement_2::Halfedge_handle 
Halfedge_handle
typedef Arrangement_2::Face_handle Face_handle
typedef
Arrangement_2::Vertex_handle 
Vertex_handle
typedef
Arrangement_2::Ccb_halfedge_circulator 
Ccb_halfedge_circulator
typedef
Arrangement_2::Outer_ccb_iterator 
Outer_ccb_iterator
typedef
Overlay_helper::Construction_helper 
Construction_helper
typedef
Arr_construction_sl_visitor
< Construction_helper
Base
typedef
Base::Event_subcurve_iterator 
Event_subcurve_iterator
typedef
Base::Event_subcurve_reverse_iterator 
Event_subcurve_reverse_iterator
typedef Base::Status_line_iterator Status_line_iterator

Public Member Functions

 Arr_overlay_sl_visitor (const Arrangement_red_2 *red_arr, const Arrangement_blue_2 *blue_arr, Arrangement_2 *res_arr, Overlay_traits *overlay_traits)
virtual ~Arr_overlay_sl_visitor ()
Sweep-line notifications.
void before_sweep ()
void before_handle_event (Event *event)
bool after_handle_event (Event *event, Status_line_iterator iter, bool flag)
void update_event (Event *e, const Point_2 &end_point, const X_monotone_curve_2 &cv, Arr_curve_end cv_end, bool is_new)
void update_event (Event *, const X_monotone_curve_2 &, Arr_curve_end, bool)
void update_event (Event *, Subcurve *, Subcurve *, bool CGAL_assertion_code(is_new))
void update_event (Event *e, Subcurve *sc)
void update_event (Event *e, const Point_2 &p, bool is_new)
void after_sweep ()
Insertion functions.
virtual Halfedge_handle insert_in_face_interior (const X_monotone_curve_2 &cv, Subcurve *sc)
virtual Halfedge_handle insert_from_right_vertex (const X_monotone_curve_2 &cv, Halfedge_handle prev, Subcurve *sc)
virtual Halfedge_handle insert_from_left_vertex (const X_monotone_curve_2 &cv, Halfedge_handle prev, Subcurve *sc)
virtual Halfedge_handle insert_at_vertices (const X_monotone_curve_2 &cv, Halfedge_handle prev1, Halfedge_handle prev2, Subcurve *sc, bool &new_face_created)
virtual Vertex_handle insert_isolated_vertex (const Point_2 &pt, Status_line_iterator iter)

Protected Types

typedef std::pair
< Halfedge_handle_red,
Halfedge_handle_blue
Halfedge_info
typedef Unique_hash_map
< Halfedge_handle,
Halfedge_info
Halfedge_hash_map

Protected Member Functions

Auxiliary functions.
void _map_halfedge_and_twin (Halfedge_handle he, Halfedge_handle_red red_he, Halfedge_handle_blue blue_he)
void _create_vertex (Event *event, Vertex_handle res_v, Subcurve *sc)
void _create_edge (Subcurve *sc, Halfedge_handle res_he)

Protected Attributes

Overlay_helper m_overlay_helper
Halfedge_hash_map m_halfedges_map
Overlay_traitsm_overlay_traits

Detailed Description

template<class OverlayHelper_, class OverlayTraits_>
class Arr_overlay_sl_visitor< OverlayHelper_, OverlayTraits_ >

A sweep-line visitor for overlaying a "red" arrangement and a "blue" arrangement, creating a result arrangement. All three arrangements are embedded on the same type of surface and use the same geometry traits.


Member Typedef Documentation

template<class OverlayHelper_, class OverlayTraits_>
typedef Overlay_helper::Arrangement_2 Arr_overlay_sl_visitor< OverlayHelper_, OverlayTraits_ >::Arrangement_2
template<class OverlayHelper_, class OverlayTraits_>
typedef Overlay_helper::Arrangement_blue_2 Arr_overlay_sl_visitor< OverlayHelper_, OverlayTraits_ >::Arrangement_blue_2
template<class OverlayHelper_, class OverlayTraits_>
typedef Overlay_helper::Arrangement_red_2 Arr_overlay_sl_visitor< OverlayHelper_, OverlayTraits_ >::Arrangement_red_2
template<class OverlayHelper_, class OverlayTraits_>
typedef Arr_construction_sl_visitor<Construction_helper> Arr_overlay_sl_visitor< OverlayHelper_, OverlayTraits_ >::Base
template<class OverlayHelper_, class OverlayTraits_>
typedef Arrangement_2::Ccb_halfedge_circulator Arr_overlay_sl_visitor< OverlayHelper_, OverlayTraits_ >::Ccb_halfedge_circulator
template<class OverlayHelper_, class OverlayTraits_>
typedef Overlay_helper::Construction_helper Arr_overlay_sl_visitor< OverlayHelper_, OverlayTraits_ >::Construction_helper
template<class OverlayHelper_, class OverlayTraits_>
typedef Overlay_helper::Event Arr_overlay_sl_visitor< OverlayHelper_, OverlayTraits_ >::Event
template<class OverlayHelper_, class OverlayTraits_>
typedef Base::Event_subcurve_iterator Arr_overlay_sl_visitor< OverlayHelper_, OverlayTraits_ >::Event_subcurve_iterator
template<class OverlayHelper_, class OverlayTraits_>
typedef Base::Event_subcurve_reverse_iterator Arr_overlay_sl_visitor< OverlayHelper_, OverlayTraits_ >::Event_subcurve_reverse_iterator
template<class OverlayHelper_, class OverlayTraits_>
typedef Arrangement_2::Face_handle Arr_overlay_sl_visitor< OverlayHelper_, OverlayTraits_ >::Face_handle
template<class OverlayHelper_, class OverlayTraits_>
typedef Arrangement_blue_2::Face_const_handle Arr_overlay_sl_visitor< OverlayHelper_, OverlayTraits_ >::Face_handle_blue
template<class OverlayHelper_, class OverlayTraits_>
typedef Arrangement_red_2::Face_const_handle Arr_overlay_sl_visitor< OverlayHelper_, OverlayTraits_ >::Face_handle_red
template<class OverlayHelper_, class OverlayTraits_>
typedef Arrangement_2::Halfedge_handle Arr_overlay_sl_visitor< OverlayHelper_, OverlayTraits_ >::Halfedge_handle
template<class OverlayHelper_, class OverlayTraits_>
typedef Arrangement_blue_2::Halfedge_const_handle Arr_overlay_sl_visitor< OverlayHelper_, OverlayTraits_ >::Halfedge_handle_blue
template<class OverlayHelper_, class OverlayTraits_>
typedef Arrangement_red_2::Halfedge_const_handle Arr_overlay_sl_visitor< OverlayHelper_, OverlayTraits_ >::Halfedge_handle_red
template<class OverlayHelper_, class OverlayTraits_>
typedef Unique_hash_map<Halfedge_handle, Halfedge_info> Arr_overlay_sl_visitor< OverlayHelper_, OverlayTraits_ >::Halfedge_hash_map [protected]
template<class OverlayHelper_, class OverlayTraits_>
typedef std::pair<Halfedge_handle_red, Halfedge_handle_blue> Arr_overlay_sl_visitor< OverlayHelper_, OverlayTraits_ >::Halfedge_info [protected]
template<class OverlayHelper_, class OverlayTraits_>
typedef Arrangement_2::Outer_ccb_iterator Arr_overlay_sl_visitor< OverlayHelper_, OverlayTraits_ >::Outer_ccb_iterator
template<class OverlayHelper_, class OverlayTraits_>
typedef OverlayHelper_ Arr_overlay_sl_visitor< OverlayHelper_, OverlayTraits_ >::Overlay_helper
template<class OverlayHelper_, class OverlayTraits_>
typedef OverlayTraits_ Arr_overlay_sl_visitor< OverlayHelper_, OverlayTraits_ >::Overlay_traits
template<class OverlayHelper_, class OverlayTraits_>
typedef Traits_2::Point_2 Arr_overlay_sl_visitor< OverlayHelper_, OverlayTraits_ >::Point_2
template<class OverlayHelper_, class OverlayTraits_>
typedef Base::Status_line_iterator Arr_overlay_sl_visitor< OverlayHelper_, OverlayTraits_ >::Status_line_iterator
template<class OverlayHelper_, class OverlayTraits_>
typedef Overlay_helper::Subcurve Arr_overlay_sl_visitor< OverlayHelper_, OverlayTraits_ >::Subcurve
template<class OverlayHelper_, class OverlayTraits_>
typedef Overlay_helper::Traits_2 Arr_overlay_sl_visitor< OverlayHelper_, OverlayTraits_ >::Traits_2
template<class OverlayHelper_, class OverlayTraits_>
typedef Arrangement_2::Vertex_handle Arr_overlay_sl_visitor< OverlayHelper_, OverlayTraits_ >::Vertex_handle
template<class OverlayHelper_, class OverlayTraits_>
typedef Arrangement_blue_2::Vertex_const_handle Arr_overlay_sl_visitor< OverlayHelper_, OverlayTraits_ >::Vertex_handle_blue
template<class OverlayHelper_, class OverlayTraits_>
typedef Arrangement_red_2::Vertex_const_handle Arr_overlay_sl_visitor< OverlayHelper_, OverlayTraits_ >::Vertex_handle_red
template<class OverlayHelper_, class OverlayTraits_>
typedef Traits_2::X_monotone_curve_2 Arr_overlay_sl_visitor< OverlayHelper_, OverlayTraits_ >::X_monotone_curve_2

Constructor & Destructor Documentation

template<class OverlayHelper_, class OverlayTraits_>
Arr_overlay_sl_visitor< OverlayHelper_, OverlayTraits_ >::Arr_overlay_sl_visitor ( const Arrangement_red_2 red_arr,
const Arrangement_blue_2 blue_arr,
Arrangement_2 res_arr,
Overlay_traits overlay_traits 
) [inline]

Constructor

template<class OverlayHelper_, class OverlayTraits_>
virtual Arr_overlay_sl_visitor< OverlayHelper_, OverlayTraits_ >::~Arr_overlay_sl_visitor ( ) [inline, virtual]

Destructor


Member Function Documentation

template<class OvlHlpr , class OvlTr >
void Arr_overlay_sl_visitor< OvlHlpr, OvlTr >::_create_edge ( Subcurve sc,
Halfedge_handle  res_he 
) [protected]

Update a newly created result edge using the overlay traits.

Parameters:
scThe subcurve associated with the new edge.
res_heOne of the new halfedges in the overlaid arrangement.
template<class OvlHlpr , class OvlTr >
void Arr_overlay_sl_visitor< OvlHlpr, OvlTr >::_create_vertex ( Event event,
Vertex_handle  res_v,
Subcurve sc 
) [protected]

Update a newly created result vertex using the overlay traits.

Parameters:
eventThe event associated with the new vertex.
res_vThe new vertex in the overlaid arrangement.
scThe subcurve incident to the event.

Here is the call graph for this function:

template<class OvlHlpr , class OvlTr >
void Arr_overlay_sl_visitor< OvlHlpr, OvlTr >::_map_halfedge_and_twin ( Halfedge_handle  he,
Halfedge_handle_red  red_he,
Halfedge_handle_blue  blue_he 
) [protected]

Map a newly created halfedge in the result arrangement to its originator red and blue halfedges.

Parameters:
heThe new halfedge.
red_heThe originating red halfedge.
blue_heThe originating blue halfedge.
Precondition:
he is directed right to left.
template<class OvlHlpr , class OvlTr >
bool Arr_overlay_sl_visitor< OvlHlpr, OvlTr >::after_handle_event ( Event event,
Status_line_iterator  iter,
bool  flag 
)

A notification invoked after the sweep-line finishes handling the given event.

Here is the call graph for this function:

template<class OvlHlpr , class OvlTr >
void Arr_overlay_sl_visitor< OvlHlpr, OvlTr >::after_sweep ( )
template<class OvlHlpr , class OvlTr >
void Arr_overlay_sl_visitor< OvlHlpr, OvlTr >::before_handle_event ( Event event)

A notification invoked before the sweep-line starts handling the given event.

template<class OvlHlpr , class OvlTr >
void Arr_overlay_sl_visitor< OvlHlpr, OvlTr >::before_sweep ( )
template<class OvlHlpr , class OvlTr >
Arr_overlay_sl_visitor< OvlHlpr, OvlTr >::Halfedge_handle Arr_overlay_sl_visitor< OvlHlpr, OvlTr >::insert_at_vertices ( const X_monotone_curve_2 cv,
Halfedge_handle  prev1,
Halfedge_handle  prev2,
Subcurve sc,
bool &  new_face_created 
) [virtual]

Insert the given subcurve given its two end-vertices.

Parameters:
cvThe geometric subcurve.
prev1The predecessor halfedge around the left vertex.
prev2The predecessor halfedge around the right vertex.
scThe sweep-line subcurve information.
new_face_createdOutput: Whether a new face has been created.
Returns:
A handle to the inserted halfedge.
template<class OvlHlpr , class OvlTr >
Arr_overlay_sl_visitor< OvlHlpr, OvlTr >::Halfedge_handle Arr_overlay_sl_visitor< OvlHlpr, OvlTr >::insert_from_left_vertex ( const X_monotone_curve_2 cv,
Halfedge_handle  prev,
Subcurve sc 
) [virtual]

Insert the given subcurve given its left end-vertex.

Parameters:
cvThe geometric entity.
prevThe predecessor halfedge around the left vertex.
scThe sweep-line subcurve information.
Returns:
A handle to the inserted halfedge.
template<class OvlHlpr , class OvlTr >
Arr_overlay_sl_visitor< OvlHlpr, OvlTr >::Halfedge_handle Arr_overlay_sl_visitor< OvlHlpr, OvlTr >::insert_from_right_vertex ( const X_monotone_curve_2 cv,
Halfedge_handle  prev,
Subcurve sc 
) [virtual]

Insert the given subcurve given its right end-vertex.

Parameters:
cvThe geometric entity.
prevThe predecessor halfedge around the right vertex.
scThe sweep-line subcurve information.
Returns:
A handle to the inserted halfedge.
template<class OvlHlpr , class OvlTr >
Arr_overlay_sl_visitor< OvlHlpr, OvlTr >::Halfedge_handle Arr_overlay_sl_visitor< OvlHlpr, OvlTr >::insert_in_face_interior ( const X_monotone_curve_2 cv,
Subcurve sc 
) [virtual]

Insert the given subcurve in the interior of a face.

Parameters:
cvThe geometric subcurve.
scThe sweep-line subcurve information.
Returns:
A handle to the inserted halfedge.
template<class OvlHlpr , class OvlTr >
Arr_overlay_sl_visitor< OvlHlpr, OvlTr >::Vertex_handle Arr_overlay_sl_visitor< OvlHlpr, OvlTr >::insert_isolated_vertex ( const Point_2 pt,
Status_line_iterator  iter 
) [virtual]

Insert an isolated vertex into the arrangement.

Parameters:
ptThe point associated with the vertex.
iterThe location of the corresponding event in the status line.
Returns:
A handle to the inserted vertex.

Reimplemented from Arr_construction_sl_visitor< OverlayHelper_::Construction_helper >.

Here is the call graph for this function:

template<class OvlHlpr , class OvlTr >
void Arr_overlay_sl_visitor< OvlHlpr, OvlTr >::update_event ( Event e,
const Point_2 end_point,
const X_monotone_curve_2 cv,
Arr_curve_end  cv_end,
bool  is_new 
)

Update an event that corresponds to a curve endpoint.

template<class OverlayHelper_, class OverlayTraits_>
void Arr_overlay_sl_visitor< OverlayHelper_, OverlayTraits_ >::update_event ( Event ,
const X_monotone_curve_2 ,
Arr_curve_end  ,
bool   
) [inline]
template<class OverlayHelper_, class OverlayTraits_>
void Arr_overlay_sl_visitor< OverlayHelper_, OverlayTraits_ >::update_event ( Event ,
Subcurve ,
Subcurve ,
bool   CGAL_assertion_codeis_new 
) [inline]

Update an event that corresponds to an intersection between curves.

template<class OvlHlpr , class OvlTr >
void Arr_overlay_sl_visitor< OvlHlpr, OvlTr >::update_event ( Event e,
Subcurve sc 
)

Update an event.

Here is the call graph for this function:

template<class OvlHlpr , class OvlTr >
void Arr_overlay_sl_visitor< OvlHlpr, OvlTr >::update_event ( Event e,
const Point_2 p,
bool  is_new 
)

Update an event.


Member Data Documentation

template<class OverlayHelper_, class OverlayTraits_>
Halfedge_hash_map Arr_overlay_sl_visitor< OverlayHelper_, OverlayTraits_ >::m_halfedges_map [protected]
template<class OverlayHelper_, class OverlayTraits_>
Overlay_helper Arr_overlay_sl_visitor< OverlayHelper_, OverlayTraits_ >::m_overlay_helper [protected]
template<class OverlayHelper_, class OverlayTraits_>
Overlay_traits* Arr_overlay_sl_visitor< OverlayHelper_, OverlayTraits_ >::m_overlay_traits [protected]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines