|
|
Tim Nikias wrote:
>>Suppose I have a triangle with corners A, B and C. Suppose, further,
>>that I have a line that passes through P and Q.
>>
>>Now... how do I figure out whether these two objects intersect each
>>other? (I don't care *where* they intersect, only *if*.)
>
>
> Well, you could generate the plane of the triangle, and then cut the line
> through P and Q with that plane. The angle between the vectors that point
> from the intersection to the three corners then needs to add up to 360
> degrees to lie in the triangle.
>
> I hope that's correct, just wrote this off the top of my head. Maybe someone
> can correct me if I've missed something.
Inverse trigonometric operations are slow.
Try this search:
http://www.google.com/search?q=efficient+line+triangle+intersection
--
Tor Olav
http://subcube.net
http://subcube.com
Post a reply to this message
|
|