/// <summary> /// Searches for meshing cubes that have been mark dirty and adds them to the queue for remeshing. /// </summary> public void QueueDirtyMeshesForRegeneration() { if (m_isClearing) { return; } // enque dirty meshes int count = 0; foreach (VolumetricHashTree o in m_meshStorage.GetEnumerable()) { count += 1; if (o.DynamicMeshCube == null) { continue; } if (o.DynamicMeshCube.IsDirty) { if (!m_regenerationQueue.Contains(o.DynamicMeshCube)) { m_regenerationQueue.Enqueue(o.DynamicMeshCube); } } } }
/// <summary> /// Enumeration function for iterating through the entire tree structure. /// </summary> /// <returns>The enumerable.</returns> public IEnumerable <VolumetricHashTree> GetEnumerable() { if (m_leftHashTree != null) { foreach (VolumetricHashTree n in m_leftHashTree.GetEnumerable()) { yield return(n); } } yield return(this); if (m_rightHashTree != null) { foreach (VolumetricHashTree n in m_rightHashTree.GetEnumerable()) { yield return(n); } } }