9 int main(
int ,
char** ) {
17 point3d singlePt(-0.05f, -0.02f, 1.0f);
26 for (key[2] = singleKey[2] - 1; key[2] <= singleKey[2] + 1; ++key[2]){
27 for (key[1] = singleKey[1] - 1; key[1] <= singleKey[1] + 1; ++key[1]){
28 for (key[0] = singleKey[0] - 1; key[0] <= singleKey[0] + 1; ++key[0]){
29 if (key != singleKey){
42 for (key[2] = singleKey[2] - 1; key[2] <= singleKey[2] + 1; ++key[2]){
43 for (key[1] = singleKey[1] - 1; key[1] <= singleKey[1] + 1; ++key[1]){
44 for (key[0] = singleKey[0] - 1; key[0] <= singleKey[0] + 1; ++key[0]){
45 if (key != singleKey){
67 for (key[2] = singleKey[2] - 1; key[2] <= singleKey[2] + 1; ++key[2]){
68 for (key[1] = singleKey[1] - 1; key[1] <= singleKey[1] + 1; ++key[1]){
69 for (key[0] = singleKey[0] - 1; key[0] <= singleKey[0] + 1; ++key[0]){
70 if (key == singleKey){
74 }
else if (key == singleKey2){
89 for (key[2] = singleKey[2] - 1; key[2] <= singleKey[2] + 1; ++key[2]){
90 for (key[1] = singleKey[1] - 1; key[1] <= singleKey[1] + 1; ++key[1]){
91 for (key[0] = singleKey[0] - 1; key[0] <= singleKey[0] + 1; ++key[0]){
92 if (key == singleKey){
96 }
else if (key == singleKey2){
132 for (
float x=0.005f; x <= 0.32f; x+=res){
133 for (
float y=0.005f; y <= 0.32f; y+=res){
134 for (
float z=0.005f; z <= 0.32f; z+=res){
153 for (
float x=0.005f; x <= 0.32f; x+=res){
154 for (
float y=0.005f; y <= 0.32f; y+=res){
155 for (
float z=0.005f; z <= 0.32f; z+=res){
167 for (
float x=0.005f; x <= 0.32f; x+=res){
168 for (
float y=0.005f; y <= 0.32f; y+=res){
169 for (
float z=0.005f; z <= 0.32f; z+=res){
181 std::cout <<
"\nCreating / deleting nodes\n===============================\n";
182 size_t initialSize = tree.
size();
186 point3d newCoord(-2.0, -2.0, -2.0);
190 size_t insertedSize = tree.
size();
191 std::cout <<
"Size after one insertion: " << insertedSize << std::endl;
201 for (
size_t i = 0; i < 7; ++i){
210 const float value = 0.123f;
212 tree.
write(
"pruning_test_edited.ot");
241 tree.
write(
"pruning_test_out.ot");
244 std::cout <<
"\nClearing tree / recursive delete\n===============================\n";
260 tree.
write(
"pruning_test_out.ot");
261 std::cerr <<
"Test successful.\n";