From e9daed535f7758f0ce212d55a053603e6e73f42c Mon Sep 17 00:00:00 2001 From: Guillaume Damiand Date: Wed, 4 Dec 2024 16:03:39 +0100 Subject: [PATCH] Update an example of Nef_2 to show how to use Exact_rational --- Nef_2/examples/Nef_2/nef_2_construction.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Nef_2/examples/Nef_2/nef_2_construction.cpp b/Nef_2/examples/Nef_2/nef_2_construction.cpp index cb434cf297f..2cf544ca833 100644 --- a/Nef_2/examples/Nef_2/nef_2_construction.cpp +++ b/Nef_2/examples/Nef_2/nef_2_construction.cpp @@ -1,10 +1,10 @@ -#include -#include +#include +#include #include #include -typedef CGAL::Exact_integer RT; -typedef CGAL::Filtered_extended_homogeneous Extended_kernel; +typedef CGAL::Exact_rational FT; +typedef CGAL::Extended_cartesian Extended_kernel; typedef CGAL::Nef_polyhedron_2 Nef_polyhedron; typedef Nef_polyhedron::Point Point; typedef Nef_polyhedron::Line Line; @@ -13,12 +13,12 @@ int main() { Nef_polyhedron N1(Nef_polyhedron::COMPLETE); - Line l(2,4,2); // l : 2x + 4y + 2 = 0 + Line l(2.1,4.8,2.0); // l : 2.1x + 4.8y + 2 = 0 Nef_polyhedron N2(l,Nef_polyhedron::INCLUDED); Nef_polyhedron N3 = N2.complement(); assert(N1 == N2.join(N3)); - Point p1(0,0), p2(10,10), p3(-20,15); + Point p1(0.1,0.), p2(10.8,10.25), p3(-20.18,15.14); Point triangle[3] = { p1, p2, p3 }; Nef_polyhedron N4(triangle, triangle+3); Nef_polyhedron N5 = N2.intersection(N4);