/// <summary> /// Prints Debug Info for this meshing cube. /// </summary> public void PrintDebugInfo() { string info = string.Empty; info += "Mesh Volume Key: " + m_hashKey + "\n"; info += "Root Voxel Key: " + voxelStorage.Key + "\n"; foreach (VoxelHashTree t in voxelStorage.GetEnumerable()) { info += " " + t.Key + "\n"; } Debug.Log(info); }
/** * Allows iterating through all nodes in the tree */ public IEnumerable <VoxelHashTree> GetEnumerable() { if (m_leftHashTree != null) { foreach (VoxelHashTree n in m_leftHashTree.GetEnumerable()) { yield return(n); } } yield return(this); if (m_rightHashTree != null) { foreach (VoxelHashTree n in m_rightHashTree.GetEnumerable()) { yield return(n); } } }