Results 1 to 3 of 3

Thread: OpenGL Collision Detection

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Posts
    195

    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

  2. #2
    Frenzied Member Zaei's Avatar
    Join Date
    Jul 2002
    Location
    My own little world...
    Posts
    1,710
    <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.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Posts
    195
    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
  •  



Click Here to Expand Forum to Full Width