Beispiel #1
0
 //used for debugging
 void printSolutionRecusively(AIDynBiDirOpNode currentNode)
 {
     if (currentNode != null)
     {
         printSolutionRecusively(currentNode.getParentNode());
         polygonFinalCount++;
     }
 }
Beispiel #2
0
 /*
  * addFinalsolutionPolygonsPreOrder method is a recusive method that will look at the parent of each node passed in until
  *      the node passed in is null, then it will add each Node's polygon to the finalSolutionArray in pre order
  *      from start until end
  * Parameter:	(AIDynBiDirOpNode)currentNode is the node that needs to be checked and then have its parent passed
  *              (ref int)counter is the current count of polygons in the FinalSolution array used to access the next index
  * Return:	none
  */
 void addFinalSolutionPolygonsPreOrder(AIDynBiDirOpNode currentNode, ref int counter)
 {
     if (currentNode != null)
     {
         finalSolutionArray [counter] = currentNode.getPolygon();
         counter++;
         addFinalSolutionPolygonsPreOrder(currentNode.getParentNode(), ref counter);
     }
 }