Subject: CGAL users discussion list
List archive
- From: Bo Schwarzstein <>
- To:
- Subject: Re: [cgal-discuss] generate mesh from a gray image
- Date: Tue, 2 Jun 2009 18:03:03 +0800
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=DMwj0kHaVDBjHOgBaH9tBGrY44t8od0bxq9b00Fh9pSGaQxiBGQEs00fS7TBL06F5i 1D9Q8A1r0+chM7cZhCuySW4E9tCmItB3KZi0O9hA6Wke17EjN+qOvEfWGAvCptryrAXg BRF2eAGgKnjQPJj2owisxEHS4T8Ujhwgl0Fas=
Yes, thanks, finally I use these codes to export the mesh as a wavefront obj file and import it into blender
ofstream fout(OutfilePath);
map<C2t3::Vertex_handle, int> V;
int i = 0;
for(Tr::Finite_vertices_iterator vi = tr.finite_vertices_begin(); vi != tr.finite_vertices_end(); vi++)
{
fout<<fixed<<"v "<<vi->point()<<endl;
V[vi] = i++;
}
for( Tr::Finite_facets_iterator fi = tr.finite_facets_begin(); fi != tr.finite_facets_end(); fi++ )
{
if( c2t3.is_in_complex(*fi) )
{
fout<<"f";
for(int j=0; j<4; ++j)
{
if( (*fi).second != j )
{
fout<<" "<<V[(*fi).first->vertex(j)]+1;
}
}
fout<<endl;
}
}
2009/6/2 Ashwin Nanjappa <>
On Sun, May 31, 2009 at 10:58, Bo SchwarzsteinFor most conventional display, you should be using only the
<> wrote:
>
> And what's the mean of "number_of_facets" and "number_of_finite_facets", how
> should I import this mesh to OpenGL with proper index array ?
finite_facets for showing it using OpenGL. The facets includes those
connected to one or more infinite vertices.
~ash
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
- Re: [cgal-discuss] generate mesh from a gray image, Ashwin Nanjappa, 06/02/2009
- Re: [cgal-discuss] generate mesh from a gray image, Bo Schwarzstein, 06/02/2009
Archive powered by MHonArc 2.6.16.