Skip to Content.
Sympa Menu

cgal-discuss - Re: [cgal-discuss] hierarchy triangulation with point info

Subject: CGAL users discussion list

List archive

Re: [cgal-discuss] hierarchy triangulation with point info


Chronological Thread 
  • From: ffmm3 <>
  • To:
  • Subject: Re: [cgal-discuss] hierarchy triangulation with point info
  • Date: Thu, 12 Jun 2014 20:36:21 -0700 (PDT)

The all code is:

#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Delaunay_triangulation_2.h>
#include <CGAL/Triangulation_hierarchy_2.h>
#include <CGAL/Projection_traits_xy_3.h>
#include <CGAL/Triangulation_vertex_base_with_info_2.h>
#include <CGAL/IO/Color.h>
typedef CGAL::Exact_predicates_inexact_constructions_kernel K;
typedef CGAL::Projection_traits_xy_3<K> Gt;
typedef CGAL::Triangulation_vertex_base_with_info_2<unsigned, Gt> Vbb;
typedef CGAL::Triangulation_hierarchy_vertex_base_2<Vbb> Vb;
typedef CGAL::Triangulation_face_base_2<Gt> Fb;
typedef CGAL::Triangulation_data_structure_2<Vb,Fb> Tds;
typedef CGAL::Delaunay_triangulation_2<Gt,Tds> Dt;
typedef CGAL::Triangulation_hierarchy_2<Dt> Hierarchy_triangulation;
typedef K::Point_3 Point3;


void main(int argc, char *argv[])
{
std::vector<Point3> pts;
pts.push_back(Point3(1,0,0));
pts.push_back(Point3(1,2,0));
pts.push_back(Point3(1,2,3));
std::vector<std::pair&lt;Point3, unsigned> > ptsWithIdx;
for (int i=0; i<pts.size(); i++)
ptsWithIdx.push_back(std::make_pair(pts[i], i));

Hierarchy_triangulation ht;
ht.insert(ptsWithIdx.begin(), ptsWithIdx.end()); //Error!
}

The error is:
error C2664: 'CGAL::Point_3&lt;R_>::Point_3(const CGAL::Origin &)' : cannot
convert parameter 1 from 'std::pair<_Ty1,_Ty2>' to 'const CGAL::Origin &'



--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/hierarchy-triangulation-with-point-info-tp4659408p4659439.html
Sent from the cgal-discuss mailing list archive at Nabble.com.



Archive powered by MHonArc 2.6.18.

Top of Page