Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 

 Home / 3D Theory & Graphics / Ray-Polygon Intersection Account Manager
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
Ake

May 23, 1999, 06:42 PM

Now i kinda got the hang of lightmap generation, but how do you check the intersection
between a ray and a polygon?

 
Phantom

May 26, 1999, 03:30 AM

Ake wrote:
>> Now i kinda got the hang of lightmap generation, but how do you check
>> the intersection between a ray and a polygon?

I can't give you an answer right away, but I know of two sources where
you can find it: The comp.graphics.algorithms FAQ has an algo for this,
and one of the Graphics Gems. You can download the sources from the
graphics gems everywhere, so that is probably the best idea.

Greets,
Phantom

 
Ake

May 27, 1999, 08:30 AM

Thanks, but I think I figured it out for myself. I use the same why as Jaap described in
his collision tutorial. I first construct a plane from the poly and check if the
ray intersects it. If they intersect I construct those perpendicular planes and check if
the intersection point is inside them. If it is the ray a poly intersect.

Pretty crappy explanation. Anyway, do you think this would work?

Greets Ake

 
Phantom

May 28, 1999, 07:01 AM

Ake wrote:
>>Thanks, but I think I figured it out for myself. I use the same why as Jaap described in
>>his collision tutorial. I first construct a plane from the poly and check if the
>>ray intersects it. If they intersect I construct those perpendicular planes and check if
>>the intersection point is inside them. If it is the ray a poly intersect.

Yes, this would work.

 
This thread contains 4 messages.
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.