public Chunk ReInitialize(BrickTree brickTree, CubicChunkExtractor extractor, Material material, int brickX, int brickY, int brickZ, Pool <Chunk> chunkPool, Pool <ChunkFromOctreeRequest> parentPool) { this.brickTree = brickTree; this.extractor = extractor; this.material = material; this.chunkPool = chunkPool; this.parentPool = parentPool; this.chunk = chunkPool.Catch(); brickCell = new Vector3i(brickX, brickY, brickZ); return(chunk); }
public void Start() { setBrush = new SetVoxelBrush(); setAdjacentBrush = new SetVoxelAdjacentBrush(); materialAtlas.LoadFromFile("VoxelAtlas1"); extractor = new CubicChunkExtractor(materialAtlas); Noise2D noise = new PerlinHeightmap(scale, magnitude, 1); brickTree = new BrickTree(brickDimensions, noise); createAll(); }
public void Start() { foreach (Transform child in this.gameObject.transform) { chunkPool.Release(new Chunk(child.gameObject)); } Noise2D noise = new FlatNoise(2); materialAtlas.LoadFromFile(voxelAtlasFile); voxelTree = new BrickTree(brickResolution, noise); extractor = new CubicChunkExtractor(materialAtlas); createAll(); }