i need an aabb intersection test
god this is driving me insane, ive been on the net for an hour and i cant find one example of a c++ aabb interection test
In two dimensions:
Hope this helps,
Jackson Allan
bool AABBAABBIntersection( Vector2D p1, Vector2D p2, Vector2D p3, Vector2D p4 ){ if( ( min( p1.x, p2.x ) > max( p3.x, p4.x ) ) | ( max( p1.x, p2.x ) < min( p3.x, p4.x ) ) | ( min( p1.y, p2.y ) > max( p3.y, p4.y ) ) | ( max( p1.y, p2.y ) < min( p3.y, p4.y ) ) ) return false; return true;}
Hope this helps,
Jackson Allan
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement