Original Post
I've got a paper that describes what an AABB Tree is and how to build one. With that you can exclude impossible collisions quickly, search for possible collisions, and can find the intercepted poly rapidly. The paper tells that the polys should be classified (i.e. what box it's inside, above or below) about the midpoint of its projection onto the axis. But in this way, some search collisions will fail cuz, although the polys could overlap two boxes on the same level, this algorithm to build an AABB Tree will choose only one box in which this poly will lie. [quote="Paper"] We position the partitioning plane along the longest axis, by choosing, the coordinate on the longest axis where the partitioning plane intersects the axis. We then split the set of primitives into a negative and positive subset corresponding to the respective halfspaces of the plane. A primitive is classified as positive if the midpoint of its projection onto the axis is greater than, and negative otherwise. [/quote]