|
-
Dec 7th, 2002, 08:43 AM
#1
Thread Starter
Addicted Member
OpenGL Collision Detection
I have managed a simple spherical collision detector, but I need something more complex.
Am I right in thinking that the "select.c" example in the MSDN library is to do with frustum-shaped collision? And if so, is this an efficient method to use?
Using Visual Studio .NET 2005
-
Dec 7th, 2002, 11:29 AM
#2
Frenzied Member
<geometric shape>-Frustum collisions are used for culling offscreen geometry from being rendered. The frustum is the volume thate xtends from the near cllip plane to the far clip plane, bounded by planes that correspond to the screen edges. Think of it as a truncated pyramid.
There are several methods of collision detection, generally used in a heirarchy, with the least expensive tests used to determine if a more expensive test should be used. Generally, in order:
Code:
Sphere-Sphere
Bounding Box-Bounding Box
Triangle-Triangle
Doing a web search will bring up hundreds of results for you.
Z.
-
Dec 7th, 2002, 11:46 AM
#3
Thread Starter
Addicted Member
As I understand it, the select.c example does the following:
- Sets the viewing volume to the shape of the bounding box for the collisions.
- Switching to GL_SELECT render mode which doesn't actually do anything except say what shapes exist within the viewing volume (e.g. which shapes have collided)
- Draw all the shapes, see with ones have collided.
- Says which shapes have 'collided' with the bounding box
Is that right?
Using Visual Studio .NET 2005
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|