On Apr 4, 4:25=A0am, "Jens Hilwig" <jhil...@[EMAIL PROTECTED]
> wrote:
> Im realy not =A0familar with the different kinds of collision detection.
I=
n my
> case I have a kind of water pipesystem (3D Lines) and I have to check
the
> connections and intersections of the lines. Because its a closed system,
> there are many connections and intersections between the lines.
You mean some sort of static model of water pipes (i.e. not moving)?
The pipes have a certain thickness--you surely have to account for
that, right?
This scenario has a few interesting complications, in that each line
segment will typically share endpoints with at least two other
segments.
Thus, the "special" case where intersections are at the endpoints
is actually the normal case.
Also, in a typical water pipe system, most pipes will be aligned with
a coordinate axis, and will exactly share a coordinate plane with many
other pipes. This increases the chances of an intersection.
> There are no other elemets than 3D lines, so I think a classic collision
> detection is "too good" for my special problem. =A0Im wrong here ?
> If you know a "simple" collection detection that can handle my problem,
> please let me know.
=46rom what it sounds like, you need reliability and simplicity more
than you need speed. Personally, I'd go with a dumb O(n^2)
check between each pair of pipes. That's the easiest to implement
and debug. You simply check each pipe against each other pipe
with a couple nested FOR loops. That way, you just need to
debug the collision detection routine; the rest is practically
foolproof.
How many line segments are we talking about, here? I suspect
performance will not be an issue, compared to simplicity and
reliability.
Isaac Kuo


|