mirror of https://github.com/CGAL/cgal
Rename template parameter to help MSVC
Seems like MSVC gets confused between 'Tr' being both a template paramter and a typedef in the class being passed as template parameter.
This commit is contained in:
parent
2d81245744
commit
d75821f27a
|
|
@ -56,11 +56,11 @@ const int Triangulation_hierarchy_2__minsize = 20;
|
|||
const int Triangulation_hierarchy_2__maxlevel = 5;
|
||||
// maximal number of points is 30^5 = 24 millions !
|
||||
|
||||
template < class Tr_>
|
||||
template <class Tr_>
|
||||
class Triangulation_hierarchy_2
|
||||
: public Tr_
|
||||
{
|
||||
public:
|
||||
public:
|
||||
typedef Tr_ Tr_Base;
|
||||
typedef typename Tr_Base::Geom_traits Geom_traits;
|
||||
typedef typename Tr_Base::size_type size_type;
|
||||
|
|
@ -273,8 +273,8 @@ private:
|
|||
|
||||
|
||||
|
||||
template <class Tr >
|
||||
Triangulation_hierarchy_2<Tr>::
|
||||
template <class Tr_>
|
||||
Triangulation_hierarchy_2<Tr_>::
|
||||
Triangulation_hierarchy_2(const Geom_traits& traits)
|
||||
: Tr_Base(traits)
|
||||
{
|
||||
|
|
@ -285,9 +285,9 @@ Triangulation_hierarchy_2(const Geom_traits& traits)
|
|||
|
||||
|
||||
// copy constructor duplicates vertices and faces
|
||||
template <class Tr>
|
||||
Triangulation_hierarchy_2<Tr>::
|
||||
Triangulation_hierarchy_2(const Triangulation_hierarchy_2<Tr> &tr)
|
||||
template <class Tr_>
|
||||
Triangulation_hierarchy_2<Tr_>::
|
||||
Triangulation_hierarchy_2(const Triangulation_hierarchy_2<Tr_> &tr)
|
||||
: Tr_Base()
|
||||
{
|
||||
// create an empty triangulation to be able to delete it !
|
||||
|
|
@ -299,20 +299,20 @@ Triangulation_hierarchy_2(const Triangulation_hierarchy_2<Tr> &tr)
|
|||
|
||||
|
||||
//Assignement
|
||||
template <class Tr>
|
||||
Triangulation_hierarchy_2<Tr> &
|
||||
Triangulation_hierarchy_2<Tr>::
|
||||
operator=(const Triangulation_hierarchy_2<Tr> &tr)
|
||||
template <class Tr_>
|
||||
Triangulation_hierarchy_2<Tr_> &
|
||||
Triangulation_hierarchy_2<Tr_>::
|
||||
operator=(const Triangulation_hierarchy_2<Tr_> &tr)
|
||||
{
|
||||
copy_triangulation(tr);
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
template <class Tr>
|
||||
template <class Tr_>
|
||||
void
|
||||
Triangulation_hierarchy_2<Tr>::
|
||||
copy_triangulation(const Triangulation_hierarchy_2<Tr> &tr)
|
||||
Triangulation_hierarchy_2<Tr_>::
|
||||
copy_triangulation(const Triangulation_hierarchy_2<Tr_> &tr)
|
||||
{
|
||||
{
|
||||
for(int i=0;i<Triangulation_hierarchy_2__maxlevel;++i)
|
||||
|
|
@ -348,18 +348,18 @@ copy_triangulation(const Triangulation_hierarchy_2<Tr> &tr)
|
|||
}
|
||||
}
|
||||
|
||||
/* template <class Tr> */
|
||||
/* template <class Tr_> */
|
||||
/* void */
|
||||
/* Triangulation_hierarchy_2<Tr>:: */
|
||||
/* Triangulation_hierarchy_2<Tr_>:: */
|
||||
/* add_hidden_vertices_into_map(Tag_false, */
|
||||
/* std::map<Vertex_handle,Vertex_handle >& V) { */
|
||||
/* return; */
|
||||
/* } */
|
||||
|
||||
|
||||
/* template <class Tr> */
|
||||
/* template <class Tr_> */
|
||||
/* void */
|
||||
/* Triangulation_hierarchy_2<Tr>:: */
|
||||
/* Triangulation_hierarchy_2<Tr_>:: */
|
||||
/* add_hidden_vertices_into_map(Tag_true, */
|
||||
/* std::map<Vertex_handle,Vertex_handle >& V) */
|
||||
/* { */
|
||||
|
|
@ -371,10 +371,10 @@ copy_triangulation(const Triangulation_hierarchy_2<Tr> &tr)
|
|||
/* } */
|
||||
|
||||
|
||||
template <class Tr>
|
||||
template <class Tr_>
|
||||
void
|
||||
Triangulation_hierarchy_2<Tr>::
|
||||
swap(Triangulation_hierarchy_2<Tr> &tr)
|
||||
Triangulation_hierarchy_2<Tr_>::
|
||||
swap(Triangulation_hierarchy_2<Tr_> &tr)
|
||||
{
|
||||
Tr_Base* temp;
|
||||
Tr_Base::swap(tr);
|
||||
|
|
@ -385,8 +385,8 @@ swap(Triangulation_hierarchy_2<Tr> &tr)
|
|||
}
|
||||
}
|
||||
|
||||
template <class Tr>
|
||||
Triangulation_hierarchy_2<Tr>::
|
||||
template <class Tr_>
|
||||
Triangulation_hierarchy_2<Tr_>::
|
||||
~Triangulation_hierarchy_2()
|
||||
{
|
||||
clear();
|
||||
|
|
@ -395,9 +395,9 @@ Triangulation_hierarchy_2<Tr>::
|
|||
}
|
||||
}
|
||||
|
||||
template <class Tr>
|
||||
template <class Tr_>
|
||||
void
|
||||
Triangulation_hierarchy_2<Tr>::
|
||||
Triangulation_hierarchy_2<Tr_>::
|
||||
clear()
|
||||
{
|
||||
for(int i=0;i<Triangulation_hierarchy_2__maxlevel;++i)
|
||||
|
|
@ -405,9 +405,9 @@ clear()
|
|||
}
|
||||
|
||||
|
||||
template <class Tr>
|
||||
template <class Tr_>
|
||||
bool
|
||||
Triangulation_hierarchy_2<Tr>::
|
||||
Triangulation_hierarchy_2<Tr_>::
|
||||
is_valid(bool verbose, int level) const
|
||||
{
|
||||
bool result = true;
|
||||
|
|
@ -440,9 +440,9 @@ is_valid(bool verbose, int level) const
|
|||
}
|
||||
|
||||
|
||||
template <class Tr>
|
||||
typename Triangulation_hierarchy_2<Tr>::Vertex_handle
|
||||
Triangulation_hierarchy_2<Tr>::
|
||||
template <class Tr_>
|
||||
typename Triangulation_hierarchy_2<Tr_>::Vertex_handle
|
||||
Triangulation_hierarchy_2<Tr_>::
|
||||
insert(const Point &p, Face_handle loc)
|
||||
{
|
||||
int vertex_level = random_level();
|
||||
|
|
@ -466,9 +466,9 @@ insert(const Point &p, Face_handle loc)
|
|||
return first;
|
||||
}
|
||||
|
||||
template <class Tr>
|
||||
typename Triangulation_hierarchy_2<Tr>::Vertex_handle
|
||||
Triangulation_hierarchy_2<Tr>::
|
||||
template <class Tr_>
|
||||
typename Triangulation_hierarchy_2<Tr_>::Vertex_handle
|
||||
Triangulation_hierarchy_2<Tr_>::
|
||||
insert(const Point& p,
|
||||
Locate_type lt,
|
||||
Face_handle loc,
|
||||
|
|
@ -499,18 +499,18 @@ insert(const Point& p,
|
|||
return first;
|
||||
}
|
||||
|
||||
template <class Tr>
|
||||
template <class Tr_>
|
||||
inline
|
||||
typename Triangulation_hierarchy_2<Tr>::Vertex_handle
|
||||
Triangulation_hierarchy_2<Tr>::
|
||||
typename Triangulation_hierarchy_2<Tr_>::Vertex_handle
|
||||
Triangulation_hierarchy_2<Tr_>::
|
||||
push_back(const Point &p)
|
||||
{
|
||||
return insert(p);
|
||||
}
|
||||
|
||||
template <class Tr>
|
||||
template <class Tr_>
|
||||
void
|
||||
Triangulation_hierarchy_2<Tr>::
|
||||
Triangulation_hierarchy_2<Tr_>::
|
||||
remove(Vertex_handle v )
|
||||
{
|
||||
Vertex_handle u=v->up();
|
||||
|
|
@ -523,10 +523,10 @@ remove(Vertex_handle v )
|
|||
}
|
||||
}
|
||||
|
||||
template <class Tr>
|
||||
template <class Tr_>
|
||||
template <class OutputItFaces>
|
||||
void
|
||||
Triangulation_hierarchy_2<Tr>::
|
||||
Triangulation_hierarchy_2<Tr_>::
|
||||
remove_and_give_new_faces(Vertex_handle v, OutputItFaces fit)
|
||||
{
|
||||
Vertex_handle u=v->up();
|
||||
|
|
@ -541,33 +541,33 @@ remove_and_give_new_faces(Vertex_handle v, OutputItFaces fit)
|
|||
}
|
||||
|
||||
|
||||
template <class Tr>
|
||||
template <class Tr_>
|
||||
inline void
|
||||
Triangulation_hierarchy_2<Tr>::
|
||||
Triangulation_hierarchy_2<Tr_>::
|
||||
remove_degree_3(Vertex_handle v )
|
||||
{
|
||||
remove(v);
|
||||
}
|
||||
|
||||
template <class Tr>
|
||||
template <class Tr_>
|
||||
inline void
|
||||
Triangulation_hierarchy_2<Tr>::
|
||||
Triangulation_hierarchy_2<Tr_>::
|
||||
remove_first(Vertex_handle v )
|
||||
{
|
||||
remove(v);
|
||||
}
|
||||
|
||||
template <class Tr>
|
||||
template <class Tr_>
|
||||
inline void
|
||||
Triangulation_hierarchy_2<Tr>::
|
||||
Triangulation_hierarchy_2<Tr_>::
|
||||
remove_second(Vertex_handle v )
|
||||
{
|
||||
remove(v);
|
||||
}
|
||||
|
||||
template <class Tr>
|
||||
typename Triangulation_hierarchy_2<Tr>::Vertex_handle
|
||||
Triangulation_hierarchy_2<Tr>::
|
||||
template <class Tr_>
|
||||
typename Triangulation_hierarchy_2<Tr_>::Vertex_handle
|
||||
Triangulation_hierarchy_2<Tr_>::
|
||||
move_if_no_collision(Vertex_handle v, const Point &p) {
|
||||
Vertex_handle u=v->up(), norm = v;
|
||||
int l = 0 ;
|
||||
|
|
@ -581,9 +581,9 @@ move_if_no_collision(Vertex_handle v, const Point &p) {
|
|||
return norm;
|
||||
}
|
||||
|
||||
template <class Tr>
|
||||
typename Triangulation_hierarchy_2<Tr>::Vertex_handle
|
||||
Triangulation_hierarchy_2<Tr>::
|
||||
template <class Tr_>
|
||||
typename Triangulation_hierarchy_2<Tr_>::Vertex_handle
|
||||
Triangulation_hierarchy_2<Tr_>::
|
||||
move(Vertex_handle v, const Point &p) {
|
||||
CGAL_triangulation_precondition(!is_infinite(v));
|
||||
Vertex_handle w = move_if_no_collision(v,p);
|
||||
|
|
@ -594,10 +594,10 @@ move(Vertex_handle v, const Point &p) {
|
|||
return v;
|
||||
}
|
||||
|
||||
template <class Tr>
|
||||
template <class Tr_>
|
||||
template <class OutputItFaces>
|
||||
typename Triangulation_hierarchy_2<Tr>::Vertex_handle
|
||||
Triangulation_hierarchy_2<Tr>::
|
||||
typename Triangulation_hierarchy_2<Tr_>::Vertex_handle
|
||||
Triangulation_hierarchy_2<Tr_>::
|
||||
move_if_no_collision_and_give_new_faces(Vertex_handle v, const Point &p,
|
||||
OutputItFaces oif)
|
||||
{
|
||||
|
|
@ -619,11 +619,11 @@ move_if_no_collision_and_give_new_faces(Vertex_handle v, const Point &p,
|
|||
return norm;
|
||||
}
|
||||
|
||||
template < class Tr >
|
||||
template <class Tr_>
|
||||
template < class OutputItFaces >
|
||||
inline
|
||||
typename Triangulation_hierarchy_2<Tr>::Vertex_handle
|
||||
Triangulation_hierarchy_2<Tr>::insert_and_give_new_faces(const Point &p,
|
||||
typename Triangulation_hierarchy_2<Tr_>::Vertex_handle
|
||||
Triangulation_hierarchy_2<Tr_>::insert_and_give_new_faces(const Point &p,
|
||||
OutputItFaces oif,
|
||||
Face_handle loc)
|
||||
{
|
||||
|
|
@ -649,11 +649,11 @@ Triangulation_hierarchy_2<Tr>::insert_and_give_new_faces(const Point &p,
|
|||
return first;
|
||||
}
|
||||
|
||||
template < class Tr >
|
||||
template <class Tr_>
|
||||
template < class OutputItFaces >
|
||||
inline
|
||||
typename Triangulation_hierarchy_2<Tr>::Vertex_handle
|
||||
Triangulation_hierarchy_2<Tr>::
|
||||
typename Triangulation_hierarchy_2<Tr_>::Vertex_handle
|
||||
Triangulation_hierarchy_2<Tr_>::
|
||||
insert_and_give_new_faces(const Point &p,
|
||||
Locate_type lt,
|
||||
Face_handle loc,
|
||||
|
|
@ -685,9 +685,9 @@ insert_and_give_new_faces(const Point &p,
|
|||
return first;
|
||||
}
|
||||
|
||||
template <class Tr>
|
||||
typename Triangulation_hierarchy_2<Tr>::Face_handle
|
||||
Triangulation_hierarchy_2<Tr>::
|
||||
template <class Tr_>
|
||||
typename Triangulation_hierarchy_2<Tr_>::Face_handle
|
||||
Triangulation_hierarchy_2<Tr_>::
|
||||
locate(const Point& p, Locate_type& lt, int& li, Face_handle loc) const
|
||||
{
|
||||
Face_handle positions[Triangulation_hierarchy_2__maxlevel];
|
||||
|
|
@ -695,9 +695,9 @@ locate(const Point& p, Locate_type& lt, int& li, Face_handle loc) const
|
|||
return positions[0];
|
||||
}
|
||||
|
||||
template <class Tr>
|
||||
typename Triangulation_hierarchy_2<Tr>::Face_handle
|
||||
Triangulation_hierarchy_2<Tr>::
|
||||
template <class Tr_>
|
||||
typename Triangulation_hierarchy_2<Tr_>::Face_handle
|
||||
Triangulation_hierarchy_2<Tr_>::
|
||||
locate(const Point& p, Face_handle loc ) const
|
||||
{
|
||||
Locate_type lt;
|
||||
|
|
@ -705,9 +705,9 @@ locate(const Point& p, Face_handle loc ) const
|
|||
return locate(p, lt, li, loc);
|
||||
}
|
||||
|
||||
template <class Tr>
|
||||
template <class Tr_>
|
||||
void
|
||||
Triangulation_hierarchy_2<Tr>::
|
||||
Triangulation_hierarchy_2<Tr_>::
|
||||
locate_in_all(const Point& p,
|
||||
Locate_type& lt,
|
||||
int& li,
|
||||
|
|
@ -769,9 +769,9 @@ locate_in_all(const Point& p,
|
|||
pos[0]=hierarchy[0]->locate(p,lt,li,loc == Face_handle() ? position : loc); // at level 0
|
||||
}
|
||||
|
||||
template <class Tr>
|
||||
template <class Tr_>
|
||||
int
|
||||
Triangulation_hierarchy_2<Tr>::
|
||||
Triangulation_hierarchy_2<Tr_>::
|
||||
random_level()
|
||||
{
|
||||
boost::geometric_distribution<> proba(1.0/Triangulation_hierarchy_2__ratio);
|
||||
|
|
|
|||
Loading…
Reference in New Issue