如何从 face_handle 获取人脸 ID?

How to get the face id from face_handle?

我有包含顶点和面的 .off 文件。我正在使用 Triangulation_2 class 的 locate 函数来定位哪个三角形包含给定点。我可以得到三角形的face_handle。但我也想知道 face_handle 的 ID。点在里面的人脸的ID(索引)怎么获取?

最好的方法是使用 class Triangulation_face_base_with_info_2 在面中存储索引。建立三角测量后,只需手动设置索引,然后您就可以在定位查询期间使用它们。

看到这个 example 类似地为每张脸添加颜色。