我正在用CGAL实现一些代码。我做了安排。现在我想给排列中的每个面添加一些数据。所以我通过下面的方法访问一个人脸。它返回常量句柄。所以我试着把它转换成non_const_handle。但是它显示错误“没有对象就不能调用成员函数”。
const Face_const_handle* f;
if(f = boost::get<Face_const_handle>(&(it->second))){
Arrangement_2::Face_handle fh = Arrangement_2::non_const_handle(*f); // ERROR HERE
for(int i=1;i<convexPts.size();i++){
CGAL::Gmpq temp = CGAL::squared_distance(convexPts[0],convexPts[i]);
if(temp>max){
max = temp;
fh->set_data(max);
}
}
}发布于 2016-11-21 15:05:25
Vertex_handle arr.non_const_handle(Vertex_const_handle v)
Halfedge_handle arr.non_const_handle(Halfedge_const_handle e)
Face_handle non_arr.const_handle(Face_const_handle f)查看Arangement_2 template并查找“抛弃常态”
https://stackoverflow.com/questions/40709284
复制相似问题