mirror of https://github.com/CGAL/cgal
Point -> const Point&
This commit is contained in:
parent
67a9a492df
commit
3ba5dae125
|
|
@ -107,7 +107,7 @@ public:
|
|||
// CONFLICTS
|
||||
bool test_conflict(Face_handle fh, const Point& p) const; //deprecated
|
||||
bool test_conflict(const Point& p, Face_handle fh) const;
|
||||
void find_conflicts(Point p, std::list<Edge>& le, //deprecated
|
||||
void find_conflicts(const Point& p, std::list<Edge>& le, //deprecated
|
||||
Face_handle hint= Face_handle()) const;
|
||||
// //template member functions, declared and defined at the end
|
||||
// template <class Out_it1, class Out_it2>
|
||||
|
|
@ -449,7 +449,7 @@ test_conflict(Face_handle fh, const Point& p) const
|
|||
template < class Gt, class Tds, class Itag >
|
||||
void
|
||||
Constrained_Delaunay_triangulation_2<Gt,Tds,Itag>::
|
||||
find_conflicts(Point p, std::list<Edge>& le, Face_handle hint) const
|
||||
find_conflicts(const Point& p, std::list<Edge>& le, Face_handle hint) const
|
||||
{
|
||||
// sets in le the counterclocwise list of the edges of the boundary of the
|
||||
// union of the faces in conflict with p
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
//
|
||||
// ============================================================================
|
||||
|
||||
|
||||
#ifndef CGAL_CONSTRAINED_TRIANGULATION_2_H
|
||||
#define CGAL_CONSTRAINED_TRIANGULATION_2_H
|
||||
|
||||
|
|
|
|||
|
|
@ -120,7 +120,8 @@ public:
|
|||
Vertex_handle insert(const Point& p,
|
||||
Locate_type lt,
|
||||
Face_handle loc, int li );
|
||||
void insert_constraint(Point a, Point b);
|
||||
void insert_constraint(const Point& a, const Point& b);
|
||||
|
||||
void insert_constraint(Vertex_handle va, Vertex_handle vb);
|
||||
// template < class InputIterator >
|
||||
// int insert(InputIterator first, InputIterator last);
|
||||
|
|
@ -128,6 +129,8 @@ public:
|
|||
void push_back(const Constraint& c);
|
||||
|
||||
//for backward compatibility
|
||||
// not const Point&, because otherwise VC6/7 messes it up with
|
||||
// the insert that takes an iterator range
|
||||
void insert(Point a, Point b) { insert_constraint(a, b);}
|
||||
void insert(Vertex_handle va, Vertex_handle vb) {insert_constraint(va,vb);}
|
||||
|
||||
|
|
@ -276,12 +279,15 @@ insert(const Point& a, Locate_type lt, Face_handle loc, int li)
|
|||
template <class Tr>
|
||||
inline void
|
||||
Constrained_triangulation_plus_2<Tr>::
|
||||
insert_constraint(Point a, Point b)
|
||||
insert_constraint(const Point& a, const Point& b)
|
||||
// insert endpoints first
|
||||
{
|
||||
Vertex_handle va= insert(a);
|
||||
Vertex_handle vb= insert(b);
|
||||
insert_constraint(va, vb);
|
||||
// If the segment is "short" it is a good idea to start the next insertion
|
||||
// close to point a
|
||||
// Otherwise, to start here is as good as elsewhere
|
||||
Vertex_handle vb = insert(b, va->face());
|
||||
insert_constraint(va, vb);
|
||||
}
|
||||
|
||||
template <class Tr>
|
||||
|
|
@ -396,10 +402,10 @@ intersect(Face_handle f, int i,
|
|||
CGAL_triangulation_assertion(b1);
|
||||
CGAL_triangulation_assertion(b2);
|
||||
|
||||
Point pa = va->point();
|
||||
Point pb = vb->point();
|
||||
Point pc = vc->point();
|
||||
Point pd = vd->point();
|
||||
const Point& pa = va->point();
|
||||
const Point& pb = vb->point();
|
||||
const Point& pc = vc->point();
|
||||
const Point& pd = vd->point();
|
||||
Point pi;
|
||||
Intersection_tag itag = Intersection_tag();
|
||||
bool ok = intersection(geom_traits(), pa, pb, pc, pd, pi, itag );
|
||||
|
|
@ -421,10 +427,10 @@ intersect(Face_handle f, int i,
|
|||
vcc = f->vertex(cw(i));
|
||||
vdd = f->vertex(ccw(i));
|
||||
|
||||
Point pa = vaa->point();
|
||||
Point pb = vbb->point();
|
||||
Point pc = vcc->point();
|
||||
Point pd = vdd->point();
|
||||
const Point& pa = vaa->point();
|
||||
const Point& pb = vbb->point();
|
||||
const Point& pc = vcc->point();
|
||||
const Point& pd = vdd->point();
|
||||
|
||||
Point pi; //creator for point is required here
|
||||
Intersection_tag itag = Intersection_tag();
|
||||
|
|
|
|||
Loading…
Reference in New Issue