Boost logo

Geometry :

Subject: [ggl] Newbie question: Segment / Box intersection
From: feverzsj
Date: 2010-07-29 12:05:29


Lionel Data wrote:
> Hello GGL,
>
> 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, 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.

>
> 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.

Regards, zsj
 


Geometry list run by mateusz at loskot.net