Subject: CGAL users discussion list
List archive
- From: ayongwust_sjtu <>
- To:
- Subject: [cgal-discuss] How are points in triangulation_3 indexed?
- Date: Thu, 29 Mar 2012 07:26:23 -0700 (PDT)
I stepped into << operator of Triangulation_3 with the predefined example :
examples/Triangulation_3/simple_triangulation_3.cpp
Here is the way the points were inserted in the example:
-------------------------------
std::list<Point> L;
L.push_front(Point(0,0,0));
L.push_front(Point(1,0,0));
L.push_front(Point(0,1,0));
Triangulation T(L.begin(), L.end());
Triangulation::size_type n = T.number_of_vertices();
// insertion from a vector :
std::vector<Point> V(3);
V[0] = Point(0,0,1);
V[1] = Point(1,1,1);
V[2] = Point(2,2,2);
-------------------------------
When calling << operator, the triangulation object recursively retrieve all
its vertex iterators, and
copy them into a TV vector(std::vecotor<Vertex_handle> TV(n+1)).
Then, here are my questions:
1), Why an infinite vertex is defined as the first one of the triangulation?
tr.is_infinite(TV[0]);
2), Why the order of points of the triangulation is different with which
they inserted?
The output order of points is:
1 0 0
0 0 0
0 1 0
1 1 1
2 2 2
0 0 1
While the order in which points were inserted:
L.push_front(Point(0,0,0));
L.push_front(Point(1,0,0));
L.push_front(Point(0,1,0));
.....
V[0] = Point(0,0,1);
V[1] = Point(1,1,1);
V[2] = Point(2,2,2);
Best Regards,
Xianyong Liu
-----
-------------
Regards,
Xianyong Liu
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/How-are-points-in-triangulation-3-indexed-tp4515572p4515572.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] How are points in triangulation_3 indexed?, ayongwust_sjtu, 03/29/2012
- Re: [cgal-discuss] How are points in triangulation_3 indexed?, Sebastien Loriot (GeometryFactory), 03/29/2012
Archive powered by MHonArc 2.6.16.