Esempio n. 1
0
        public Region()
        {
            var indexedSize = (int)Mathf.Pow(REGION_SIZE, 3);
            var upperBound = (int)Mathf.Pow(REGION_SIZE, 2);

            this.chunks = new Chunk[indexedSize];
            this.Bounds = new CubeBounds(0, 0, 0, upperBound, upperBound, upperBound);
        }
Esempio n. 2
0
        public Chunk(IntVector3 position)
        {
            var indexedSize = (int) Mathf.Pow(CHUNK_SIZE, 3);
            var chunkPos = ClampAbsPosition(position);

            this.cells = new CellDefinition[indexedSize];
            this.dirtyCells = new List<CellDefinition>(128);
            this.Bounds = new CubeBounds(chunkPos, CHUNK_SIZE);
        }