PDA

View Full Version : create a frustrum



Cucus
07-04-2011, 09:55 AM
Hi,

Is it possible in openGL to create a frustrum shaped like a trinagle or other geometric shape not very complex?

Thanks

ZbuffeR
07-04-2011, 10:57 AM
what do you mean ?

Cucus
07-04-2011, 11:07 AM
I want this for a collision detection:

I have two bounding boxes, if a collision is detected between both boxes, I want to use ray-casting algorithm to detect where (and if there's a collision).

So, is it possible to create a frustrum of the collision space of the two bounding boxes?

shlomip
07-04-2011, 02:11 PM
why you need to do that?
if you need more then just collision detection i recommend you to use a physic engine. there are lot of free engine(physix,newton...)
if you wont just collision detection or you dont wont an engine you can do the math with analytic geometry, but its lot of complex formulas.

Cucus
07-04-2011, 03:08 PM
why you need to do that?
if you need more then just collision detection i recommend you to use a physic engine. there are lot of free engine(physix,newton...)
if you wont just collision detection or you dont wont an engine you can do the math with analytic geometry, but its lot of complex formulas.



I know, but it isn't the goal of my project xDD.

ravage
07-04-2011, 06:02 PM
You can though when you say triangle I guess you would use a pyramid. I do something similar with a cone to test spot lights against objects that that actually hit. You should be able to find tutorials or code for that easily. Hope this is kinda what you meant.