Quad equation for collision detection?

This is a discussion on Quad equation for collision detection? within the Game Programming forums, part of the General Programming Boards category; For collision detection in my game, if I know a point (p) lies on plane (pl), I can find the ...

  1. #1
    User
    Join Date
    Jan 2006
    Location
    Canada
    Posts
    498

    Quad equation for collision detection?

    For collision detection in my game, if I know a point (p) lies on plane (pl), I can find the collision point easily. However, I need to know if (p) resides in a given quad. I googled, and it seems that I need to use the quadratic formula (or the quad equation). Is this correct? If so, then I am a little bit confused. Consider:

    (quad equation, but quad formula is essentially the same)
    ax2 + bx + c = 0

    So does that mean that a, b, and c are the quad vertices? Where does d come in? I know that if the quad is a rectangle, then d would not be necessary. But quad does not imply that it's rectangular. And I would guess that x is a point that would satisfy the equation, right?

    So if I used the quad formula, and if I am correct with everything so far, all I would have to do is check for an inequality, and that would decide if a point is on a quad?

    Thanks
    Attached Images Attached Images  

  2. #2
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,598
    a,b, c form the plane and d is the distance.

    Using the quadratic formula for what you want to do would be quite slow. There are other ways to accomplish this.

    I'll let Bob respond first before I throw my two cents in.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how to make opengl draw in lighter colors ?
    By jabka in forum Game Programming
    Replies: 2
    Last Post: 12-17-2007, 06:12 AM
  2. Quad equation using fuctions problem
    By godfrey270487 in forum C++ Programming
    Replies: 5
    Last Post: 12-07-2006, 11:23 AM
  3. OpenGL - look trough surface -nehe lesson
    By GanglyLamb in forum Game Programming
    Replies: 8
    Last Post: 08-25-2006, 12:06 AM
  4. OpenGL, loading BMP Textures?
    By Zeusbwr in forum Game Programming
    Replies: 12
    Last Post: 12-09-2004, 05:16 PM
  5. Odd 3D Invis Objects?
    By Zeusbwr in forum Game Programming
    Replies: 4
    Last Post: 12-07-2004, 07:01 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21