Boost logo

Geometry :

Subject: [ggl] Newbie question: Segment / Box intersection
From: Barend Gehrels (barend.gehrels)
Date: 2010-07-30 09:40:47


Hi,

Lionel, welcome to the list.

ZhouShuangJiang thanks for your quick and correct answers.

>>
>> I am totally new to this library, and I thought I might give it a try
>> for a big project I work on. So I have been spending most of my time
>> reading the documentation for the last few days.
>> However, I have not been able to find what I was looking for, even on
>> this mailing list.
>>
>> It seems I can't find out what is the most efficient way to perform a
>> ray / box intersection. I read around here that the "ray" notion was
>> not available yet, but I can live without it.
>
> A *ray* intersection? I don't think ggl will add a ray type

There are indeed currently no plans for rays. At least not in the near
future.

> , or you can just set one of the vertex to be 'large enough along the
> line'. Won't linestring/box intersection work for such case? The
> segment type is not a standard geometry type, and there may be no
> intersection support for it. However, you can add your own dispatch
> code to support such case. Since ggl is still WIP, it could miss some
> dispatch for different geometry combination in intersection and other
> functions.

Segment/box is not yet supported indeed, I will add that one.
Linestring/box will do here indeed.

>
>>
>> I've been trying some stuff intuitively, but nothing did the job. I'm
>> not really sure what I should use to perform this test. I see the
>> word "intersection" in 3 or more namespaces, but I can't find a
>> simple way to do this.
>>
>> Some leads would be highly appreciated!
>>
>> Lionel
> ggl is a template library, you should at least familiar with the stl
> as a framework.
> Though the page is quite outdated, the
> example(http://geometrylibrary.geodan.nl/02__linestring__example_8cpp-example.html)
> should be still sufficient for your case.
They should be updated indeed. But the source code in SVN gives the
right code.

Regards, Barend

-- 
-------------------------------------
Barend Gehrels
-------------------------------------
http://www.erplex.com
http://trac.osgeo.org/ggl
http://www.geodan.nl
-------------------------------------
Geodan
President Kennedylaan 1
1079 MB Amsterdam
The Netherlands
-------------------------------------
Tel: +31 (0)20 5711 335
Mob: +31 (0)6 175 447 62
Fax: +31 (0)20 5711 333
-------------------------------------
E-mail: barend.gehrels_at_[hidden]
Kvk-nummer: 33 207089
Disclaimer: www.geodan.nl/disclaimer
-------------------------------------

Geometry list run by mateusz at loskot.net