public void TranslateMap(VoxelLocation start, IMapVoxelMesh map) { VoxelLocation chunckStart = new VoxelLocation(); foreach (VoxelLocation chunckLocation in map.Keys()) { IVoxelMesh chunck = map.GetChild(chunckLocation); chunckStart.Set(chunckLocation).Mul(map.ChildWidth, map.ChildHeight, map.ChildDepth); if (chunck is IOctreeVoxelMesh) { this.TranslateTree(chunckStart, (IOctreeVoxelMesh)chunck); } else { this.TranslateLeaf(chunckStart, chunck); } } }
public void DebugMap(VoxelLocation start, IMapVoxelMesh map, int startDeep, int endDeep) { this.DebugLeaf(start, map, startDeep, endDeep); VoxelLocation chunckStart = new VoxelLocation(); foreach (VoxelLocation chunckLocation in map.Keys()) { IVoxelMesh chunck = map.GetChild(chunckLocation); chunckStart.Set(chunckLocation).Mul(map.ChildWidth, map.ChildHeight, map.ChildDepth); if (chunck is IOctreeVoxelMesh) { this.DebugTree(chunckStart, (IOctreeVoxelMesh)chunck, startDeep - 1, endDeep - 1); } else { this.DebugLeaf(chunckStart, chunck, startDeep - 1, endDeep - 1); } } }