internal int PackIndices(BspTreeBuilder tb, int[] via, int[] aia, int ti) { for (int i = 0; i < m_zeroList.Count; i++) { var bti3 = m_zeroList[i]; var ti3 = 3 * ti; tb.GetTriangleVertexIndices(bti3, out via[ti3], out via[ti3 + 1], out via[ti3 + 2]); m_zeroList[i] = ti; aia[ti++] = tb.m_triangleAttributeIndexArray[bti3 / 3]; } if (m_negativeTree != null) { var nti = m_negativeTree.PackIndices(tb, via, aia, ti); m_negativeCount = nti - ti; ti = nti; } if (m_positiveTree != null) { var nti = m_positiveTree.PackIndices(tb, via, aia, ti); m_positiveCount = nti - ti; ti = nti; } return(ti); }
internal int PackIndices(BspTreeBuilder tb, int[] via, int ti3) { for (int i = 0; i < m_zeroList.Count; i++) { tb.GetTriangleVertexIndices(m_zeroList[i], out via[ti3], out via[ti3 + 1], out via[ti3 + 2]); m_zeroList[i] = ti3; ti3 += 3; } if (m_negativeTree != null) { var nti3 = m_negativeTree.PackIndices(tb, via, ti3); m_negativeCount = nti3 - ti3; ti3 = nti3; } if (m_positiveTree != null) { var nti3 = m_positiveTree.PackIndices(tb, via, ti3); m_positiveCount = nti3 - ti3; ti3 = nti3; } return(ti3); }