Subject: CGAL users discussion list
List archive
- From: Mahmood NT <>
- To:
- Subject: Re: [cgal-discuss] "left_vertex_2" undeclared... error
- Date: Sat, 22 Dec 2007 07:38:17 -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=iEMdxLT/uL4mBhw7S0C9vh9dMnRue0Tc68HmJbQsrWPVh+qIkbwSOIMIZZLw6eueYKqT3a+wU2OgA4M9J8HEmAkDZbgOrC4p0f/ASY36vBBA6rx3vEszxwhF3woa2OM2mG1J15KKOQMkV4xTDIwAR4Mn3HqnB664wQx+E7a23Nk=;
>There is a global function left_vertex_2(Polygon_2)
>and a member function Polygon_2::left_vertex
sorry but I didn't understand...
you mean:
xMin = left_vertex_2( pgn ); ??
or:
xMin = pgn.left_vertex(); ??
for the first I get:
VVc_demo.cpp: In function `bool read_polygons(const char*, Polygons_list_2&,
Bbox_2&)':
VVc_demo.cpp:623: error: no matching function for call to `left_vertex_2(
Rat_polygon_2&)'
and for the latter I get:
VVc_demo.cpp: In function `bool read_polygons(const char*, Polygons_list_2&,
Bbox_2&)':
VVc_demo.cpp:623: error: cannot convert `
__gnu_cxx::__normal_iterator<CGAL::Point_2<CGAL::Simple_cartesian<Rational>
>*, std::vector<CGAL::Point_2<CGAL::Simple_cartesian<Rational> >,
std::allocator<CGAL::Point_2<CGAL::Simple_cartesian<Rational> > > > >' to `
I forgot to say that pgn is defined like this:
typedef VVc_diagram_2::Rat_polygon_2 Rat_polygon_2;
Rat_polygon_2 pgn
(vertices.begin(), vertices.end());
and in VVc_diagram_2 class I have:
typedef Partial_polygon_Voronoi_diagram_2<Traits_2>
Partial_pvd_2;
typedef typename Partial_pvd_2::Rat_polygon_2
Rat_polygon_2;
and in Partial_polygon_Voronoi_diagram_2 class I have:
typedef Traits_ Traits_2;
typedef typename Traits_2::Rat_kernel Rat_kernel;
typedef Polygon_2<Rat_kernel> Rat_polygon_2;
So what should I do?
Mahmood NT
----- Original Message ----
From: Andreas Fabri
<>
To:
Sent: Saturday, December 22, 2007 4:05:57 PM
Subject: Re: [cgal-discuss] "left_vertex_2" undeclared... error
There is a global function left_vertex_2(Polygon_2)
and a member function Polygon_2::left_vertex
Mahmood NT wrote:
> Hello,
> I have wrote a code using polygon:
>
> if (! pgn.is_simple())
>
> {
>
> std::cerr << "Error - Polygon no. " << i + 1
>
> << " is not simple." << std::endl;
>
> return (false);
>
> }
>
> // for first polygon (domain) we have to extract boundary point
> // so that generated random milestones have to fit in domain
> if ( domainFlag ) {
>
> xMin = pgn.left_vertex_2();
> xMax = pgn.right_vertex_2();
> yMin = pgn.bottom_vertex_2();
> yMax = pgn.top_vertex_2();
> if (fout.is_open()) {
> fout << xMin << xMax << yMin << yMax;
>
> }
> domainFlag = false; // for other polygons, we do not need it
> }
>
>
> during the compilation there is no error at "pgn.is_simple()", but at
> "left_vertex_2()" and others it says:
> VVc_demo.cpp: In function `bool read_polygons(const char*, Polygons_list_2&,
> Bbox_2&)':
> VVc_demo.cpp:671: error: `left_vertex_2' undeclared (first use this
> function)
> VVc_demo.cpp:671: error: (Each undeclared identifier is reported only once
> for
> each function it appears in.)
> VVc_demo.cpp:672: error: `right_vertex_2' undeclared (first use this
> function)
> VVc_demo.cpp:673: error: `bottom_vertex_2' undeclared (first use this
> function)
> VVc_demo.cpp:674: error: `top_vertex_2' undeclared (first use this function)
>
> Why is_simple() does not have problem but others have??
>
> Thanks, Mahmood NT
>
>
>
>
>
>
>
> ____________________________________________________________________________________
> Looking for last minute shopping deals?
> Find them fast with Yahoo! Search.
> http://tools.search.yahoo.com/newsearch/category.php?category=shopping
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search.
http://tools.search.yahoo.com/newsearch/category.php?category=shopping
- Re: [cgal-discuss] "left_vertex_2" undeclared... error, Mahmood NT, 12/22/2007
Archive powered by MHonArc 2.6.16.