如何在CGAL中构建过滤的构造谓词?

时间:2017-01-20 22:09:07

标签: c++ floating-point geometry computational-geometry cgal

我想使用CGAL的精确谓词不精确的构造内核,但我想在几个选定的Plane_3构造中使用精确算术,其中平面系数的中间计算可能上溢/下溢。

换句话说,我正在尝试构建一个自定义Construct_plane_3仿函数,它可以在内部使用精确算术,但将结果舍入到不精确的内核平面坐标。

在代码中:

 #include <CGAL/Filtered_kernel.h>
 #include <CGAL/Filtered_construction.h>

 typedef CGAL::Filtered_kernel<CGAL::Simple_cartesian<float>> Kernel;
 typedef CGAL::Filtered_construction<...> Custom_construct_plane_3;

 // standard inexact construction
 K::Point_3 point(0, 0, 0);
 K::Plane_3 inexact_plane(point, point, point);

 // custom inexact construction with filtered exact
 // arithmetic for the intermediate computations
 Custom_construct_plane_3 custom_construct_plane_3_object;
 K::Plane_3 exact_plane = custom_construct_plane_3_object(point, point, point);

模板参数...是我无法弄清楚的谜题中的缺失部分。

0 个答案:

没有答案