Jump to content


Fast/Accurate collisions


2 replies to this topic

#1 Nyad

    Member

  • Members
  • PipPip
  • 44 posts

Posted 27 February 2008 - 05:48 PM

Hi

I am trying to test intersection between two quads without using the usual method.

I want to just do this
test if each vert in quad2 lies between verts of quad1
like:

sort q1x values into ascending order

I then test between the smallest and the largest value of x with the point
ie
if smallx <= quad2x and largex >= quad2x

and I do the same for my y values.

I am using this to test per quad on my objects made up of quads
to see if they collide, this will be done for many arbitrary quads.
The formula I am hoping is working is:
lim E = 0
E->0

where E is my error, so over many quads this will bring about a small error


Will this be faster than traditional methods or will it be way too slow or innacurate?

#2 Reedbeta

    DevMaster Staff

  • Administrators
  • 4979 posts
  • LocationBellevue, WA

Posted 27 February 2008 - 08:51 PM

That sounds like what it comes down to is approximating each quad by an AABB.

So it will be a good approximation if your quads are nearly AABBs, but bad if they are not.

It will definitely be faster than doing actual quad intersections.

I don't understand the part of your post that talks about "many arbitrary quads" and the error going to zero in some limit. (By the way, the statement you've written says that E approaches zero as E approaches zero. Rather vacuous. ;))
reedbeta.com - developer blog, OpenGL demos, and other projects

#3 Nyad

    Member

  • Members
  • PipPip
  • 44 posts

Posted 27 February 2008 - 08:56 PM

yeah :)

well the whole object is made up of quads which do vary slightly of cource.
But yes they would be similar to AABB quads. Also they are very small as i aim to have high detail, high poly count objects so it is more or less accurate then.

Thanks, now that I know it is suited well it will make the engine simpler and faster





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users