Subject: CGAL users discussion list
List archive
Re: [cgal-discuss] The Problem in calculate the intersection of two X_monotone_curve_2
Chronological Thread
- From: zickphy <>
- To:
- Subject: Re: [cgal-discuss] The Problem in calculate the intersection of two X_monotone_curve_2
- Date: Sun, 11 Oct 2009 07:35:55 -0700 (PDT)
Hi, Thanks for your reply.
The relevant code is all included here. It is simple, but I do not know what
wrong with this.
-------------------------------------------------------------
#include <CGAL/basic.h>
#include <CGAL/Timer.h>
#include <CGAL/Cartesian.h>
#include <CGAL/CORE_algebraic_number_traits.h>
#include <CGAL/offset_polygon_2.h>
#include <CGAL/Arr_conic_traits_2.h>
#include <CGAL/Sweep_line_2_algorithms.h>
typedef CGAL::CORE_algebraic_number_traits Nt_traits;
typedef Nt_traits::Rational Rational;
typedef Nt_traits::Algebraic Algebraic;
//struct Rat_kernel : public CGAL::Cartesian<Rational> {};
//struct Alg_kernel : public CGAL::Cartesian<Algebraic> {};
//struct Conic_traits_2 : public CGAL::Arr_conic_traits_2<Rat_kernel,
Alg_kernel, Nt_traits> {};
typedef CGAL::Cartesian<Rational> Rat_kernel;
typedef CGAL::Cartesian<Algebraic> Alg_kernel;
typedef CGAL::Arr_conic_traits_2<Rat_kernel, Alg_kernel, Nt_traits>
Conic_traits_2;
typedef Rat_kernel::Point_2 Point_2;
typedef CGAL::Polygon_2<Rat_kernel> Polygon_2;
typedef CGAL::Gps_traits_2<Conic_traits_2> Gps_traits_2;
typedef Gps_traits_2::Polygon_2 Offset_polygon_2;
typedef Gps_traits_2::Polygon_with_holes_2 Offset_polygon_with_holes_2;
typedef Gps_traits_2::X_monotone_curve_2 X_monotone_curve_2;
typedef CGAL::Arrangement_2<Gps_traits_2> Arrangement_2;
typedef Gps_traits_2::Point_2 Query_Point_2;
using namespace std;
void main()
{
Query_Point_2 pt1(0, 0);
Query_Point_2 pt2(0, 10);
Query_Point_2 pt3(10, 0);
Query_Point_2 pt4(0, 10);
std::list<Query_Point_2> pts;
X_monotone_curve_2 is1(pt1, pt2);
X_monotone_curve_2 is2(pt3, pt4);
X_monotone_curve_2 iss[] = {is1, is2};
compute_intersection_points(iss, iss+1, std::back_inserter (pts));
}
--
View this message in context:
http://www.nabble.com/The-Problem-in-calculate-the-intersection-of-two-X_monotone_curve_2-tp25740486p25843891.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] The Problem in calculate the intersection of two X_monotone_curve_2, zickphy, 10/07/2009
- Re: [cgal-discuss] The Problem in calculate the intersection of two X_monotone_curve_2, efif, 10/11/2009
- Re: [cgal-discuss] The Problem in calculate the intersection of two X_monotone_curve_2, zickphy, 10/11/2009
- Re: [cgal-discuss] The Problem in calculate the intersection of two X_monotone_curve_2, Efraim Fogel, 10/12/2009
- Re: [cgal-discuss] The Problem in calculate the intersection of two X_monotone_curve_2, zickphy, 10/11/2009
- Re: [cgal-discuss] The Problem in calculate the intersection of two X_monotone_curve_2, zickphy, 10/16/2009
- Re: [cgal-discuss] The Problem in calculate the intersection of two X_monotone_curve_2, efif, 10/11/2009
Archive powered by MHonArc 2.6.16.