Subject: CGAL users discussion list
List archive
Re: [cgal-discuss] Is there any good method to get the index of one triangle in triangles?
Chronological Thread
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Is there any good method to get the index of one triangle in triangles?
- Date: Fri, 25 Oct 2013 16:46:49 +0200
- Organization: GeometryFactory
In 3D 4 points = 4 finite triangles.
Are you in 2D or in 3D?
In 2D have a look at this example:
http://doc.cgal.org/latest/Triangulation_2/index.html#Triangulation_2AddingColors
replace color with a std::size_t
In 3D, you can do the same but need to store the info in the 3D cells and duplicate it since a triangle is incident to two 3D cells,
You can use a std::array<std::size_t,4> and use the index of the vertex
opposite to the triangle to refer to it.
Sebastien.
On 10/25/2013 09:08 AM, ffmm3 wrote:
Hi,
I have generage triangles using Delaunay triangulaition using several
points, and now I have the vertices coorinates of one triangle, and I want
find the index of the triangle in triangles.
Example:
For simplicity, using only four points:
and generate two triangles using the Delaunat_trianglation_3 class:
the first triangle:
the second triangle:
now I have the three points(p0, p1, p3), and want to find the index of this
triangle in the triangles. Is there any efficient method to do so? As you
know, allways there are much more than only four points, so the efficiency
is very important.
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Is-there-any-good-method-to-get-the-index-of-one-triangle-in-triangles-tp4658289.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] Is there any good method to get the index of one triangle in triangles?, ffmm3, 10/25/2013
- Re: [cgal-discuss] Is there any good method to get the index of one triangle in triangles?, Sebastien Loriot (GeometryFactory), 10/25/2013
Archive powered by MHonArc 2.6.18.