Subject: CGAL users discussion list
List archive
- From: Daniel Abler <>
- To: <>
- Subject: [cgal-discuss] unique pointer to cgal::Polyhedron_3 objects created in loop
- Date: Wed, 27 May 2015 07:55:14 +0200
- Organization: University of Bern
Dear List,
I would like to create a list of pointers to Polyhedron_3 objects (created in
a loop) for later meshing via Polyhedral_mesh_domain_3, as in the following
pseudocode:
struct K: public CGAL::Exact_predicates_inexact_constructions_kernel {};
typedef CGAL::Polyhedron_3<K> Polyhedron;
[...]
std::list<Polyhedron*> poly_pointer_list;
for (...)
{
[...]
Polyhedron cgalpoly =
FunctionThatCreatesCgalPolyhedronFromVTKPolyData;
poly_pointer_list.push_back(&cgalpoly);
}
The problem here is that &cgalpoly always points to the same address... I
suspect this has to do with the 'copy constructor' of Polyhedron_3 or my
'FunctionToCreateCgalPolyhedronFromVTKPolyData'.
How can I make sure that each cgalpoly created in the loop is kept in memory
and can be addressed by an unique pointer?
Many thanks,
Daniel
- [cgal-discuss] unique pointer to cgal::Polyhedron_3 objects created in loop, Daniel Abler, 05/27/2015
- Re: [cgal-discuss] unique pointer to cgal::Polyhedron_3 objects created in loop, Andreas Fabri, 05/27/2015
- Re: [cgal-discuss] unique pointer to cgal::Polyhedron_3 objects created in loop, Daniel Abler, 05/27/2015
- Re: [cgal-discuss] unique pointer to cgal::Polyhedron_3 objects created in loop, Andreas Fabri, 05/27/2015
Archive powered by MHonArc 2.6.18.