【发布时间】:2014-04-11 09:19:42
【问题描述】:
我发现对于 BGL 计算
CGAL::Polyhedron_3<K,CGAL::Polyhedron_items_with_id_3>
平方距离用于边缘权重,定义在: CGAL/boost/graph/properties_Polyhedron_3.h
这会在多面体网格上产生错误的结果。
如何在不更改 CGAL 代码的情况下更改重量指标?
我的解决方法是改变
reference operator[](key_type const& e) const
{
return CGAL::squared_distance(e->vertex()->point(), e->opposite()->vertex()->point());
}
在 Polyhedron_edge_weight_map 类中
reference operator[](key_type const& e) const
{
return sqrt(CGAL::squared_distance(e->vertex()->point(), e->opposite()->vertex()->point()));
}
有什么想法吗?
谢谢,最好的, 托马斯
【问题讨论】:
标签: cgal