Subject: CGAL users discussion list
List archive
- From: Monique Teillaud <>
- To:
- Subject: Re: [cgal-discuss] segment_3 sphere intersection
- Date: Tue, 14 May 2013 18:15:16 +0200
Le 14/05/13 17:40, Sebastien Loriot (GeometryFactory) a écrit :
On 05/14/2013 05:13 PM, mriem wrote:
HelloIt is inside "With the 3D Spherical Kernel", because you need a Kernel
I was looking into the CGAL intersections utilities at
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Kernel_23_ref/Function_intersection.html
and I could not find a segment_3 sphere intersection.
which is a Spherical_kernel [1].
you can still find it as global function CGAL::intersection
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Kernel_23_ref/Function_intersection.html
scroll to bottom: "With the 3D Spherical Kernel"
intersection of a Line_arc_3 (more general than Segment_3) and a Sphere_3
Monique
Sebastien.
[1]
http://www.cgal.org/Manual/latest/doc_html/cgal_manual/Circular_kernel_3/Chapter_main.html#chapter-spherical-kernel
I have tried to implement the example code from that page
#include<CGAL/intersections.h>
void foo(CGAL::Segment_2<Kernel> seg, CGAL::Line_2<Kernel> line)
{
CGAL::Object result = CGAL::intersection(seg, line);
if (const CGAL::Point_2<Kernel> *ipoint =
CGAL::object_cast<CGAL::Point_2<Kernel> >(&result)) {
// handle the point intersection case with *ipoint.
} else
if (const CGAL::Segment_2<Kernel> *iseg =
CGAL::object_cast<CGAL::Segment_2<Kernel> >(&result)) {
// handle the segment intersection case with *iseg.
} else {
// handle the no intersection case.
}
}
changing function arguments
seg to type
CGAL::Segment_3<Kernel>
and line to
CGAL::Sphere_3<Kernel>
but the linker complains there is no such specialization for that
templated
function.
Can I do segment_3 to sphere intersection?
Thank you very much.
Miguel Oliveira
PS: in fact, for this particular case, I only needed a do_intersect
functionality, but I think that if a do_intersect exists, so will the
intersect.
--
View this message in context:
http://cgal-discuss.949826.n4.nabble.com/segment-3-sphere-intersection-tp4657426.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
--
Monique Teillaud
http://www.inria.fr/sophia/members/Monique.Teillaud/
INRIA Sophia Antipolis - Méditerranée
Institut National de Recherche en Informatique et Automatique
- [cgal-discuss] segment_3 sphere intersection, mriem, 05/14/2013
- Re: [cgal-discuss] segment_3 sphere intersection, Sebastien Loriot (GeometryFactory), 05/14/2013
- Re: [cgal-discuss] segment_3 sphere intersection, Monique Teillaud, 05/14/2013
- [cgal-discuss] Re: segment_3 sphere intersection, mriem, 05/14/2013
- Re: [cgal-discuss] Re: segment_3 sphere intersection, Monique Teillaud, 05/14/2013
- Re: [cgal-discuss] Re: segment_3 sphere intersection, Philipp Moeller, 05/14/2013
- [cgal-discuss] Re: segment_3 sphere intersection, mriem, 05/14/2013
- [cgal-discuss] Re: segment_3 sphere intersection, mriem, 05/14/2013
- Re: [cgal-discuss] Re: segment_3 sphere intersection, Pedro Machado Manhaes de Castro, 05/14/2013
- [cgal-discuss] Re: segment_3 sphere intersection, mriem, 05/14/2013
- [cgal-discuss] Re: segment_3 sphere intersection, mriem, 05/14/2013
- [cgal-discuss] Re: segment_3 sphere intersection, mriem, 05/14/2013
- Re: [cgal-discuss] segment_3 sphere intersection, Monique Teillaud, 05/14/2013
- Re: [cgal-discuss] segment_3 sphere intersection, Sebastien Loriot (GeometryFactory), 05/14/2013
Archive powered by MHonArc 2.6.18.