Subject: CGAL users discussion list
List archive
- From: EnricoLop <>
- To:
- Subject: [cgal-discuss] Trouble using ::intersection() on triangle intersections
- Date: Mon, 4 Aug 2014 14:44:07 -0700 (PDT)
Hi, I am not very experienced with cgal. I am trying to implement a 3D map of
a terrain with textures. Now i am checking for intersections on each image
to see what image will be better on each triangle(surface is made of
triangles).
I tried following the examples on
http://doc.cgal.org/latest/Kernel_23/group__intersection__linear__grp.html
but my code is genarating some erros:
/TextureManager.cpp:109: error: could not convert 'result' from
'CGAL::cpp11::result_of<CGAL::CommonKernelFunctors::Intersect_3<CGAL::Cartesian<double>
>(CGAL::Triangle_3<CGAL::Cartesian<double> >,
CGAL::Triangle_3<CGAL::Cartesian<double> >)>::type {aka CGAL::Object}' to
'bool'
TextureManager.cpp:110: error: no match for 'operator*' (operand type is
'CGAL::cpp11::result_of<CGAL::CommonKernelFunctors::Intersect_3<CGAL::Cartesian<double>
>(CGAL::Triangle_3<CGAL::Cartesian<double> >,
CGAL::Triangle_3<CGAL::Cartesian<double> >)>::type {aka CGAL::Object}')
this code :
struct Intersection_visitor {
typedef void result_type;
void operator()(const Point3 & p) const{
// handle point
}
void operator()(const Segment3 & s) const{
// handle segment
}
void operator()(const Triangle3 & t) const{
// handle point
}
};
CGAL::cpp11::result_of<tc::Intersect_3(Triangle3,Triangle3)>::type
result = CGAL::intersection(*t_3,*tLado1_3);
if(result) { // ERROR LINE
boost::apply_visitor(Intersection_visitor(), *result); // ERROR2 LINE
}
else { // empty
}
These are the declarations:
typedef CGAL::Cartesian<double> tc;
typedef tc::Ray_3 Ray3;
typedef tc::Line_3 Line3;
typedef tc::Vector_3 Vector3;
typedef tc::Point_3 Point3;
typedef tc::Plane_3 Plane3;
typedef tc::Triangle_3 Triangle3;
typedef tc::Segment_3 Segment3;
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/Trouble-using-intersection-on-triangle-intersections-tp4659679.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] Trouble using ::intersection() on triangle intersections, EnricoLop, 08/04/2014
- Re: [cgal-discuss] Trouble using ::intersection() on triangle intersections, Sebastien Loriot (GeometryFactory), 08/07/2014
Archive powered by MHonArc 2.6.18.