mirror of https://github.com/CGAL/cgal
deleted methods for initial insertion of four or three points (not needed any longer).
This commit is contained in:
parent
f5e2d0e59d
commit
701c9ae7bf
|
|
@ -76,7 +76,7 @@ public:
|
|||
using Base::EDGE;
|
||||
using Base::OUTSIDE_CONVEX_HULL;
|
||||
using Base::orientation;
|
||||
using Base::insert_four_init_vertices;
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -142,16 +142,6 @@ public:
|
|||
int number_of_negative_faces();
|
||||
|
||||
|
||||
//INITIALISATION
|
||||
std::vector<Vertex_handle> insert_four_init_vertices(double r);
|
||||
std::vector<Vertex_handle> insert_four_init_vertices_half_sphere(const Point& P1=Point(1/sqrt(2.),0,1/sqrt(2.)),
|
||||
const Point& P2=Point(-0.5,-0.5,1/sqrt(2.)),
|
||||
const Point& P3=Point(0,1/sqrt(2.),1/sqrt(2.)),
|
||||
const Point& P4=Point(0,0,1));
|
||||
std::vector<Vertex_handle> insert_three_init_vertices(const Point& P1=Point(1/sqrt(2.),0,1/sqrt(2.)),
|
||||
const Point& P2=Point(-0.5,-0.5,1/sqrt(2.)),
|
||||
const Point& P3=Point(0,1/sqrt(2.),1/sqrt(2.)));
|
||||
|
||||
|
||||
//------------------------------------------------------------------------INSERTION-----------------------------------------------
|
||||
Vertex_handle insert_first(const Point& p);
|
||||
|
|
@ -586,133 +576,6 @@ is_face(Vertex_handle v1,
|
|||
return _tds.is_face(v1, v2, v3, fr);
|
||||
}
|
||||
|
||||
//INITIALIZATION
|
||||
template <class Gt, class Tds >
|
||||
std::vector<typename Triangulation_on_sphere_2<Gt,Tds>::Vertex_handle>
|
||||
Triangulation_on_sphere_2<Gt,Tds>::
|
||||
insert_four_init_vertices(double r)
|
||||
{
|
||||
std::vector<Vertex_handle> init;
|
||||
Point p1(r,0,0);
|
||||
Point p2(0,r,0);
|
||||
Point p3(0,0,r);
|
||||
Point p4(-r/sqrt(3.),-r/sqrt(3.),-r/sqrt(3.));
|
||||
|
||||
Vertex_handle v1;
|
||||
Vertex_handle v2;
|
||||
Vertex_handle v3;
|
||||
Vertex_handle v4;
|
||||
|
||||
|
||||
v1=insert_first(p1);
|
||||
v2=insert_second(p2);
|
||||
|
||||
v3= _tds.insert_dim_up(v1,true);
|
||||
v4= _tds.insert_dim_up(v1,false);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
v3->set_point(p3);
|
||||
v4->set_point(p4);
|
||||
|
||||
init.push_back(v1);
|
||||
init.push_back(v2);
|
||||
init.push_back(v3);
|
||||
init.push_back(v4);
|
||||
|
||||
_full_sphere=true;
|
||||
_negative=faces_begin();
|
||||
|
||||
return init;
|
||||
}
|
||||
|
||||
template <class Gt, class Tds >
|
||||
std::vector<typename Triangulation_on_sphere_2<Gt,Tds>::Vertex_handle>
|
||||
Triangulation_on_sphere_2<Gt,Tds>::
|
||||
insert_three_init_vertices(const Point& P1,const Point& P2,const Point& P3)
|
||||
{
|
||||
std::vector<Vertex_handle> init;
|
||||
|
||||
Vertex_handle v1;
|
||||
Vertex_handle v2;
|
||||
|
||||
|
||||
v1=insert_first(P1);
|
||||
v2=insert_second(P2);
|
||||
|
||||
Face_handle fp=v1->face();
|
||||
Face_handle fn=v2->face();
|
||||
fp->set_vertex(1,v2);
|
||||
|
||||
fn->set_vertex(1,v1);
|
||||
|
||||
Vertex_handle v3=_tds.create_vertex();
|
||||
fp->set_vertex(2,v3);
|
||||
|
||||
fn->set_vertex(2,v3);
|
||||
|
||||
v3->set_face(fn);
|
||||
|
||||
v3->set_point(P3);
|
||||
_tds.set_dimension(2);
|
||||
|
||||
fp->set_neighbor(0,fn);
|
||||
fp->set_neighbor(1,fn);
|
||||
fp->set_neighbor(2,fn);
|
||||
fn->set_neighbor(0,fp);
|
||||
fn->set_neighbor(1,fp);
|
||||
fn->set_neighbor(2,fp);
|
||||
|
||||
init.push_back(v1);
|
||||
init.push_back(v2);
|
||||
init.push_back(v3);
|
||||
|
||||
_pivot=v1;
|
||||
|
||||
return init;
|
||||
}
|
||||
|
||||
template <class Gt, class Tds >
|
||||
std::vector<typename Triangulation_on_sphere_2<Gt,Tds>::Vertex_handle>
|
||||
Triangulation_on_sphere_2<Gt,Tds>::
|
||||
insert_four_init_vertices_half_sphere(const Point& P1,const Point& P2,const Point& P3,const Point& P4)
|
||||
{
|
||||
std::vector<Vertex_handle> init;
|
||||
|
||||
Vertex_handle v1;
|
||||
Vertex_handle v2;
|
||||
Vertex_handle v3;
|
||||
Vertex_handle v4;
|
||||
|
||||
|
||||
v1=insert_first(P1);
|
||||
v2=insert_second(P2);
|
||||
|
||||
v3= _tds.insert_dim_up(v1,true);
|
||||
v4= _tds.insert_dim_up(v1,false);
|
||||
|
||||
v3->set_point(P3);
|
||||
v4->set_point(P4);
|
||||
|
||||
init.push_back(v1);
|
||||
init.push_back(v2);
|
||||
init.push_back(v3);
|
||||
init.push_back(v4);
|
||||
Face_handle f=v4->face();
|
||||
Face_handle fn=f->neighbor(f->index(v4));
|
||||
|
||||
CGAL_triangulation_assertion( orientation(fn->vertex(0)->point(),fn->vertex(1)->point(),fn->vertex(2)->point())==ON_NEGATIVE_SIDE);
|
||||
fn->negative()=true;
|
||||
|
||||
_pivot=v1;
|
||||
|
||||
return init;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------------------INSERTION------------------------------------------------------//
|
||||
|
|
|
|||
Loading…
Reference in New Issue