well, I stubbed out some code as suggested, I am confused about what aabox really means as used in IntersectsBox() function.
#include <iostream>
using namespace std;
struct AABox
{
int minmax[2][2];
bool IntersectsBox(const AABox &box) const
{
for (int i = 0; i < 2; i++)
{
if (box.minmax[1][i] < box.minmax[0][i] || box.minmax[0][i] > box.minmax[1][i])
return false; // disjoint
}
return true; // intersecting
}
};
int main()
{
AABox aabox;
cout << aabox.IntersectsBox(aabox) << endl;
return 0;
}