The function buildRayCellChain() is called recursively to construct the chain of Delaunay tetrahedra which a given ray traverses on its way through the model. A recursive call is made when the the exit point occurs too near an edge or vertex to be certain (in the imprecise floating-point environment of digital computation) which face the ray exits from. The chain splits then and each of the possible exits is followed in a separate chain. In the situation that there are no 'good' exits from any face and more than 1 possible or 'marginal' exit faces, each of the possible faces is tested (at line 202) to see if the edge of the model has been reached. However if this turns out to be the case, the integer nCellsInChain should be incremented and the pointers *chainOfCellIds and *cellExitIntcpts should be reallocated to this size before the function returns. This is not at present being done.
The function
buildRayCellChain()is called recursively to construct the chain of Delaunay tetrahedra which a given ray traverses on its way through the model. A recursive call is made when the the exit point occurs too near an edge or vertex to be certain (in the imprecise floating-point environment of digital computation) which face the ray exits from. The chain splits then and each of the possible exits is followed in a separate chain. In the situation that there are no 'good' exits from any face and more than 1 possible or 'marginal' exit faces, each of the possible faces is tested (at line 202) to see if the edge of the model has been reached. However if this turns out to be the case, the integernCellsInChainshould be incremented and the pointers*chainOfCellIdsand*cellExitIntcptsshould be reallocated to this size before the function returns. This is not at present being done.