diff options
Diffstat (limited to 'src/mesh.h')
-rw-r--r-- | src/mesh.h | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -4,7 +4,9 @@ #include "intersect.h" #include "geometry.h" -#define STACK_SIZE 500 +#include "stdio.h" + +#define STACK_SIZE 100 /* Tests the intersection between a ray and a node in the bounding volume hierarchy. If the ray intersects the bounding volume and `min_distance` @@ -109,6 +111,11 @@ intersect_mesh(const float3 &origin, const float3& direction, Geometry *g, } // node is a leaf + if (node > tail) { + printf("warning: intersect_mesh() aborted; node > tail\n"); + break; + } + } // while loop while (node != head); |