Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] MeshDomain_3 as a class member
- Date: Mon, 02 Jan 2012 08:38:28 +0100
I see no problem in doing what you want.
Since you don't provide any minimal example I can only guess
that your problem comes from the fact that you are using
Labeled_image_mesh_domain_3 and that this class has no
copy constructor, operator=, nor default constructor.
Thus if you can't initialize your mesh domain while constructing
class A, you need to use a pointer instead.
Sebastien.
Hamid G wrote:
I have a class in which I am trying to create and optimize/exude a
tetrahedral mesh.
Mesh generation and optimization are going to happen in two different class
member methods.
My question is how to share MeshDomain_3 between the methods so I can call
make_mesh_3 and odt_optimize_mesh_3 separately.
I did try making 'domain' a class member but then when I want to create the
mesh using following code, I get errors:
class A
{
MeshDomain_3 domain;
CGAL::Image_3 image;
C3t3 c3t3;
createMesh();
optimizeMesh();
};
A::createMesh()
{
image.read(filename);
domain = MeshDomain_3(image);
c3t3 = CGAL::make_mesh_3<C3t3>(domain, criteria);
}
B::optimizeMesh()
{
CGAL::odt_optimize_mesh_3(c3t3, domain);
}
All typedefs are based on example from examples/Mesh_3/mesh_3D_image.cpp
thanks in advance
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/MeshDomain-3-as-a-class-member-tp4246498p4246498.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- Re: [cgal-discuss] MeshDomain_3 as a class member, Sebastien Loriot (GeometryFactory), 01/02/2012
Archive powered by MHonArc 2.6.16.