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;
|
const int Triangulation_hierarchy_2__maxlevel = 5;
|
||||||
// maximal number of points is 30^5 = 24 millions !
|
// maximal number of points is 30^5 = 24 millions !
|
||||||
|
|
||||||
template < class Tr_>
|
template <class Tr_>
|
||||||
class Triangulation_hierarchy_2
|
class Triangulation_hierarchy_2
|
||||||
: public Tr_
|
: public Tr_
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef Tr_ Tr_Base;
|
typedef Tr_ Tr_Base;
|
||||||
typedef typename Tr_Base::Geom_traits Geom_traits;
|
typedef typename Tr_Base::Geom_traits Geom_traits;
|
||||||
typedef typename Tr_Base::size_type size_type;
|
typedef typename Tr_Base::size_type size_type;
|
||||||
|
|
@ -273,8 +273,8 @@ private:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
template <class Tr >
|
template <class Tr_>
|
||||||
Triangulation_hierarchy_2<Tr>::
|
Triangulation_hierarchy_2<Tr_>::
|
||||||
Triangulation_hierarchy_2(const Geom_traits& traits)
|
Triangulation_hierarchy_2(const Geom_traits& traits)
|
||||||
: Tr_Base(traits)
|
: Tr_Base(traits)
|
||||||
{
|
{
|
||||||
|
|
@ -285,9 +285,9 @@ Triangulation_hierarchy_2(const Geom_traits& traits)
|
||||||
|
|
||||||
|
|
||||||
// copy constructor duplicates vertices and faces
|
// copy constructor duplicates vertices and faces
|
||||||
template <class Tr>
|
template <class Tr_>
|
||||||
Triangulation_hierarchy_2<Tr>::
|
Triangulation_hierarchy_2<Tr_>::
|
||||||
Triangulation_hierarchy_2(const Triangulation_hierarchy_2<Tr> &tr)
|
Triangulation_hierarchy_2(const Triangulation_hierarchy_2<Tr_> &tr)
|
||||||
: Tr_Base()
|
: Tr_Base()
|
||||||
{
|
{
|
||||||
// create an empty triangulation to be able to delete it !
|
// create an empty triangulation to be able to delete it !
|
||||||
|
|
@ -299,20 +299,20 @@ Triangulation_hierarchy_2(const Triangulation_hierarchy_2<Tr> &tr)
|
||||||
|
|
||||||
|
|
||||||
//Assignement
|
//Assignement
|
||||||
template <class Tr>
|
template <class Tr_>
|
||||||
Triangulation_hierarchy_2<Tr> &
|
Triangulation_hierarchy_2<Tr_> &
|
||||||
Triangulation_hierarchy_2<Tr>::
|
Triangulation_hierarchy_2<Tr_>::
|
||||||
operator=(const Triangulation_hierarchy_2<Tr> &tr)
|
operator=(const Triangulation_hierarchy_2<Tr_> &tr)
|
||||||
{
|
{
|
||||||
copy_triangulation(tr);
|
copy_triangulation(tr);
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template <class Tr>
|
template <class Tr_>
|
||||||
void
|
void
|
||||||
Triangulation_hierarchy_2<Tr>::
|
Triangulation_hierarchy_2<Tr_>::
|
||||||
copy_triangulation(const Triangulation_hierarchy_2<Tr> &tr)
|
copy_triangulation(const Triangulation_hierarchy_2<Tr_> &tr)
|
||||||
{
|
{
|
||||||
{
|
{
|
||||||
for(int i=0;i<Triangulation_hierarchy_2__maxlevel;++i)
|
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 */
|
/* void */
|
||||||
/* Triangulation_hierarchy_2<Tr>:: */
|
/* Triangulation_hierarchy_2<Tr_>:: */
|
||||||
/* add_hidden_vertices_into_map(Tag_false, */
|
/* add_hidden_vertices_into_map(Tag_false, */
|
||||||
/* std::map<Vertex_handle,Vertex_handle >& V) { */
|
/* std::map<Vertex_handle,Vertex_handle >& V) { */
|
||||||
/* return; */
|
/* return; */
|
||||||
/* } */
|
/* } */
|
||||||
|
|
||||||
|
|
||||||
/* template <class Tr> */
|
/* template <class Tr_> */
|
||||||
/* void */
|
/* void */
|
||||||
/* Triangulation_hierarchy_2<Tr>:: */
|
/* Triangulation_hierarchy_2<Tr_>:: */
|
||||||
/* add_hidden_vertices_into_map(Tag_true, */
|
/* add_hidden_vertices_into_map(Tag_true, */
|
||||||
/* std::map<Vertex_handle,Vertex_handle >& V) */
|
/* 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
|
void
|
||||||
Triangulation_hierarchy_2<Tr>::
|
Triangulation_hierarchy_2<Tr_>::
|
||||||
swap(Triangulation_hierarchy_2<Tr> &tr)
|
swap(Triangulation_hierarchy_2<Tr_> &tr)
|
||||||
{
|
{
|
||||||
Tr_Base* temp;
|
Tr_Base* temp;
|
||||||
Tr_Base::swap(tr);
|
Tr_Base::swap(tr);
|
||||||
|
|
@ -385,8 +385,8 @@ swap(Triangulation_hierarchy_2<Tr> &tr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Tr>
|
template <class Tr_>
|
||||||
Triangulation_hierarchy_2<Tr>::
|
Triangulation_hierarchy_2<Tr_>::
|
||||||
~Triangulation_hierarchy_2()
|
~Triangulation_hierarchy_2()
|
||||||
{
|
{
|
||||||
clear();
|
clear();
|
||||||
|
|
@ -395,9 +395,9 @@ Triangulation_hierarchy_2<Tr>::
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Tr>
|
template <class Tr_>
|
||||||
void
|
void
|
||||||
Triangulation_hierarchy_2<Tr>::
|
Triangulation_hierarchy_2<Tr_>::
|
||||||
clear()
|
clear()
|
||||||
{
|
{
|
||||||
for(int i=0;i<Triangulation_hierarchy_2__maxlevel;++i)
|
for(int i=0;i<Triangulation_hierarchy_2__maxlevel;++i)
|
||||||
|
|
@ -405,9 +405,9 @@ clear()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template <class Tr>
|
template <class Tr_>
|
||||||
bool
|
bool
|
||||||
Triangulation_hierarchy_2<Tr>::
|
Triangulation_hierarchy_2<Tr_>::
|
||||||
is_valid(bool verbose, int level) const
|
is_valid(bool verbose, int level) const
|
||||||
{
|
{
|
||||||
bool result = true;
|
bool result = true;
|
||||||
|
|
@ -440,9 +440,9 @@ is_valid(bool verbose, int level) const
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template <class Tr>
|
template <class Tr_>
|
||||||
typename Triangulation_hierarchy_2<Tr>::Vertex_handle
|
typename Triangulation_hierarchy_2<Tr_>::Vertex_handle
|
||||||
Triangulation_hierarchy_2<Tr>::
|
Triangulation_hierarchy_2<Tr_>::
|
||||||
insert(const Point &p, Face_handle loc)
|
insert(const Point &p, Face_handle loc)
|
||||||
{
|
{
|
||||||
int vertex_level = random_level();
|
int vertex_level = random_level();
|
||||||
|
|
@ -466,9 +466,9 @@ insert(const Point &p, Face_handle loc)
|
||||||
return first;
|
return first;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Tr>
|
template <class Tr_>
|
||||||
typename Triangulation_hierarchy_2<Tr>::Vertex_handle
|
typename Triangulation_hierarchy_2<Tr_>::Vertex_handle
|
||||||
Triangulation_hierarchy_2<Tr>::
|
Triangulation_hierarchy_2<Tr_>::
|
||||||
insert(const Point& p,
|
insert(const Point& p,
|
||||||
Locate_type lt,
|
Locate_type lt,
|
||||||
Face_handle loc,
|
Face_handle loc,
|
||||||
|
|
@ -499,18 +499,18 @@ insert(const Point& p,
|
||||||
return first;
|
return first;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Tr>
|
template <class Tr_>
|
||||||
inline
|
inline
|
||||||
typename Triangulation_hierarchy_2<Tr>::Vertex_handle
|
typename Triangulation_hierarchy_2<Tr_>::Vertex_handle
|
||||||
Triangulation_hierarchy_2<Tr>::
|
Triangulation_hierarchy_2<Tr_>::
|
||||||
push_back(const Point &p)
|
push_back(const Point &p)
|
||||||
{
|
{
|
||||||
return insert(p);
|
return insert(p);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Tr>
|
template <class Tr_>
|
||||||
void
|
void
|
||||||
Triangulation_hierarchy_2<Tr>::
|
Triangulation_hierarchy_2<Tr_>::
|
||||||
remove(Vertex_handle v )
|
remove(Vertex_handle v )
|
||||||
{
|
{
|
||||||
Vertex_handle u=v->up();
|
Vertex_handle u=v->up();
|
||||||
|
|
@ -523,10 +523,10 @@ remove(Vertex_handle v )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Tr>
|
template <class Tr_>
|
||||||
template <class OutputItFaces>
|
template <class OutputItFaces>
|
||||||
void
|
void
|
||||||
Triangulation_hierarchy_2<Tr>::
|
Triangulation_hierarchy_2<Tr_>::
|
||||||
remove_and_give_new_faces(Vertex_handle v, OutputItFaces fit)
|
remove_and_give_new_faces(Vertex_handle v, OutputItFaces fit)
|
||||||
{
|
{
|
||||||
Vertex_handle u=v->up();
|
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
|
inline void
|
||||||
Triangulation_hierarchy_2<Tr>::
|
Triangulation_hierarchy_2<Tr_>::
|
||||||
remove_degree_3(Vertex_handle v )
|
remove_degree_3(Vertex_handle v )
|
||||||
{
|
{
|
||||||
remove(v);
|
remove(v);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Tr>
|
template <class Tr_>
|
||||||
inline void
|
inline void
|
||||||
Triangulation_hierarchy_2<Tr>::
|
Triangulation_hierarchy_2<Tr_>::
|
||||||
remove_first(Vertex_handle v )
|
remove_first(Vertex_handle v )
|
||||||
{
|
{
|
||||||
remove(v);
|
remove(v);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Tr>
|
template <class Tr_>
|
||||||
inline void
|
inline void
|
||||||
Triangulation_hierarchy_2<Tr>::
|
Triangulation_hierarchy_2<Tr_>::
|
||||||
remove_second(Vertex_handle v )
|
remove_second(Vertex_handle v )
|
||||||
{
|
{
|
||||||
remove(v);
|
remove(v);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Tr>
|
template <class Tr_>
|
||||||
typename Triangulation_hierarchy_2<Tr>::Vertex_handle
|
typename Triangulation_hierarchy_2<Tr_>::Vertex_handle
|
||||||
Triangulation_hierarchy_2<Tr>::
|
Triangulation_hierarchy_2<Tr_>::
|
||||||
move_if_no_collision(Vertex_handle v, const Point &p) {
|
move_if_no_collision(Vertex_handle v, const Point &p) {
|
||||||
Vertex_handle u=v->up(), norm = v;
|
Vertex_handle u=v->up(), norm = v;
|
||||||
int l = 0 ;
|
int l = 0 ;
|
||||||
|
|
@ -581,9 +581,9 @@ move_if_no_collision(Vertex_handle v, const Point &p) {
|
||||||
return norm;
|
return norm;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Tr>
|
template <class Tr_>
|
||||||
typename Triangulation_hierarchy_2<Tr>::Vertex_handle
|
typename Triangulation_hierarchy_2<Tr_>::Vertex_handle
|
||||||
Triangulation_hierarchy_2<Tr>::
|
Triangulation_hierarchy_2<Tr_>::
|
||||||
move(Vertex_handle v, const Point &p) {
|
move(Vertex_handle v, const Point &p) {
|
||||||
CGAL_triangulation_precondition(!is_infinite(v));
|
CGAL_triangulation_precondition(!is_infinite(v));
|
||||||
Vertex_handle w = move_if_no_collision(v,p);
|
Vertex_handle w = move_if_no_collision(v,p);
|
||||||
|
|
@ -594,10 +594,10 @@ move(Vertex_handle v, const Point &p) {
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Tr>
|
template <class Tr_>
|
||||||
template <class OutputItFaces>
|
template <class OutputItFaces>
|
||||||
typename Triangulation_hierarchy_2<Tr>::Vertex_handle
|
typename Triangulation_hierarchy_2<Tr_>::Vertex_handle
|
||||||
Triangulation_hierarchy_2<Tr>::
|
Triangulation_hierarchy_2<Tr_>::
|
||||||
move_if_no_collision_and_give_new_faces(Vertex_handle v, const Point &p,
|
move_if_no_collision_and_give_new_faces(Vertex_handle v, const Point &p,
|
||||||
OutputItFaces oif)
|
OutputItFaces oif)
|
||||||
{
|
{
|
||||||
|
|
@ -619,11 +619,11 @@ move_if_no_collision_and_give_new_faces(Vertex_handle v, const Point &p,
|
||||||
return norm;
|
return norm;
|
||||||
}
|
}
|
||||||
|
|
||||||
template < class Tr >
|
template <class Tr_>
|
||||||
template < class OutputItFaces >
|
template < class OutputItFaces >
|
||||||
inline
|
inline
|
||||||
typename Triangulation_hierarchy_2<Tr>::Vertex_handle
|
typename Triangulation_hierarchy_2<Tr_>::Vertex_handle
|
||||||
Triangulation_hierarchy_2<Tr>::insert_and_give_new_faces(const Point &p,
|
Triangulation_hierarchy_2<Tr_>::insert_and_give_new_faces(const Point &p,
|
||||||
OutputItFaces oif,
|
OutputItFaces oif,
|
||||||
Face_handle loc)
|
Face_handle loc)
|
||||||
{
|
{
|
||||||
|
|
@ -649,11 +649,11 @@ Triangulation_hierarchy_2<Tr>::insert_and_give_new_faces(const Point &p,
|
||||||
return first;
|
return first;
|
||||||
}
|
}
|
||||||
|
|
||||||
template < class Tr >
|
template <class Tr_>
|
||||||
template < class OutputItFaces >
|
template < class OutputItFaces >
|
||||||
inline
|
inline
|
||||||
typename Triangulation_hierarchy_2<Tr>::Vertex_handle
|
typename Triangulation_hierarchy_2<Tr_>::Vertex_handle
|
||||||
Triangulation_hierarchy_2<Tr>::
|
Triangulation_hierarchy_2<Tr_>::
|
||||||
insert_and_give_new_faces(const Point &p,
|
insert_and_give_new_faces(const Point &p,
|
||||||
Locate_type lt,
|
Locate_type lt,
|
||||||
Face_handle loc,
|
Face_handle loc,
|
||||||
|
|
@ -685,9 +685,9 @@ insert_and_give_new_faces(const Point &p,
|
||||||
return first;
|
return first;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Tr>
|
template <class Tr_>
|
||||||
typename Triangulation_hierarchy_2<Tr>::Face_handle
|
typename Triangulation_hierarchy_2<Tr_>::Face_handle
|
||||||
Triangulation_hierarchy_2<Tr>::
|
Triangulation_hierarchy_2<Tr_>::
|
||||||
locate(const Point& p, Locate_type& lt, int& li, Face_handle loc) const
|
locate(const Point& p, Locate_type& lt, int& li, Face_handle loc) const
|
||||||
{
|
{
|
||||||
Face_handle positions[Triangulation_hierarchy_2__maxlevel];
|
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];
|
return positions[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Tr>
|
template <class Tr_>
|
||||||
typename Triangulation_hierarchy_2<Tr>::Face_handle
|
typename Triangulation_hierarchy_2<Tr_>::Face_handle
|
||||||
Triangulation_hierarchy_2<Tr>::
|
Triangulation_hierarchy_2<Tr_>::
|
||||||
locate(const Point& p, Face_handle loc ) const
|
locate(const Point& p, Face_handle loc ) const
|
||||||
{
|
{
|
||||||
Locate_type lt;
|
Locate_type lt;
|
||||||
|
|
@ -705,9 +705,9 @@ locate(const Point& p, Face_handle loc ) const
|
||||||
return locate(p, lt, li, loc);
|
return locate(p, lt, li, loc);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Tr>
|
template <class Tr_>
|
||||||
void
|
void
|
||||||
Triangulation_hierarchy_2<Tr>::
|
Triangulation_hierarchy_2<Tr_>::
|
||||||
locate_in_all(const Point& p,
|
locate_in_all(const Point& p,
|
||||||
Locate_type& lt,
|
Locate_type& lt,
|
||||||
int& li,
|
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
|
pos[0]=hierarchy[0]->locate(p,lt,li,loc == Face_handle() ? position : loc); // at level 0
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class Tr>
|
template <class Tr_>
|
||||||
int
|
int
|
||||||
Triangulation_hierarchy_2<Tr>::
|
Triangulation_hierarchy_2<Tr_>::
|
||||||
random_level()
|
random_level()
|
||||||
{
|
{
|
||||||
boost::geometric_distribution<> proba(1.0/Triangulation_hierarchy_2__ratio);
|
boost::geometric_distribution<> proba(1.0/Triangulation_hierarchy_2__ratio);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue