Пример #1
0
 /// <summary>
 /// Recompute statistics about the meshing cubes.
 /// </summary>
 public void UpdateStats()
 {
     m_totalVertices  = 0;
     m_totalTriangles = 0;
     m_totalMeshCubes = 0;
     m_meshStorage.ComputeStats(ref m_totalVertices, ref m_totalTriangles, ref m_totalMeshCubes);
 }
Пример #2
0
    /// <summary>
    /// Calculates statistics about this tree node and its subtrees.
    /// </summary>
    /// <param name="vertCount">Vertex counter.</param>
    /// <param name="triangleCount">Triangle counter.</param>
    /// <param name="nodeCount">Tree node counter.</param>
    public void ComputeStats(ref int vertCount, ref int triangleCount, ref int nodeCount)
    {
        if (m_leftHashTree != null)
        {
            m_leftHashTree.ComputeStats(ref vertCount, ref triangleCount, ref nodeCount);
        }
        if (m_meshPrefab != null)
        {
            vertCount     += m_dynamicMeshCube.Vertices.Count;
            triangleCount += m_dynamicMeshCube.Triangles.Count;
        }
        nodeCount++;

        if (m_rightHashTree != null)
        {
            m_rightHashTree.ComputeStats(ref vertCount, ref triangleCount, ref nodeCount);
        }
    }