mirror of https://github.com/CGAL/cgal
cleanup
This commit is contained in:
parent
6aa13f3091
commit
29491b5f56
|
|
@ -151,7 +151,7 @@ public:
|
|||
* arrangement (a vertex, halfedge, or face handle).
|
||||
* \return The nearest landmark point.
|
||||
*/
|
||||
virtual Point_2 closest_landmark (Point_2 p, Object &obj)
|
||||
virtual Point_2 closest_landmark (const Point_2 p, Object &obj)
|
||||
{
|
||||
CGAL_assertion(updated);
|
||||
return (nn.find_nearest_neighbor(p, obj));
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ namespace CGAL {
|
|||
* when one of the four sides is on the parameter space boundary.
|
||||
* Each trapezoid has at most four neighbouring trapezoids.
|
||||
*/
|
||||
template <class Td_traits_>
|
||||
template <typename Td_traits_>
|
||||
class Td_active_trapezoid : public Handle
|
||||
{
|
||||
public:
|
||||
|
|
@ -128,7 +128,8 @@ public:
|
|||
const Td_map_item& _rb,
|
||||
const Td_map_item& _rt,
|
||||
Dag_node* _p_node)
|
||||
: left_v(_left_v),right_v(_right_v),bottom_he(_bottom_he),top_he(_top_he),
|
||||
: left_v(_left_v), right_v(_right_v),
|
||||
bottom_he(_bottom_he), top_he(_top_he),
|
||||
lb(_lb), lt(_lt), rb(_rb), rt(_rt), p_node(_p_node)
|
||||
{ }
|
||||
|
||||
|
|
@ -150,9 +151,6 @@ public:
|
|||
|
||||
Data* ptr() const { return (Data*)(PTR); }
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef CGAL_TD_DEBUG
|
||||
#ifdef CGAL_PM_FRIEND_CLASS
|
||||
protected:
|
||||
|
|
@ -166,8 +164,10 @@ public:
|
|||
//Dag_node* m_dag_node; //pointer to the search structure (DAG) node
|
||||
|
||||
/*! Initialize the trapezoid's neighbours. */
|
||||
inline void init_neighbours(boost::optional<Td_map_item&> lb, boost::optional<Td_map_item&> lt,
|
||||
boost::optional<Td_map_item&> rb, boost::optional<Td_map_item&> rt)
|
||||
inline void init_neighbours(boost::optional<Td_map_item&> lb,
|
||||
boost::optional<Td_map_item&> lt,
|
||||
boost::optional<Td_map_item&> rb,
|
||||
boost::optional<Td_map_item&> rt)
|
||||
{
|
||||
set_lb((lb) ? *lb : Td_map_item(0));
|
||||
set_lt((lt) ? *lt : Td_map_item(0));
|
||||
|
|
@ -186,26 +186,18 @@ public:
|
|||
// CGAL_assertion(!p || **p == *this);
|
||||
//
|
||||
//#endif
|
||||
|
||||
}
|
||||
|
||||
/*! Set the trapezoid's left (Vertex_const_handle). */
|
||||
inline void set_left(Vertex_const_handle v)
|
||||
{
|
||||
ptr()->left_v = v;
|
||||
}
|
||||
inline void set_left(Vertex_const_handle v) { ptr()->left_v = v; }
|
||||
|
||||
/*! Set the trapezoid's right (Vertex_const_handle). */
|
||||
inline void set_right(Vertex_const_handle v)
|
||||
{
|
||||
ptr()->right_v = v;
|
||||
}
|
||||
inline void set_right(Vertex_const_handle v) { ptr()->right_v = v; }
|
||||
|
||||
/*! Set the trapezoid's bottom (Halfedge_const_handle). */
|
||||
inline void set_bottom(Halfedge_const_handle he)
|
||||
{
|
||||
if (!is_on_bottom_boundary() &&
|
||||
bottom()->direction() != he->direction())
|
||||
if (!is_on_bottom_boundary() && (bottom()->direction() != he->direction()))
|
||||
{
|
||||
ptr()->bottom_he = he->twin();
|
||||
}
|
||||
|
|
@ -218,8 +210,7 @@ public:
|
|||
/*! Set the trapezoid's top (Halfedge_const_handle). */
|
||||
inline void set_top(Halfedge_const_handle he)
|
||||
{
|
||||
if (!is_on_top_boundary() &&
|
||||
top()->direction() != he->direction())
|
||||
if (!is_on_top_boundary() && (top()->direction() != he->direction()))
|
||||
{
|
||||
ptr()->top_he = he->twin();
|
||||
}
|
||||
|
|
@ -252,12 +243,12 @@ public:
|
|||
{
|
||||
//define the initial trapezoid: left, right, btm, top are at infinity.
|
||||
// has no neighbours
|
||||
PTR = new Data
|
||||
(Traits::empty_vtx_handle(),
|
||||
PTR = new Data(Traits::empty_vtx_handle(),
|
||||
Traits::empty_vtx_handle(),
|
||||
Traits::empty_he_handle(),
|
||||
Traits::empty_he_handle(),
|
||||
Td_map_item(0), Td_map_item(0) , Td_map_item(0) , Td_map_item(0), NULL);
|
||||
Td_map_item(0), Td_map_item(0) ,
|
||||
Td_map_item(0), Td_map_item(0), NULL);
|
||||
|
||||
//m_dag_node = 0;
|
||||
}
|
||||
|
|
@ -271,8 +262,9 @@ public:
|
|||
boost::optional<Td_map_item&> rt = boost::none,
|
||||
Dag_node* node = 0)
|
||||
{
|
||||
PTR = new Data (l, r, b, t, (lb) ? *lb : Td_map_item(0), (lt) ? *lt : Td_map_item(0),
|
||||
(rb) ? *rb : Td_map_item(0), (rt) ? *rt : Td_map_item(0), node);
|
||||
PTR = new Data(l, r, b, t, (lb) ? *lb : Td_map_item(0),
|
||||
(lt) ? *lt : Td_map_item(0), (rb) ? *rb : Td_map_item(0),
|
||||
(rt) ? *rt : Td_map_item(0), node);
|
||||
//m_dag_node = node;
|
||||
}
|
||||
|
||||
|
|
@ -316,77 +308,48 @@ public:
|
|||
/// \name Access methods.
|
||||
//@{
|
||||
|
||||
inline Self& self()
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
inline Self& self() { return *this; }
|
||||
|
||||
inline const Self& self() const
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
inline const Self& self() const { return *this; }
|
||||
|
||||
/*! Access the trapezoid id (PTR). */
|
||||
inline unsigned long id() const
|
||||
{
|
||||
return (unsigned long) PTR;
|
||||
}
|
||||
inline unsigned long id() const { return (unsigned long) PTR; }
|
||||
|
||||
/*! Access trapezoid left.
|
||||
* filters out the infinite case which returns predefined dummy values
|
||||
*/
|
||||
inline Vertex_const_handle left() const
|
||||
{
|
||||
return ptr()->left_v;
|
||||
}
|
||||
inline Vertex_const_handle left() const { return ptr()->left_v; }
|
||||
|
||||
/*! Access trapezoid right.
|
||||
* filters out the infinite case which returns predefined dummy values
|
||||
*/
|
||||
inline Vertex_const_handle right () const
|
||||
{
|
||||
return ptr()->right_v;
|
||||
}
|
||||
inline Vertex_const_handle right() const { return ptr()->right_v; }
|
||||
|
||||
/*! Access trapezoid bottom.
|
||||
* filters out the infinite case which returns predefined dummy values
|
||||
*/
|
||||
inline Halfedge_const_handle bottom () const
|
||||
{
|
||||
return ptr()->bottom_he;
|
||||
}
|
||||
inline Halfedge_const_handle bottom() const { return ptr()->bottom_he; }
|
||||
|
||||
/*! Access trapezoid top.
|
||||
* filters out the infinite case which returns predefined dummy values
|
||||
*/
|
||||
inline Halfedge_const_handle top () const
|
||||
{
|
||||
return ptr()->top_he;
|
||||
}
|
||||
inline Halfedge_const_handle top() const { return ptr()->top_he; }
|
||||
|
||||
/*! Access is on left boundary. */
|
||||
inline bool is_on_left_boundary() const
|
||||
{
|
||||
return (left() == Traits::empty_vtx_handle());
|
||||
}
|
||||
{ return (left() == Traits::empty_vtx_handle()); }
|
||||
|
||||
/*! Access is on right boundary. */
|
||||
inline bool is_on_right_boundary() const
|
||||
{
|
||||
return (right() == Traits::empty_vtx_handle());
|
||||
}
|
||||
{ return (right() == Traits::empty_vtx_handle()); }
|
||||
|
||||
/*! Access is on bottom boundary. */
|
||||
inline bool is_on_bottom_boundary() const
|
||||
{
|
||||
return (bottom() == Traits::empty_he_handle());
|
||||
}
|
||||
{ return (bottom() == Traits::empty_he_handle()); }
|
||||
|
||||
/*! Access is on top boundary. */
|
||||
inline bool is_on_top_boundary() const
|
||||
{
|
||||
return (top() == Traits::empty_he_handle());
|
||||
}
|
||||
{ return (top() == Traits::empty_he_handle()); }
|
||||
|
||||
/*! Access is on at least one boundary. */
|
||||
inline bool is_on_boundaries() const
|
||||
|
|
@ -459,8 +422,6 @@ public:
|
|||
}
|
||||
CGAL_assertion(is_on_right_boundary() == right.is_on_right_boundary());
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
} //namespace CGAL
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@
|
|||
#define CGAL_TD_DEFAULT_SIZE_THRESHOLD 12
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#if !defined __GNUC__ || __GNUC__>2 || __GNUC__==2 && __GNUC_MINOR__>=95
|
||||
#if !defined __GNUC__ || __GNUC__> 3 || ((__GNUC__== 3) && (__GNUC_MINOR__> 4))
|
||||
#define CGAL_PM_FRIEND_CLASS
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -1135,8 +1135,8 @@ public:
|
|||
}
|
||||
|
||||
Comparison_result comp_x_on_bnd(const Point_2&,
|
||||
const X_monotone_curve_2& xcv,
|
||||
Arr_curve_end ce,
|
||||
const X_monotone_curve_2& /* xcv */,
|
||||
Arr_curve_end /* ce */,
|
||||
Arr_use_dummy_tag) const
|
||||
{
|
||||
CGAL_error();
|
||||
|
|
@ -1153,10 +1153,10 @@ public:
|
|||
return m_base->compare_x_on_boundary_2_object()(xcv1, ce1, xcv2, ce2);
|
||||
}
|
||||
|
||||
Comparison_result comp_x_on_bnd(const X_monotone_curve_2&
|
||||
xcv1, Arr_curve_end ce1,
|
||||
const X_monotone_curve_2& xcv2,
|
||||
Arr_curve_end ce2,
|
||||
Comparison_result comp_x_on_bnd(const X_monotone_curve_2& /* xcv1 */,
|
||||
Arr_curve_end /* ce1 */,
|
||||
const X_monotone_curve_2& /* xcv2 */,
|
||||
Arr_curve_end /* ce2 */,
|
||||
Arr_use_dummy_tag) const
|
||||
{
|
||||
CGAL_error();
|
||||
|
|
|
|||
Loading…
Reference in New Issue