Created
September 30, 2017 22:11
-
-
Save bysreg/2c0d5cc879bad9e306dc9aa1e8856ad4 to your computer and use it in GitHub Desktop.
AABB Intersection test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bool IsIntersect(const AABB& a, const AABB& b) | |
{ | |
for(int i=0;i<3;++i) | |
{ | |
if(a.min[i] <= b.max[i] && a.max[i] <= b.min[i]) | |
return true; | |
} | |
return false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment