I am currently using bounding box collision detection (using the IntersectRect API call) as a first pass detection mechanism, but would like to follow that up with pixel detection.
My first idea is to pass the union RECT returned by the IntersectRect API call to each of the colliding objects and have them 'analyze' their bitmaps to see if they have only transparent pixels in the passed RECT (in my system translating the numbers in the returned RECT to coordinates on the object's bitmap is simple).
While this would work, it would actually take more time when the two objects don't collide than it would if they did (since the method could return false as soon as it identified a non-transparent pixel). On the other hand, the method would only have to analyze the small union RECT - not the entire bitmap - so the performance issue may be inconsequential.
I would appreciate comments on this idea. Also, how do you 'analyze' the properties of a particular pixel on a DirectDraw surface (to determine if it is transparent)?