Results 1 to 2 of 2

Thread: collision detection: sum of angles vs. perpendicular planes

  1. #1
    Member Contributor
    Join Date
    Jan 2002
    Location
    Bozeman, MT
    Posts
    51

    collision detection: sum of angles vs. perpendicular planes

    I have seen two different implementation for determining when a player/oblect is inside a polygon. The first way is by creating planes perpendicular to the sides of the polygon and then testing the plane equation for each plane to find out if the point being tested is inside the bounds of the polygon (very simple floating point operations ie. no divisions etc.). The second way is by summing the angles between the point and the verticies of the polygon (dot products, normalize, and acos's).

    The second method seems much more computationaly expensive than the first, however, I have seen the second method used quite a bit in demos etc.

    I guess this problem comes down to floating point operations (the second method) versus cache coherency (the first method).

    Can anyone elaborate on this????

    thanks

    Boris

  2. #2
    Senior Member Regular Contributor
    Join Date
    Nov 2000
    Location
    Sydney, NSW, Australia
    Posts
    426

    Re: collision detection: sum of angles vs. perpendicular planes

    I THINK the second method (perpendicular vectors) is more accurate than the sum of angles method, but it is slower also.
    :: Sleep is a poor substitute for caffeine ::

Similar Threads

  1. Multiple planes on collision detection sliding
    By overTaker in forum OpenGL: General
    Replies: 7
    Last Post: 08-09-2014, 01:15 PM
  2. Collision detection!
    By in forum OpenGL: Basic Coding
    Replies: 5
    Last Post: 12-05-2005, 09:00 PM
  3. Angles and Collision Detection
    By DragonXTC in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 04-29-2002, 10:18 AM
  4. Detection of planes
    By nicky in forum OpenGL: Basic Coding
    Replies: 3
    Last Post: 02-03-2002, 08:05 AM
  5. collision detection contest: collision crazy
    By in forum OpenGL: Basic Coding
    Replies: 0
    Last Post: 09-19-2000, 02:33 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean