Subject: CGAL users discussion list
List archive
- From: DCOC <>
- To:
- Subject: [cgal-discuss] make pair with std::vector<std::pair<Triangle,char*>>
- Date: Thu, 26 Jan 2017 18:05:06 -0800 (PST)
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None ; spf=Fail ; spf=None
- Ironport-phdr: 9a23:Rib5ahwDnLkcxBDXCy+O+j09IxM/srCxBDY+r6Qd0uITIJqq85mqBkHD//Il1AaPBtSHra8awLaL++C4ACpbvsbH6ChDOLV3FDY7yuwu1zQ6B8CEDUCpZNXLVAcdWPp4aVl+4nugOlJUEsutL3fbo3m18CJAUk6nbVk9EM2uRN+X1pz/l7vqo9yAKzlP0TGyaLc3IBStphjKreEXh5FjI+A/0EjnuHxNLsh94kggcV6amRfx4oG7/Jd9/jZ4oPE87YhLVqCsLPdwdqBREDlzajN938bsrxSWFlPX6w==
I am writing to see if it is possible to make_pair of Triangle_3 with
additional property, such that I use the following typedefs:
- typedef CGAL::Simple_cartesian<double> Kernel;
- typedef Kernel::FT FT;
- typedef Kernel::Point_3 Point;
- typedef Kernel::Triangle_3 Triangle;
- typedef std::vector<std::pair<Triangle,char*>>::iterator Iterator;
- typedef CGAL::AABB_triangle_primitive<Kernel, Iterator>
AABB_triangle_Primitive;
- typedef CGAL::AABB_traits<Kernel, AABB_triangle_Primitive>
AABB_triangle_traits;
- typedef CGAL::AABB_tree<AABB_triangle_traits> AABB_triangle_Tree;
The triangle tree builds successfully in visual studio, but if I add the
next line of code:
- AABB_triangle_tree.accelerate_distance_queries();
or if I try to use the tree, such as a computation of a triangle distance to
a point, for example:
- AABB_triangle_tree.squared_distance(points[i]))
the code does not compile successfully, with the following error:
"Error 2 error C2664: 'const CGAL::Point_3<R_>
&CGAL::CommonKernelFunctors::Construct_vertex_3<K>::operator ()(const
CGAL::Tetrahedron_3<R_> &,int) const' : cannot convert parameter 1 from
'std::pair<_Ty1,_Ty2>' to 'const CGAL::Tetrahedron_3<R_> &'
C:\dev\CGAL-4.9\include\CGAL\AABB_triangle_primitive.h 47 1
ptDiffTest"
It is possible to make pair with point, for example, using:
- std::vector< std::pair<Point, unsigned> > points;
Is it not possible to do the same with Triangle. Thank you for your support.
Kind Regards, DC.
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/make-pair-with-std-vector-std-pair-Triangle-char-tp4662487.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] make pair with std::vector<std::pair<Triangle,char*>>, DCOC, 01/27/2017
- Re: [cgal-discuss] make pair with std::vector<std::pair<Triangle,char*>>, Sebastien Loriot (GeometryFactory), 01/30/2017
- Re: [cgal-discuss] make pair with std::vector<std::pair<Triangle,char*>>, DCOC, 01/31/2017
- Re: [cgal-discuss] make pair with std::vector<std::pair<Triangle,char*>>, Sebastien Loriot (GeometryFactory), 01/30/2017
Archive powered by MHonArc 2.6.18.