2

I want to continue my previous question which was misunderstood as related to 2D geometry and as a result I get no satisfying answer (Share CGAL's geometry between processes in C++) and ask it once again, but this time properly, highlighting, I'm talking about 3D Cgals Polyhedron Geometry.

In CGAL manual I read that it’s possible to instantiate HalfedgeDS. I want to place it in shared memory so that other process could use it (please note, it has to be shared between processes, not threads). How to make my custom allocator that suit my needs, so I could put it as Alloc parameter? And what about other parameters – “Traits” and “Items” – normally you don’t have to worry about it when you use only top level classes. Below I post the most interesting fragment, that I've found uin the CGALs manual, which I think could be helpful:

A HalfedgeDS is a class template and will be used as argument for other class templates, for example CGAL::Polyhedron_3. The template parameters to instantiate the HalfedgeDS will be provided by this other class template. Therefore, the three template parameters and their meaning are mandatory. We distinguish between the template HalfedgeDS and an instantiation of it.

Note that I am interested only in solutions related to 3D geometry.

4

1 回答 1

1

我猜你有兴趣使用CGAL::HalfedgeDS_list,这是 Polyhedron 类默认使用的。作为 HalfedgeDS 概念的所有模型,它有一个分配器作为模板参数。

然后使用共享内存分配器(如boost 进程间分配器)将完成这项工作。

于 2012-10-10T08:08:43.693 回答