Subject: CGAL users discussion list
List archive
- From: "Sebastien Loriot (GeometryFactory)" <>
- To:
- Subject: Re: [cgal-discuss] Use of Spherical Kernels in AABB Tree
- Date: Tue, 02 Jun 2015 15:32:30 +0200
- Organization: GeometryFactory
On 06/02/2015 03:20 PM, Clement Roux-Langlois wrote:
Hello,The intersection functor does not have the same API as required by the concepts in the AABB-tree:
I am wandering if it is possible to use the AABB Tree algorithm to
compute the intersection of a Sphere_3 and a (AABB) tree of Line_arc_3.
It seems that the intersection function for a spherical kernel does not
have the same number of arguments as that of a cartesian kernel. When I
try to refer to AABBTree::Intersection_and_primitive_id<Sphere_3>::Type,
I get the following compilation error :
/usr/local/include/CGAL/Circular_kernel_3/function_objects_polynomial_sphere.h:1182:67:
error: no type named ‘result_type’ in ‘struct
CGAL::Intersection_traits<CGAL::Spherical_kernel_3<CGAL::Simple_cartesian<double>,
CGAL::Algebraic_kernel_for_spheres_2_3<double> >,
CGAL::Sphere_3<CGAL::Spherical_kernel_3<CGAL::Simple_cartesian<double>,
CGAL::Algebraic_kernel_for_spheres_2_3<double> > >,
CGAL::Line_arc_3<CGAL::Spherical_kernel_3<CGAL::Simple_cartesian<double>,
CGAL::Algebraic_kernel_for_spheres_2_3<double>
> > >’
{ typedef typename Intersection_traits<SK, A, B>::result_type
type; };
I found a workaround for the intersection function alone on
http://stackoverflow.com/questions/26246381/how-to-calculate-the-intersection-of-a-line-segment-and-circle-with-cgal,
but I don't see how I can apply that to the AABB tree module.
Thanks for your help,
Best regards,
Clément
http://doc.cgal.org/latest/Kernel_23/group__intersection__spherical__grp.html
vs.
http://doc.cgal.org/latest/Kernel_23/group__intersection__linear__grp.html
As documented here:
http://doc.cgal.org/latest/AABB_tree/classAABBTraits.html#a70e323d8c5dd12580bdf06433373b21c
it's the second form that is required.
It should be doable to define a custom traits.
Sebastien
- [cgal-discuss] Use of Spherical Kernels in AABB Tree, Clement Roux-Langlois, 06/02/2015
- Re: [cgal-discuss] Use of Spherical Kernels in AABB Tree, Sebastien Loriot (GeometryFactory), 06/02/2015
- Re: [cgal-discuss] Use of Spherical Kernels in AABB Tree, Hexley, 06/03/2015
- Re: [cgal-discuss] Use of Spherical Kernels in AABB Tree, Sebastien Loriot (GeometryFactory), 06/02/2015
Archive powered by MHonArc 2.6.18.