最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Is there a way to list all the Delaunay tetrahedra connected to a given point, and iterate over all points in cgal? - Stack Over

programmeradmin1浏览0评论

I have generated a Delaunay tetrahedral structure of a collection of points. Basically, I have a structure that has the following type:

CGAL::Delaunay_triangulation_3<CGAL::Exact_predicates_inexact_constructions_kernel> T;

These points come from a file where they are associated with a tag (integer) and I need to be able to reference them through this tag to relate various geometrical information coming from somewhere else.

Is there a way to enforce that association and assess some geometrical properties of all tetrahedron connected to a given point, for each point of the system? I want to be able to visit each point, list each tetrahedron connected to it, and be able to relate that to the point's tag...

At the moment, I have this bit that works fine:

// open datafile containing 3D coordinates
// and number (label) of each center
  Agregat myag(mystr);

// build a list of points:
std::list<Point> L;
for (int i = 1 ; i < myag.Nbt() ; i++){
    L.push_front(Point(myag.X(i) , myag.Y(i) ,myag.Z(i)    ));
}

//build the triangulation
CGAL::Delaunay_triangulation_3<CGAL::Exact_predicates_inexact_constructions_kernel> T(L.begin(), L.end());

here, Agregat is a homemade class that contain all points associated with their tags. This last information is lost - to the best of my knowledge - when the triangulation is built as it is not transferred to cgal. How can I keep it (or rebuild it)? Is it only possible?

Additionally, I am not sure on how to proceed to go through each point and list all connected tetrahedra: is there an iterator of some sort that exists for this task, for instance ?

Thanks for any help !

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论