Stack overflow means you have too many recursive functions (among other unrelated things).
You need to check the depth at which you stop generating nodes within the octree. Usually 8 nodes deep, including the head node, is the maximum depth for an octree.
A quick glance at your code shows no sign that you ever terminate the creation of the octree. You just keep creating more and more nodes infinitely deep until it overflows the stack. levelCnt is being incremented but never used.
Additionally, it is “used” incorrectly. The depth of the tree must be passed as a parameter to the function that recursively creates nodes.
L. Spiro
Show differencesHistory of post edits
#1L. Spiro
Posted 17 December 2012 - 07:40 AM
Stack overflow means you have too many recursive functions (among other unrelated things).
You need to check the depth at which you stop generating nodes within the octree. Usually 8 nodes deep, including the head node, is the maximum depth for an octree.
A quick glance at your code shows no sign that you ever terminate the creation of the octree. You just keep creating more and more nodes infinitely deep until it overflows the stack.
L. Spiro
You need to check the depth at which you stop generating nodes within the octree. Usually 8 nodes deep, including the head node, is the maximum depth for an octree.
A quick glance at your code shows no sign that you ever terminate the creation of the octree. You just keep creating more and more nodes infinitely deep until it overflows the stack.
L. Spiro