Octree.cpp
// Returns the vertex list for all the mini cubes, along with the number of vertexes added.
Returns the vertex list for all the mini cubes, along with the number of vertexes added.
Returns the vertex list for all the mini cubes along with the number of vertexes added .
colorVertex* Octree::Triangulate(int& vertexCount)
{
    int cubeCount = RecursiveCubeCount(pRootNode);
    vertexCount = 36*cubeCount;
    colorVertex *pVertices = new colorVertex[vertexCount];
    RecursiveTriangulateCube(-limits/2, -limits/2, -limits/2, limits/2, limits/2, limits/2, pRootNode, &pVertices, 0);
    return pVertices;
}
colorVertex * Octree :: Triangulate ( int & vertexCount ) { int cubeCount = RecursiveCubeCount ( pRootNode ) ; vertexCount = 36 * cubeCount ; colorVertex * pVertices = new colorVertex [ vertexCount ] ; RecursiveTriangulateCube ( - limits / 2 , - limits / 2 , - limits / 2 , limits / 2 , limits / 2 , limits / 2 , pRootNode , & pVertices , 0 ) ; return pVertices ; }
Returns the vertex list for all the mini cubes, along with the number of vertexes added.
Returns the vertex list for all the mini cubes along with the number of vertexes added .
// TODO perform next-to vertex optimization.