Skip to content

Instantly share code, notes, and snippets.

@bysreg
Created September 30, 2017 22:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bysreg/2c0d5cc879bad9e306dc9aa1e8856ad4 to your computer and use it in GitHub Desktop.
Save bysreg/2c0d5cc879bad9e306dc9aa1e8856ad4 to your computer and use it in GitHub Desktop.
AABB Intersection test
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