Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Are there any tags of Vertex_handle(Facet,Edge...)?
- Date: Wed, 21 Apr 2010 10:30:21 +0200
Song Lin wrote:
Dear sebastien,
Thank you for your reply.
but there is another problem:
the types in my codes are:
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Regular_triangulation_euclidean_traits_3<K> Gt;
typedef CGAL::Alpha_shape_vertex_base_3<Gt> Vb;
typedef CGAL::Alpha_shape_cell_base_3<Gt> Fb;
typedef CGAL::Triangulation_data_structure_3<Vb,Fb> Tds;
typedef CGAL::Regular_triangulation_3<Gt,Tds> Triangulation_3;
typedef CGAL::Alpha_shape_3<Triangulation_3> Alpha_shape_3;
and it's ok for this function:
as.classify(vit,0) (as is Alpha_shape_3 and vit is Finite_vertices_iterator)
but when I replace this line
typedef CGAL::Alpha_shape_vertex_base_3<Gt> Vb;
to this
typedef CGAL::Triangulation_vertex_base_with_info_3<int, K> Vb;
You did not read carefully what I wrote.
you should have written:
typedef CGAL::Alpha_shape_vertex_base_3<Gt> Vb_as;
typedef CGAL::Triangulation_vertex_base_with_info_3<int, K,Vb_as> Vb;
the function "as.classify(vit,0)" doesn't work.
It looks like what I need is something like
"Alpha_shape_vertex_base_with_info_3"
as what I want to do is:
for (vit = as.finite_vertices_begin(); vit !=
as.finite_vertices_end();vit++)
{
if(as.classify(vit,0)==Alpha_shape_3::EXTERIOR)
{
l++;
vit->info()=0;
}
else
{
vit->info()=1;
}
}
that decides which "vit" belongs to "as" and which doesn't.
Do you have any suggestion about this problem? Thank you.
Lin
在 2010-04-21三的 09:02 +0200,Sebastien Loriot (GeometryFactory)写道:
Song Lin wrote:
Hello everyone,Have a look here
I want to mark some vertices(facets,edges...) of a triangulation, but I
don't know how.
part of my codes are:
list<Weighted_point> lwp;
Alpha_shape_3 as(lwp.begin(), lwp.end(), 0, Alpha_shape_3::GENERAL);
Alpha_shape_3::Finite_vertices_iterator vit;
for (vit = as.finite_vertices_begin(); vit !=
as.finite_vertices_end();vit++)
{
if(as.classify(vit,0)==Alpha_shape_3::REGULAR)
{
##### mark vit; #####
}
}
and then I want to do:
for(all vit)
{
if(vit was marked)
then(......)
}
Can anyone tell me how to mark a Vertex_handle(Facet,Edge...)? I read
the reference of triangulation but couldn't find a solution. Thanks.
Best regards,
Lin
http://www.cgal.org/Manual/last/doc_html/cgal_manual/Triangulation_3/Chapter_main.html#Subsection_37.5.2
and here
at the documentation of Triangulation_vertex_base_with_info_3
http://www.cgal.org/Manual/last/doc_html/cgal_manual/Triangulation_3_ref/Class_Triangulation_vertex_base_with_info_3.html#Cross_link_anchor_1327
In you case if your vertex type is Vb, you should use
CGAL::Triangulation_vertex_base_with_info_3<YOUR_INFO,YOUR_KERNEL,Vb>
S.
- [cgal-discuss] Are there any tags of Vertex_handle(Facet,Edge...)?, Song Lin, 04/21/2010
- Re: [cgal-discuss] Are there any tags of Vertex_handle(Facet,Edge...)?, Sebastien Loriot (GeometryFactory), 04/21/2010
- Re: [cgal-discuss] Are there any tags of Vertex_handle(Facet,Edge...)?, Song Lin, 04/21/2010
- Re: [cgal-discuss] Are there any tags of Vertex_handle(Facet,Edge...)?, Sebastien Loriot (GeometryFactory), 04/21/2010
- Re: [cgal-discuss] Are there any tags of Vertex_handle(Facet,Edge...)?, Song Lin, 04/21/2010
- Re: [cgal-discuss] Are there any tags of Vertex_handle(Facet,Edge...)?, Sebastien Loriot (GeometryFactory), 04/21/2010
- Re: [cgal-discuss] Are there any tags of Vertex_handle(Facet,Edge...)?, Song Lin, 04/21/2010
- Re: [cgal-discuss] Are there any tags of Vertex_handle(Facet,Edge...)?, Sebastien Loriot (GeometryFactory), 04/21/2010
Archive powered by MHonArc 2.6.16.