CGAL +使用EdgeIterator查找边长

时间:2015-07-08 01:43:08

标签: c++ cgal

我是CGAL的新手,我正试图找到网格中每条边的长度。我没有看到任何或长度的成员函数或任何方法轻易获得边缘两侧的点。

这是我到目前为止所处的地方。如何获得边缘两端的点或边缘本身的大小?

@implementation myClass

- (void) methodA {
    NSLog(@"Do something in method A");
}

- (void) methodB {
    NSLog(@"Do something in method B");
}

@end

1 个答案:

答案 0 :(得分:2)

为了编译而应该修复的唯一错误是:

  const Point& a = edgeIter->prev()->vertex()->point();
  const Point& b = edgeIter->vertex()->point();

您应该使用CGAL::Exact_predicates_inexact_constructions_kernel代替Kernel。如果你想避免不需要的副本,你应该在mesh上使用const ref。