Skip to Content.
Sympa Menu

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

Subject: CGAL users discussion list

List archive

error on using "CGAL::bounded_side_2()"


Chronological Thread 
  • From: Mahmood NT <>
  • To:
  • Subject: error on using "CGAL::bounded_side_2()"
  • Date: Sat, 1 Dec 2007 03:50:40 -0800 (PST)
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Message-ID; b=sDqfevwKMviz+ladc3bFc86SwoP+1oHWES4SCNP7zFbgtQoErHQjx51uQzsjP9HWMnbJ3k9Z5qZpBUCKi8pkjLZsrKtf89rA4iEC2iLvWIefVZs4DJw+lwDi6toDij5hb/QPS0Uq5+nNOLH9oEbi3fgW2BV0rgkytEynkMekqjU=;

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() );

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