Collision detection

This is a discussion on Collision detection within the C Programming forums, part of the General Programming Boards category; Hello.. I need to implement a fast function for detecting collision between a square and circle ... it is also ...

  1. #1
    Registered User
    Join Date
    Jan 2009
    Posts
    71

    Collision detection

    Hello..

    I need to implement a fast function for detecting collision between a square and circle ... it is also given that square is also axis(X-Y) aligned ..
    The center of the circle , square , and the side of the square are known.
    The method which is currently use .. (checking all corners and distance between centers) is a bit slow ..
    Can any 1 help ?
    Even a small suggestion would do .

    Thanks

  2. #2
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    Jack, I believe this has been posted on frequently in the Game Programming forum. Click on our "General programming Boards" link at the top left side of this page, and check that out.

  3. #3
    Registered User
    Join Date
    Jan 2009
    Posts
    71

    Test cases

    I've come up with a function that seems to be working .. . Is there any way to test it .. is there any standard library available ? or a list of test cases probably ?

    Thanks

  4. #4
    Registered User matrixx333's Avatar
    Join Date
    Mar 2009
    Posts
    67

  5. #5
    Registered User
    Join Date
    Sep 2006
    Posts
    8,868
    Jack, I thought this was a worthwhile link on the subject:

    Collision Detection

    It includes discussion/some math/ C source code and demo's.

  6. #6
    Epy
    Epy is offline
    Fortran lover Epy's Avatar
    Join Date
    Sep 2009
    Location
    California, USA
    Posts
    951

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Collision Detection Problems
    By Dark_Phoenix in forum Game Programming
    Replies: 1
    Last Post: 12-17-2006, 02:25 PM
  2. Collision Detection
    By Grantyt3 in forum C++ Programming
    Replies: 3
    Last Post: 09-30-2005, 03:21 PM
  3. bounding box collision detection
    By DavidP in forum Game Programming
    Replies: 7
    Last Post: 07-07-2002, 11:43 PM
  4. collision detection
    By DavidP in forum Game Programming
    Replies: 2
    Last Post: 05-11-2002, 01:31 PM
  5. Replies: 4
    Last Post: 05-03-2002, 09:40 PM

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