Subject: CGAL users discussion list
List archive
- From: Mikhail Matrosov <>
- To:
- Subject: Re: [cgal-discuss] Intersection of Iso_rectangle_2 and Ray_2
- Date: Fri, 2 Mar 2012 12:25:36 +0400
- Authentication-results: mr.google.com; spf=pass (google.com: domain of designates 10.236.170.163 as permitted sender) ; dkim=pass
Ok, thanks.
-----
Best regards, Mikhail Matrosov
2012/3/2 Sebastien Loriot (GeometryFactory) <>
On 03/02/2012 09:06 AM, Mikhail Matrosov wrote:Quickly looked at the code and I would say yes.
Thank you! And what if I want to consider iso_rectangle as thin, have
starting point of ray inside it and want to find intersection as a point
in this case (see picture)? Should I just take target() of segment found
as an intersection?
Sebastien.
<mailto:>>
-----
Best regards, Mikhail Matrosov
2012/3/2 Sebastien Loriot (GeometryFactory) <#include <CGAL/Exact_predicates_exact___constructions_kernel.h>
The iso_rectangle is considered as full so that what you call
the two point case is the segment one.
int main(){
typedef CGAL::Exact_predicates_exact___constructions_kernel Kernel;Iso_rectangle_2 rect(Point_2(0,0),Point_2(1,1)__);
typedef Kernel::Point_2 Point_2;
typedef Kernel::Ray_2 Ray_2;
typedef Kernel::Iso_rectangle_2 Iso_rectangle_2;
Ray_2 r(Point_2(0,0),Point_2(1,1));
CGAL::Object obj=CGAL::intersection(r,rect)__;
const Kernel::Segment_2* s=CGAL::object_cast<Kernel::__Segment_2>https://lists-sop.inria.fr/__wws/info/cgal-discuss
(&obj);
CGAL_assertion(s!=NULL);
std::cout << *s << std::endl;
}
On 03/02/2012 08:55 AM, Mikhail Matrosov wrote:
There is a function Object intersection(Type1<Kernel> obj1,
Type2<Kernel> obj2) in CGAL which will return an object,
representing
intersection of two given objects of different possible types. It is
said, that intersection of Iso_rectangle_2 and Ray_2 is either
Point_2
or Segment_2.
And what about the case when ray intersects rectangle in two
points (see
attached picture)? Cannot see anything about it in the manual.
-----
Best regards, Mikhail Matrosov
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
<https://lists-sop.inria.fr/wws/info/cgal-discuss>
--
You are currently subscribed to cgal-discuss.
To unsubscribe or access the archives, go to
https://lists-sop.inria.fr/wws/info/cgal-discuss
- [cgal-discuss] Intersection of Iso_rectangle_2 and Ray_2, Mikhail Matrosov, 03/02/2012
- Re: [cgal-discuss] Intersection of Iso_rectangle_2 and Ray_2, Sebastien Loriot (GeometryFactory), 03/02/2012
- Re: [cgal-discuss] Intersection of Iso_rectangle_2 and Ray_2, Mikhail Matrosov, 03/02/2012
- Re: [cgal-discuss] Intersection of Iso_rectangle_2 and Ray_2, Sebastien Loriot (GeometryFactory), 03/02/2012
- Re: [cgal-discuss] Intersection of Iso_rectangle_2 and Ray_2, Mikhail Matrosov, 03/02/2012
- Re: [cgal-discuss] Intersection of Iso_rectangle_2 and Ray_2, Sebastien Loriot (GeometryFactory), 03/02/2012
- Re: [cgal-discuss] Intersection of Iso_rectangle_2 and Ray_2, Mikhail Matrosov, 03/02/2012
- Re: [cgal-discuss] Intersection of Iso_rectangle_2 and Ray_2, Sebastien Loriot (GeometryFactory), 03/02/2012
Archive powered by MHonArc 2.6.16.