View Full Version : RAY CASTING??!!

01-13-2003, 10:15 PM
I`ve been searching for ages but not too much comes up on ray casting.
Could someone please explain how to cast and check for collison with a triangle.
Thank you!

Tom Nuydens
01-14-2003, 12:20 AM

-- Tom

01-14-2003, 06:54 PM
Any one got better tutorials than that as it was too complex as it was not based on Opengl

01-14-2003, 08:29 PM
Go to www.google.com (http://www.google.com)

"ray triangle intersection"
and hit enter


01-14-2003, 09:10 PM
I know I`ve done that.
By the way I wanted opengl specific

01-14-2003, 09:30 PM
if you get how raycasting works you realise it has nothing to do with gl.. so doesn't collision detection do have..

01-14-2003, 11:28 PM
Just posting this link in the hope you'll stop posting the same friggin' question over and over and over and over and over...


If you don't understand the tutes on that page then take up basket weaving.

And here's a tip - look for things yourself and you'll get there ALOT quicker.

01-15-2003, 01:33 AM
Some of you people are grumpy.
I got those source codes from the opengl tutorials page.
I will work it out myself!!

01-15-2003, 02:13 AM
Maybe they are grumpy for a reason. Ray casting has nothing to do with OpenGL and there is plenty of ressources on Internet, don't be lazy. Because you found your source code from an OpenGL program doesn't mean it has something to do with OpenGL, or i could as well say that adding numbers is OpenGL specific.


01-15-2003, 04:05 AM
First you must understand the concept
of plane equations.
When you can determine a distance from
a point to a plane you are halfway there.
Then you use some type of IsRayInTriangle() function (google). If that fucntion returns 'true' and the starting point of your ray is on one side of your triangle and and the ending point of your ray is on the other side of the triangle = your ray intersects the triangle!
Is all done on the CPU and has nothing to do with drawing, but its good to build a little gl testbed app when you play with all this, with a grid and the xyz axises marked out.

[This message has been edited by fritzlang (edited 01-15-2003).]

01-15-2003, 03:08 PM
Originally posted by shanedudddy2:
Some of you people are grumpy.

Gee I wonder why?

Vertex selection shanedudddy2 12-04-2002
3d Modelling HELP PLEASE!!!... shanedudddy2 12-18-2002
3d Modeller (AGAIN PLEASE H... shanedudddy2 01-03-2003
How would I select Individu... shanedudddy2 01-10-2003
Can you declare glLoadObjec... shanedudddy2 01-13-2003
RAY CASTING??!! shanedudddy2 01-14-2003

Or maybe


Sorry, did I take that out of context?

I got those source codes from the opengl tutorials page.

THE opengl tutorials page...?

I will work it out myself!!