我发现对于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()));
}
有什么想法吗?
谢谢,祝你一切顺利,托马斯
发布于 2014-04-11 18:35:04
请注意,权重图是函数dijksta_shortest_path的一个参数
https://stackoverflow.com/questions/23008456
复制