Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] error on using "CGAL::bounded_side_2()"

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] error on using "CGAL::bounded_side_2()"


Chronological Thread 
  • From: Andreas Fabri <>
  • To:
  • Subject: Re: [cgal-discuss] error on using "CGAL::bounded_side_2()"
  • Date: Sat, 01 Dec 2007 13:27:33 +0100

Mahmood NT wrote:
Hi,
I have the following definitions for a polygon.
typedef Traits_ Traits_2;

typedef typename Traits_2::Rat_kernel Rat_kernel;

typedef typename Rat_kernel::Point_2 Rat_point_2;
typedef Polygon_2<Rat_kernel> Rat_polygon_2;
std::list<Rat_point_2> vertices;

In a loop I will push back the points like this:
vertices.push_back (Rat_point_2 (x, y));

Then I define polygon:
Rat_polygon_2 pgn (vertices.begin(), vertices.end());

Now, when I want to use "CGAL::bounded_side_2" I get compilation error:
CGAL::bounded_side_2( vertices.begin(), vertices.end(), Rat_point_2 (1, 2),
Rat_point_2() );


The fourth argument should be the kernel and not another point

CGAL::bounded_side_2( vertices.begin(), vertices.end(), Rat_point_2 (1, 2),
Rat_kernel() );

andreas


Why? I have to say, I use CGAL 3.2. Does it matter?
I am looking for something like: "CGAL::bounded_side_2( pgn, Rat_point_2 (1, 2)
);" Is it possible?

the error message is:
include/CGAL/Polygon_2_algorithms.C: In function `CGAL::Bounded_side CGAL::bounded_side_2(ForwardIterator, ForwardIterator, const Point&, const Traits&) [with ForwardIterator =
std::_List_iterator<CGAL::Point_2<CGAL::Simple_cartesian<Rational> >, CGAL::Point_2<CGAL::Simple_cartesian<Rational> >&, CGAL::Point_2<CGAL::Simple_cartesian<Rational>
>*>, Point = Rat_point_2, Traits = Rat_point_2]':

VVc_demo.cpp:607: instantiated from here
.../CGAL-3.2/include/CGAL/Polygon_2_algorithms.C:300: error: no type
named `Compare_x_2' in `class Rat_point_2'
.../CGAL-3.2/include/CGAL/Polygon_2_algorithms.C:301: error: no type
named `Compare_y_2' in `class Rat_point_2'
.../CGAL-3.2/include/CGAL/Polygon_2_algorithms.C:302: error: no type
named `Orientation_2' in `class Rat_point_2'
VVc_demo.cpp:607: instantiated from here
.../CGAL-3.2/include/CGAL/Polygon_2_algorithms.C:304: error: `
compare_y_2' undeclared (first use this function)
.../CGAL-3.2/include/CGAL/Polygon_2_algorithms.C:304: error: (Each
undeclared identifier is reported only once for each function it appears
in.)
.../CGAL-3.2/include/CGAL/Polygon_2_algorithms.C:317: error: `
compare_x_2' undeclared (first use this function)


Thanks,

Mahmood NT







____________________________________________________________________________________
Be a better pen pal. Text or chat with friends inside Yahoo! Mail. See how. http://overview.mail.yahoo.com/



Archive powered by MHonArc 2.6.16.

Top of Page