9 #include "BoundingBox.h" 12 int main(
int argc,
char ** argv)
18 b[x++].
edges[0] = std::make_pair(0, 2);
19 b[x++].
edges[0] = std::make_pair(1, 3);
20 b[x++].
edges[0] = std::make_pair(0, 4);
21 b[x++].
edges[0] = std::make_pair(1, 3);
22 b[x++].
edges[0] = std::make_pair(0, 1);
23 b[x++].
edges[0] = std::make_pair(1, 3);
24 b[x++].
edges[0] = std::make_pair(0, 1);
25 b[x++].
edges[0] = std::make_pair(2, 3);
26 b[x++].
edges[0] = std::make_pair(0, 1);
27 b[x++].
edges[0] = std::make_pair(0, 1);
30 b[x++].
edges[0] = std::make_pair(0, 0);
31 b[x++].
edges[0] = std::make_pair(1, 3);
32 b[x++].
edges[0] = std::make_pair(1, 1);
33 b[x++].
edges[0] = std::make_pair(1, 3);
34 b[x++].
edges[0] = std::make_pair(2, 2);
35 b[x++].
edges[0] = std::make_pair(1, 3);
36 b[x++].
edges[0] = std::make_pair(3, 3);
37 b[x++].
edges[0] = std::make_pair(1, 3);
38 b[x++].
edges[0] = std::make_pair(4, 4);
39 b[x++].
edges[0] = std::make_pair(1, 3);
41 for (
int i = 0; i < x/2; i++)
43 int i1 = i*2, i2 = i*2+1;
45 printf(
"%s %s %s\n", b[i1].ToString().c_str(), b[i1].encloses(b[i2]) ?
"encloses" :
"does not enclose", b[i2].ToString().c_str());
47 printf(
"%s %s %s\n", b[i2].ToString().c_str(), b[i2].encloses(b[i1]) ?
"encloses" :
"does not enclose", b[i1].ToString().c_str());
49 printf(
"%s %s %s (%f)\n", b[i1].ToString().c_str(), b[i1].overlaps(b[i2]) ?
"overlaps" :
"does not overlap", b[i2].ToString().c_str(), b[i1].overlap(b[i2]));
51 printf(
"%s %s %s (%f)\n\n", b[i2].ToString().c_str(), b[i2].overlaps(b[i1]) ?
"overlaps" :
"does not overlap", b[i1].ToString().c_str(), b[i2].overlap(b[i1]));
printf("%d Experimental points found\n", nlines)
int main(int argc, char **argv)
std::pair< double, double > edges[dimensions]