|
||
|
GP Mailing List
ATXGPSIG List
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [gameprogrammer] Re: collision detection
On Mon, 2004-06-21 at 14:52, Roger D. Vargas wrote: > El lun, 21-06-2004 a las 15:41, Bob Pendleton escribió: > > On Mon, 2004-06-21 at 10:40, Roger D. Vargas wrote: > > > I want to make some simple tests with terrain rendering in opengl and I > > > would like to know where i can find some tutorial about basic collision > > > detection. I want to achive 2 things: first convert mouse click > > > coordinates to terrain coordinates > > > > Typically that is done through "picking". You have to provide names for > > your opengl primitives and you do a sort of "fake" redraw to let the > > hardware find named primitives within a certain distance of the cursor. > > Then you cull all that mess to find the ones you want. Try googling on > > the phrase "opengl picking". There are some good tutorials right at the > > top of the search page. > Nope, picking depends on a limit imposed by GL implementation (128 in my > case). It doesnt works for complex scenes. Raytracing and picking the > coordinate is the adequate solution, but Im bad in maths and cant find > the algorithm by myself. You might want to take a very careful look at picking and try to get it to work for you. Generally picking is at least partially implemented in hardware and is very much that doing even simple ray tracing in software. While a complex scene may cause overflow problems in OpenGL picking, the same complexity can cause a dramatic performance hit when you try to do software ray tracing to find the intersection of a primitive and a ray. Bob Pendleton > > -- +--------------------------------------+ + Bob Pendleton: writer and programmer + + email: Bob@Pendleton.com + + blog: www.Stonewolf.net + + web: www.GameProgrammer.com + +--------------------------------------+ --------------------- To unsubscribe go to http://gameprogrammer.com/mailinglist.html
|
|